openquake.hmtk.strain package¶
Subpackages¶
Submodules¶
openquake.hmtk.strain.geodetic_strain module¶
openquake.hmtk.strain.geodectic_strain.GeodeticStain
is a
core class for storage and implementation of a geodetic strain rate
model
- class openquake.hmtk.strain.geodetic_strain.GeodeticStrain[source]¶
Bases:
object
openquake.hmtk.strain.geodetic_strain.GeodeticStrain
describes the geodetic strain model- Parameters
data (dict) – Strain data in the form of a dictionary where is vector of attributes is stored under the correponding dictionary key (i.e. - longitude - Longitude of point - latitude - Latitiude of point - exx - xx-component of strain tensor - eyy - yy-component of strain tensor - exy - xy-component of strain tensor
seismicity_rate (numpy.ndarray) – Seismicity rate at each point associated with the strain model
target_magnitudes (numpy.ndarray) – Magnitudes for the corresponding activity rates
data_variables (list) – List of strain data attributes in the current class
openquake.hmtk.strain.shift module¶
openquake.hmtk.strain.shift.Shift
implements the Seismic Hazard
Inferred from Tectonics (SHIFT) methodology (Bird & Liu, 2007;
Bird et al. 2010) for calculating seismic moment rate from Geodetic Strain
- class openquake.hmtk.strain.shift.Shift(minimum_magnitude, base_params=None, region_parameter_file=None)[source]¶
Bases:
object
openquake.hmtk.strain.shift.Shift
implements the main Seismic Hazard Inferred from Tectonics (SHIFT) methodology for calculating activity rates (Bird & Liu, 2007; Bird et al. 2010)- Parameters
strain – Strain model as instance of :class: openquake.hmtk.strain.geodetic_strain.GeodeticStrain
target_magnitudes (float/list/array) – Magnitude of list of target magnitudes for calculation of the activity rates
number_magnitudes (int) – Number of magnitudes considered for activity rates
threshold_moment (np.array) – The scalar moment corresponding to the threshold magnitudes
regionalisation (list) – List of dictionaries containing the required region-specific attributes required for calculation
base_rates (np.ndarray) – Minimum (background) rates for each corresponding target magnitude
- calculate_activity_rate(strain_data, cumulative=False, in_seconds=False)[source]¶
Main function to calculate the activity rate (for each of the magnitudes in target_magnitudes) for all of the cells specified in the input strain model file
- Parameters
strain_data – Strain model as an instance of :class: openquake.hmtk.strain.geodetic_strain.GeodeticStrain
cumulative (bool) – Set to true if the cumulative rate is required, False for incremental
in_seconds (bool) – Returns the activity rate in seconds (True) or else as an annual activity rate
- continuum_seismicity(threshold_moment, e1h, e2h, err, region_params)[source]¶
Function to implement the continuum seismicity calculation given vectors of input rates e1h, e2h [np.ndarray] and a dictionary of the corresponding regionalisation params returns a vector of the corresponding seismicity rates Python implementation of the CONTINUUM_SEISMICITY subroutine of SHIFT_GSRM.f90
- Parameters
threshold_moment (float) – Target moment for calculation of activity rate
e1h (np.ndarray) – First principal strain rate
e1h – Second principal strain rate
err (np.ndarray) – Vertical strain rate
region_params (dict) – Activity rate parameters specific to the tectonic region under consideration
- Returns
Cumulative seismicity rate greater than or equal to the threshold magnitude
- get_rate_osr_convergent_transform(threshold_moment, id0)[source]¶
Calculates seismicity rate for special case of the ridge condition with convergence and transform
- Parameters
threshold_moment (float) – Moment required for calculating activity rate
id0 (np.ndarray) – Logical vector indicating the cells to which this condition applies
- Returns
Activity rates for cells corresponding to the hybrid ocean convergent boundary and oceanic transform condition
- get_rate_osr_normal_transform(threshold_moment, id0)[source]¶
Gets seismicity rate for special case of the ridge condition with spreading and transform component
- Parameters
threshold_moment (float) – Moment required for calculating activity rate
id0 (np.ndarray) – Logical vector indicating the cells to which this condition applies
- Returns
Activity rates for cells corresponding to the hybrid ocean spreading ridge and oceanic transform condition
openquake.hmtk.strain.strain_utils module¶
Module openquake.hmtk.strain.utils
holds a set of useful
utility functions for the strain rate model calculations
- openquake.hmtk.strain.strain_utils.calculate_taper_function(obs_threshold_moment, sel_threshold_moment, corner_moment, beta)[source]¶
Calculates the tapering function of the tapered Gutenberg & Richter model: as described in Bird & Liu (2007):
taper_function = (M_0(M_T) / M_0(M_T^{CMT}))^-beta x exp((M_0(m_T^CMT) - M_0(m_T)) / M_0(m_c))
- Parameters
obs_threshold_moment (numpy.ndarray) – Moment of the threshold magnitude of the observed earthquake catalogue
sel_threshold_moment (numpy.ndarray) – Moment of the target magnitude
corner_momnet (float) – Corner moment of the Tapered Gutenberg-Richter Function
beta (float) – Beta value (b * ln(10.)) of the Tapered Gutenberg-Richter Function
- Returns
Relative moment rate
- openquake.hmtk.strain.strain_utils.moment_function(magnitude)[source]¶
Get moment (in Nm) from magnitude using Hanks & Kanamori (1979)
- Parameters
magnitude (float (or numpy.ndarray)) – Magnitude of event
- Returns
Seismic Moment in Nm
- openquake.hmtk.strain.strain_utils.moment_magnitude_function(moment)[source]¶
For a given moment, get the moment magnitude using the formula of Hanks & Kanamori (1979)
- :param float or numpy.ndarray magnitude
Seismic moment in Nm
- openquake.hmtk.strain.strain_utils.tapered_gutenberg_richter_cdf(moment, moment_threshold, beta, corner_moment)[source]¶
Tapered Gutenberg Richter Cumulative Density Function
- Parameters
moment (float or numpy.ndarray) – Moment for calculation of rate
moment_threshold (float or numpy.ndarray) – Threshold Moment of the distribution (moment rate essentially!)
beta (float) – Beta value (b * ln(10.)) of the Tapered Gutenberg-Richter Function
corner_momnet (float) – Corner moment of the Tapered Gutenberg-Richter Function
- Returns
Cumulative probability of moment release > moment
- openquake.hmtk.strain.strain_utils.tapered_gutenberg_richter_pdf(moment, moment_threshold, beta, corner_moment)[source]¶
Tapered Gutenberg-Richter Probability Density Function
- Parameters
moment (float or numpy.ndarray) – Moment for calculation of rate
moment_threshold (float or numpy.ndarray) – Threshold Moment of the distribution (moment rate essentially!)
beta (float) – Beta value (b * ln(10.)) of the Tapered Gutenberg-Richter Function
corner_momnet (float) – Corner moment of the Tapered Gutenberg-Richter Function
- Returns
Absolute probability of moment release > moment