openquake.hmtk.faults.mfd package

Submodules

openquake.hmtk.faults.mfd.anderson_luco_arbitrary module

Module :mod: mfd.anderson_luco_1_mmax implements :class: AndersonLucoType1Mmax. This calculates the magnitude occurrence rate on a fault given a known slip value using the exponential models described by Anderson & Luco (1983) referring to the whole fault area.

Anderson, J. G., and Luco, J. E. (1983) “Consequences of slip rate constraints on earthquake recurrence relations”. Bull. Seis. Soc. Am. 73(2) 471 - 496

class openquake.hmtk.faults.mfd.anderson_luco_arbitrary.AndersonLucoArbitrary[source]

Bases: openquake.hmtk.faults.mfd.base.BaseMFDfromSlip

Class to implement the fault activity rate calculators of Anderson & Luco (1983) referring to the whole fault

Parameters
  • mfd_type (str) – Type of magnitude frequency distribution

  • mfd_weight (float) – Weight of the mfd distribution (for subsequent logic tree processing)

  • bin_width (float) – Width of the magnitude bin (rates are given for the centre point)

  • mmin (float) – Minimum magnitude

  • mmax (float) – Maximum magnitude

  • mmax_sigma (float) – Uncertainty on maximum magnitude

  • b_value (float) – Exponent (b-value) for the magnitude frequency distribution

  • occurrence_rate (numpy.ndarray) – Activity rates for magnitude in the range mmin to mmax in steps of bin_width

get_mfd(slip, area, shear_modulus=30.0)[source]

Calculates activity rate on the fault

Parameters
  • slip (float) – Slip rate in mm/yr

  • fault_area – Width of the fault (km)

  • shear_modulus (float) – Shear modulus of the fault (GPa)

Returns

  • Minimum Magnitude (float)

  • Bin width (float)

  • Occurrence Rates (numpy.ndarray)

get_mmax(mfd_conf, msr, rake, area)[source]

Gets the mmax for the fault - reading directly from the config file or using the msr otherwise

Parameters
  • mfd_config (dict) – Configuration file (see setUp for paramters)

  • msr – Instance of nhlib.scalerel

  • rake (float) – Rake of the fault (in range -180 to 180)

  • area (float) – Area of the fault surface (km^2)

setUp(mfd_conf)[source]

Input core configuration parameters as specified in the configuration file

Parameters

mfd_conf (dict) – Configuration file containing the following attributes: * ‘Type’ - Choose between the 1st, 2nd or 3rd type of recurrence model {‘First’ | ‘Second’ | ‘Third’} * ‘Model_Weight’ - Logic tree weight of model type (float) * ‘MFD_spacing’ - Width of MFD bin (float) * ‘Minimum_Magnitude’ - Minimum magnitude of activity rates (float) * ‘b_value’ - Tuple of (b-value, b-value uncertainty) * ‘Maximum_Magnitude’ - Maximum magnitude on fault (if not defined will use scaling relation) * ‘Maximum_Magnitude_Uncertainty’ - Uncertainty on maximum magnitude (If not defined and the MSR has a sigma term then this will be taken from sigma)

class openquake.hmtk.faults.mfd.anderson_luco_arbitrary.BaseRecurrenceModel[source]

Bases: object

Abstract base class to implement cumulative value formula

abstract cumulative_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the rate of earthquakes with M > mag_value

Parameters
  • slip_moment (float) – Product of slip (cm/yr) * Area (cm ^ 2) * shear_modulus (dyne-cm)

  • mmax (float) – Maximum magnitude

  • mag_value (float) – Magnitude value

  • bbar (float) – ar{b} parameter (effectively = b * log(10.))

  • dbar (float) – ar{d} parameter

abstract incremental_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the incremental rate of earthquakes with M = mag_value

class openquake.hmtk.faults.mfd.anderson_luco_arbitrary.Type1RecurrenceModel[source]

Bases: openquake.hmtk.faults.mfd.anderson_luco_arbitrary.BaseRecurrenceModel

Calculate N(M > mag_value) using Anderson & Luco Type 1 formula as inverse of formula I.5 of Table 2 in Anderson & Luco (1993).

cumulative_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the rate of events with M > mag_value

Parameters
  • slip_moment (float) –

  • slip_moment – Product of slip (cm/yr) * Area (cm ^ 2) * shear_modulus (dyne-cm)

  • mmax (float) – Maximum magnitude

  • mag_value (float) – Magnitude value

  • bbar (float) – ar{b} parameter (effectively = b * log(10.))

  • dbar (float) – ar{d} parameter

incremental_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the incremental rate of earthquakes with M = mag_value

class openquake.hmtk.faults.mfd.anderson_luco_arbitrary.Type2RecurrenceModel[source]

Bases: openquake.hmtk.faults.mfd.anderson_luco_arbitrary.BaseRecurrenceModel

Calculate N(M > mag_value) using Anderson & Luco Type 1 formula as inverse of formula II.5 of Table 3 in Anderson & Luco (1993).

cumulative_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the rate of events with M > mag_value

Parameters
  • slip_moment (float) – Product of slip (cm/yr) * Area (cm ^ 2) * shear_modulus (dyne-cm)

  • mmax (float) – Maximum magnitude

  • mag_value (float) – Magnitude value

  • bbar (float) – ar{b} parameter (effectively = b * log(10.))

  • dbar (float) – ar{d} parameter

incremental_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the incremental rate with Mmax = Mag_value

class openquake.hmtk.faults.mfd.anderson_luco_arbitrary.Type3RecurrenceModel[source]

Bases: openquake.hmtk.faults.mfd.anderson_luco_arbitrary.BaseRecurrenceModel

Calculate N(M > mag_value) using Anderson & Luco Type 1 formula as inverse of formula III.5 of Table 4 in Anderson & Luco (1993).

cumulative_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the rate of events with M > mag_value

Parameters
  • slip_moment (float) – Product of slip (cm/yr) * Area (cm ^ 2) * shear_modulus (dyne-cm)

  • mmax (float) – Maximum magnitude

  • mag_value (float) – Magnitude value

  • bbar (float) – ar{b} parameter (effectively = b * log(10.))

  • dbar (float) – ar{d} parameter

incremental_value(slip_moment, mmax, mag_value, bbar, dbar)[source]

Returns the incremental rate with Mmax = Mag_value

openquake.hmtk.faults.mfd.anderson_luco_area_mmax module

Module :mod: mfd.anderson_luco_1_mmax implements :class: AndersonLucoType1Mmax. This calculates the magnitude occurrence rate on a fault given a known slip value using the exponential models described by Anderson & Luco (1983) referring to the rupture area of the maximum earthquake.

Anderson, J. G., and Luco, J. E. (1983) “Consequences of slip rate constraints on earthquake recurrence relations”. Bull. Seis. Soc. Am. 73(2) 471 - 496

class openquake.hmtk.faults.mfd.anderson_luco_area_mmax.AndersonLucoAreaMmax[source]

Bases: openquake.hmtk.faults.mfd.base.BaseMFDfromSlip

Class to implement the 1st fault activity rate calculator of Anderson & Luco (1983)

Parameters
  • mfd_type (str) – Type of magnitude frequency distribution

  • mfd_weight (float) – Weight of the mfd distribution (for subsequent logic tree processing)

  • bin_width (float) – Width of the magnitude bin (rates are given for the centre point)

  • mmin (float) – Minimum magnitude

  • mmax (float) – Maximum magnitude

  • mmax_sigma (float) – Uncertainty on maximum magnitude

  • b_value (float) – Exponent (b-value) for the magnitude frequency distribution

  • occurrence_rate (numpy.ndarray) – Activity rates for magnitude in the range mmin to mmax in steps of bin_width

get_mfd(slip, fault_width, shear_modulus=30.0, disp_length_ratio=1.25e-05)[source]

Calculates activity rate on the fault

Parameters
  • slip (float) – Slip rate in mm/yr

  • fault_width – Width of the fault (km)

  • shear_modulus (float) – Shear modulus of the fault (GPa)

  • disp_length_ratio (float) – Displacement to length ratio (dimensionless)

Returns

  • Minimum Magnitude (float)

  • Bin width (float)

  • Occurrence Rates (numpy.ndarray)

get_mmax(mfd_conf, msr, rake, area)[source]

Gets the mmax for the fault - reading directly from the config file or using the msr otherwise

Parameters
  • mfd_config (dict) – Configuration file (see setUp for paramters)

  • msr – Instance of :class: nhlib.scalerel

  • rake (float) – Rake of the fault (in range -180 to 180)

  • area (float) – Area of the fault surface (km^2)

setUp(mfd_conf)[source]

Input core configuration parameters as specified in the configuration file

Parameters

mfd_conf (dict) – Configuration file containing the following attributes: * ‘Type’ - Choose between the 1st, 2nd or 3rd type of recurrence model {‘First’ | ‘Second’ | ‘Third’} * ‘Model_Weight’ - Logic tree weight of model type (float) * ‘MFD_spacing’ - Width of MFD bin (float) * ‘Minimum_Magnitude’ - Minimum magnitude of activity rates (float) * ‘b_value’ - Tuple of (b-value, b-value uncertainty) * ‘Maximum_Magnitude’ - Maximum magnitude on fault (if not defined will use scaling relation) * ‘Maximum_Magnitude_Uncertainty’ - Uncertainty on maximum magnitude (If not defined and the MSR has a sigma term then this will be taken from sigma)

class openquake.hmtk.faults.mfd.anderson_luco_area_mmax.BaseRecurrenceModel[source]

Bases: object

Abstract base class to implement cumulative value formula

abstract cumulative_value(slip, mmax, mag_value, bbar, dbar, beta)[source]

Returns the rate of earthquakes with M > mag_value

class openquake.hmtk.faults.mfd.anderson_luco_area_mmax.Type1RecurrenceModel[source]

Bases: openquake.hmtk.faults.mfd.anderson_luco_area_mmax.BaseRecurrenceModel

Calculate N(M > mag_value) using Anderson & Luco Type 1 formula as inverse of formula I.10 of Table 2 in Anderson & Luco (1993).

cumulative_value(slip, mmax, mag_value, bbar, dbar, beta)[source]

Returns the rate of events with M > mag_value

Parameters
  • slip (float) – Slip rate in mm/yr

  • mmax (float) – Maximum magnitude

  • mag_value (float) – Magnitude value

  • bbar (float) – ar{b} parameter (effectively = b * log(10.))

  • dbar (float) – ar{d} parameter

  • beta (float) – Beta value of formula defined in Eq. 20 of Anderson & Luco (1983)

class openquake.hmtk.faults.mfd.anderson_luco_area_mmax.Type2RecurrenceModel[source]

Bases: openquake.hmtk.faults.mfd.anderson_luco_area_mmax.BaseRecurrenceModel

Calculate N(M > mag_value) using Anderson & Luco Type 1 formula as inverse of formula II.9 of Table 3 in Anderson & Luco (1993).

cumulative_value(slip, mmax, mag_value, bbar, dbar, beta)[source]

Returns the rate of events with M > mag_value

Parameters
  • slip (float) – Slip rate in mm/yr

  • mmax (float) – Maximum magnitude

  • mag_value (float) – Magnitude value

  • bbar (float) – ar{b} parameter (effectively = b * log(10.))

  • dbar (float) – ar{d} parameter

  • beta (float) – Beta value of formula defined in Eq. 20 of Anderson & Luco (1983)

class openquake.hmtk.faults.mfd.anderson_luco_area_mmax.Type3RecurrenceModel[source]

Bases: openquake.hmtk.faults.mfd.anderson_luco_area_mmax.BaseRecurrenceModel

Calculate N(M > mag_value) using Anderson & Luco Type 1 formula as inverse of formula III.9 of Table 4 in Anderson & Luco (1993).

cumulative_value(slip, mmax, mag_value, bbar, dbar, beta)[source]

Returns the rate of events with M > mag_value

Parameters
  • slip (float) – Slip rate in mm/yr

  • mmax (float) – Maximum magnitude

  • mag_value (float) – Magnitude value

  • bbar (float) – ar{b} parameter (effectively = b * log(10.))

  • dbar (float) – ar{d} parameter

  • beta (float) – Beta value of formula defined in Eq. 20 of Anderson & Luco (1983)

openquake.hmtk.faults.mfd.base module

Module mfd.base defines an abstract base classes for BaseMFDfromSlip>

class openquake.hmtk.faults.mfd.base.BaseMFDfromSlip[source]

Bases: object

Base class for calculating magnitude frequency distribution from a given slip value

abstract get_mfd()[source]

Calculates the magnitude frequency distribution

abstract get_mmax(mfd_conf, msr, rake, area)[source]

Gets the mmax for the fault - reading directly from the config file or using the msr otherwise

abstract setUp(mfd_conf)[source]

Initialises the parameters from the mfd type

to_evenly_discretized_mfd()[source]

Returns the activity rate as an instance of the :class: openquake.hazardlib.mfd.evenly_discretized.EvenlyDiscretizedMFD

openquake.hmtk.faults.mfd.characteristic module

Module :mod: openquake.hmtk.faults.mfd.characteristic implements :class:Characteristic the simple characteristic earthquake calculator of recurrence.

class openquake.hmtk.faults.mfd.characteristic.Characteristic[source]

Bases: openquake.hmtk.faults.mfd.base.BaseMFDfromSlip

Class to implement the characteristic earthquake model assuming a truncated Gaussian distribution

Parameters
  • mfd_model (str) – Type of magnitude frequency distribution

  • mfd_weight (float) – Weight of the mfd distribution (for subsequent logic tree processing)

  • bin_width (float) – Width of the magnitude bin (rates are given for the centre point)

  • mmin (float) – Minimum magnitude

  • mmax (float) – Maximum magnitude

  • mmax_sigma (float) – Uncertainty on maximum magnitude

  • lower_bound (float) – Lower bound of Gaussian distribution (as number of standard deviations)

  • upper_bound (float) – Upper bound of Gaussian distribution (as number of standard deviations)

  • sigma (float) – Standard deviation (in magnitude units) of the Gaussian distribution

  • occurrence_rate (numpy.ndarray) – Activity rates for magnitude in the range mmin to mmax in steps of bin_width

get_mfd(slip, area, shear_modulus=30.0)[source]

Calculates activity rate on the fault

Parameters
  • slip (float) – Slip rate in mm/yr

  • fault_width – Width of the fault (km)

  • disp_length_ratio (float) – Displacement to length ratio (dimensionless)

  • shear_modulus (float) – Shear modulus of the fault (GPa)

Returns

  • Minimum Magnitude (float)

  • Bin width (float)

  • Occurrence Rates (numpy.ndarray)

get_mmax(mfd_conf, msr, rake, area)[source]

Gets the mmax for the fault - reading directly from the config file or using the msr otherwise

Parameters
  • mfd_config (dict) – Configuration file (see setUp for paramters)

  • msr – Instance of :class: nhlib.scalerel

  • rake (float) – Rake of the fault (in range -180 to 180)

  • area (float) – Area of the fault surface (km^2)

setUp(mfd_conf)[source]

Input core configuration parameters as specified in the configuration file

Parameters

mfd_conf (dict) – Configuration file containing the following attributes: * ‘Model_Weight’ - Logic tree weight of model type (float) * ‘MFD_spacing’ - Width of MFD bin (float) * ‘Minimum_Magnitude’ - Minimum magnitude of activity rates (float) * ‘Maximum_Magnitude’ - Characteristic magnituded (float) (if not defined will use scaling relation) * ‘Maximum_Magnitude_Uncertainty’ - Uncertainty on maximum magnitude (If not defined and the MSR has a sigma term then this will be taken from sigma) * ‘Lower_Bound’ - Lower bound in terms of number of sigma (float) * ‘Upper_Bound’ - Upper bound in terms of number of sigma (float) * ‘Sigma’ - Standard deviation (in magnitude units) of distribution

openquake.hmtk.faults.mfd.youngs_coppersmith module

Module :mod: openquake.hmtk.faults.mfd.youngs_coppersmith implements class YoungsCoppersmithExponential and YoungsCoppersmithCharacteristic, the exponential and characteristic forms of the Youngs & Coppersmith (1985) models for calculating earthquake recurrence from slip rate

Youngs, R. R., and Coppersmith, K., J. (1985) “Implications of Fault Slip Rates and Earthquake Recurrence Models to Probabilistic Seismic Hazard Estimates” Bull. Seis. Soc. Am. 75(4) 939 - 964

class openquake.hmtk.faults.mfd.youngs_coppersmith.YoungsCoppersmithCharacteristic[source]

Bases: openquake.hmtk.faults.mfd.base.BaseMFDfromSlip

Calculates the activity rate on a fault with a given slip assuming the characteristic model described in Youngs & Coppersmith (1985) Eqs. 16 and 17

Parameters
  • mfd_type (str) – Type of magnitude frequency distribution

  • mfd_weight (float) – Weight of the mfd distribution (for subsequent logic tree processing)

  • bin_width (float) – Width of the magnitude bin (rates are given for the centre point)

  • mmin (float) – Minimum magnitude

  • mmax (float) – Maximum magnitude

  • mmax_sigma (float) – Uncertainty on maximum magnitude

  • b_value (float) – Exponent (b-value) for the exponential magnitude frequency distribution

  • b_value_sigma (float) – Uncertainty on exponent (b-value) for the magnitude frequency distribution

  • occurrence_rate (numpy.ndarray) – Activity rates for magnitude in the range mmin to mmax in steps of bin_width

  • model – Maintains present instance of :class: YoungsCoppersmith1985MFD

get_mfd(slip, area, shear_modulus=30.0)[source]

Calculates activity rate on the fault

Parameters
  • slip (float) – Slip rate in mm/yr

  • area – Area of the fault (km)

  • shear_modulus (float) – Shear modulus of the fault (GPa)

Returns

  • Minimum Magnitude (float)

  • Bin width (float)

  • Occurrence Rates (numpy.ndarray)

Behavioural Notes: To use the openquake.hazardlib implementation the magnitudes returned will be the mid_point of the bins and not the original edge points. The minimum magnitude is update to reflect this!

get_mmax(mfd_conf, msr, rake, area)[source]

Gets the mmax for the fault - reading directly from the config file or using the msr otherwise

Parameters
  • mfd_config (dict) – Configuration file (see setUp for paramters)

  • msr – Instance of :class: nhlib.scalerel

  • rake (float) – Rake of the fault (in range -180 to 180)

  • area (float) – Area of the fault surface (km^2)

setUp(mfd_conf)[source]

Input core configuration parameters as specified in the configuration file

Parameters

mfd_conf (dict) – Configuration file containing the following attributes: * ‘Model_Weight’ - Logic tree weight of model type (float) * ‘MFD_spacing’ - Width of MFD bin (float) * ‘Minimum_Magnitude’ - Minimum magnitude of activity rates (float) * ‘b_value’ - Tuple of (b-value, b-value uncertainty) * ‘Maximum_Magnitude’ - Characteristic magnitude on fault (if not defined, will use scaling relation) * ‘Maximum_Magnitude_Uncertainty’ - Uncertainty on maximum magnitude (If not defined and the MSR has a sigma term then this will be taken from sigma)

class openquake.hmtk.faults.mfd.youngs_coppersmith.YoungsCoppersmithExponential[source]

Bases: openquake.hmtk.faults.mfd.base.BaseMFDfromSlip

Calculates the activity rate on a fault with a given slip assuming the exponential model described in Youngs & Coppersmith (1985) Eq. 11

Parameters
  • mfd_model (str) – Type of magnitude frequency distribution

  • mfd_weight (float) – Weight of the mfd distribution (for subsequent logic tree processing)

  • bin_width (float) – Width of the magnitude bin (rates are given for the centre point)

  • mmin (float) – Minimum magnitude

  • mmax (float) – Maximum magnitude

  • mmax_sigma (float) – Uncertainty on maximum magnitude

  • b_value (float) – Exponent (b-value) for the magnitude frequency distribution

  • b_value_sigma (float) – Uncertainty on exponent (b-value) for the magnitude frequency distribution

  • occurrence_rate (numpy.ndarray) – Activity rates for magnitude in the range mmin to mmax in steps of bin_width

cumulative_value(mag_val, moment_rate, beta, moment_mag)[source]

Calculates the cumulative rate of events with M > m0 using equation 11 of Youngs & Coppersmith (1985)

Parameters
  • mag_val (float) – Magnitude

  • moment_rate (float) – Moment rate on fault (in Nm) from slip rate

  • beta (float) – Exponent (b log(10)

  • moment_mag (float) – Moment of the upper bound magnitude

get_mfd(slip, area, shear_modulus=30.0)[source]

Calculates activity rate on the fault

Parameters
  • slip (float) – Slip rate in mm/yr

  • area – Width of the fault (km)

  • shear_modulus (float) – Shear modulus of the fault (GPa)

Returns

  • Minimum Magnitude (float)

  • Bin width (float)

  • Occurrence Rates (numpy.ndarray)

get_mmax(mfd_conf, msr, rake, area)[source]

Gets the mmax for the fault - reading directly from the config file or using the msr otherwise

Parameters
  • mfd_config (dict) – Configuration file (see setUp for parameters)

  • msr – Instance of :class: nhlib.scalerel

  • rake (float) – Rake of the fault (in range -180 to 180)

  • area (float) – Area of the fault surface (km^2)

setUp(mfd_conf)[source]

Input core configuration parameters as specified in the configuration file

Parameters

mfd_conf (dict) – Configuration file containing the following attributes: * ‘Model_Weight’ - Logic tree weight of model type (float) * ‘MFD_spacing’ - Width of MFD bin (float) * ‘Minimum_Magnitude’ - Minimum magnitude of activity rates (float) * ‘b_value’ - Tuple of (b-value, b-value uncertainty) * ‘Maximum_Magnitude’ - Maximum magnitude on fault (if not defined will use scaling relation) * ‘Maximum_Magnitude_Uncertainty’ - Uncertainty on maximum magnitude (If not defined and the MSR has a sigma term then this will be taken from sigma)

Module contents

openquake.hmtk.faults.mfd.get_available_mfds()[source]

Returns an ordered dictionary with the available GSIM classes keyed by class name