openquake.hmtk.faults package


openquake.hmtk.faults.active_fault_model module

Module openquake.hmtk.faults.active_fault_model.mtkActiveFaultModel implements a wrapper class for a set of active fault sources

class openquake.hmtk.faults.active_fault_model.mtkActiveFaultModel(identifier=None, name=None, faults=None)[source]

Bases: object

Class to define a compilation of active fault sources

  • id (str) – Identifier for the model
  • name (str) – Fault model name
  • faults (list) – Active faults as a list of tuples where each tuple is an instance of (openquake.hmtk.faults.fault_model.mtkActiveFault, [list of MFD configurations for that fault])
  • source_model – Instance of openquake.hmtk.source.source_model.mtkSourceModel class
build_fault_model(collapse=False, rendered_msr=<WC1994>, mfd_config=None)[source]

Constructs a full fault model with epistemic uncertainty by enumerating all the possible recurrence models of each fault as separate faults, with the recurrence rates multiplied by the corresponding weights.

  • collapse (bool) – Determines whether or not to collapse the branches
  • rendered_msr – If the option is taken to collapse the branches then a recurrence model for rendering must be defined
  • mfd_config (list/dict) – Universal list or dictionay of configuration parameters for the magnitude frequency distribution - will overwrite whatever is previously defined for the fault!

Returns the number of faults in the model

openquake.hmtk.faults.fault_geometries module

class openquake.hmtk.faults.fault_geometries.BaseFaultGeometry[source]

Bases: object

Abstract base class to support geometry parameters and methods


Returns the area of the fault surface

class openquake.hmtk.faults.fault_geometries.ComplexFaultGeometry(traces, mesh_spacing=1.0)[source]

Bases: openquake.hmtk.faults.fault_geometries.BaseFaultGeometry

Module openquake.hmtk.faults.fault_model.ComplexFaultGeometry describes the geometrical properties of a complex fault surface

  • typology (str) – Source typology
  • trace – Fault edges as list of instances of :class: openquake.hazardlib.geo.line.Line
  • dip (float) – Fault dip (degrees)
  • upper_depth (float) – Upper seismogenic depth (km)
  • lower_depth (float) – Lower seismogenic depth (km)
  • surface – Instance of :class: openquake.hazardlib.geo.surface.complex_fault.ComplexFaultSurface
  • length (float) – Along-strike length of fault (km)
  • width (float) – Down-dip width of fault (km)
  • area (float) – Length of fault (km)

Calculates the area of the complex fault from the surface mesh uses :class: openquake.hazardlib.surface.complex_fault.ComplexFaultSurface

class openquake.hmtk.faults.fault_geometries.SimpleFaultGeometry(trace, dip, upper_depth, lower_depth, mesh_spacing=1.0)[source]

Bases: openquake.hmtk.faults.fault_geometries.BaseFaultGeometry

Describes the geometrical propeties of a simple fault surface

  • typology (str) – Source typology
  • trace – Fault trace as instance of :class: openquake.hazardlib.geo.line.Line
  • dip (float) – Fault dip (degrees)
  • upper_depth (float) – Upper seismogenic depth (km)
  • lower_depth (float) – Lower seismogenic depth (km)
  • surface – Instance of :class: openquake.hazardlib.geo.surface.simple_fault.SimpleFaultSurface
  • length (float) – Along-strike length of fault (km)
  • width (float) – Down-dip width of fault (km)
  • area (float) – Length of fault (km)

Calculates the area of the fault (km ** 2.) as the product of length (km) and downdip width (km)

openquake.hmtk.faults.fault_models module

Module: openquake.hmtk.faults.fault_model implements the set of classes to allow for a calculation of the magnitude frequency distribution from the geological slip rate

class openquake.hmtk.faults.fault_models.RecurrenceBranch(area, slip, msr, rake, shear_modulus, disp_length_ratio=None, msr_sigma=0.0, weight=1.0)[source]

Bases: object

openquake.hmtk.faults.fault_model.RecurrenceBranch is an object to store a set of parameters for recurrence calculations and the corresponding total weight

  • branch_id (str) – Unique branch id
  • area (float) – Fault area (km ^ 2)
  • slip (float) – Fault slip rate (mm / yr)
  • msr – Magnitude scaling relation as instance of :class: openquake.hazardlib.scale_rel.base.BaseASR
  • rake (float) – Rake of fault (degrees)
  • shear_modulus (float) – Shear modulus of fault (GPa)
  • disp_length_ratio (float) – Displacement to length ratio of the fault
  • weight (float) – Weight of recurrence model branch
  • recurrence – Magnitude frquency distribution as instance of :class: openquake.hmtk.models.IncrementalMFD
  • max_mag (float) – Maximum magnitude from the magnitude frequency distribution
  • magnitudes (numpy.ndarray) – Magnitudes of MFD

Calculates the recurrence model for the given settings as an instance of the openquake.hmtk.models.IncrementalMFD

Parameters:config (dict) – Configuration settings of the magnitude frequency distribution.

Updates the weight by multiplying by the new weight

Parameters:new_weight (float) – Weight to be multiplied by existing weight
class openquake.hmtk.faults.fault_models.mtkActiveFault(identifier, name, geometry, slip_rate, rake, trt, aseismic=0.0, msr_sigma=None, neotectonic_fault=None, scale_rel=None, aspect_ratio=None, shear_modulus=None, disp_length_ratio=None)[source]

Bases: object

Main class to represent fault source

  • identifier (int) – Identifier Code
  • name (str) – Fault Name
  • geometry – Instance of openquake.hmtk.faults.fault_model.SimpleFaultGeometry or openquake.hmtk.faults.fault_model.ComplexFaultGeometry
  • slip_rate (list) – Slip rate (mm/yr) as list of tuples [(Value, Weight)]
  • aseismic (float) – Aseismic slip coefficient
  • rake (float) – Rake of the fault slip (degrees)
  • neotectonic_fault – Instance of openquake.hmtk.faults.faulted_earth.NeotectonicFault
  • trt (str) – Tectonic region type
  • scale_rel – Scaling relation as list of tuples [(:class: openquake.hazardlib.scalerel.base.BaseASR, Weight)]
  • aspect_ratio (float) – Aspect ratio on fault
  • mfd (tuple) – Tuple ([MFD], [Weight], [Scale_Rel]) defining the magnitude frequency distribution
  • shear_modulus (list) – Shear Modulus (GPa) as list of tuples [(Value, Weight)]
  • disp_length_ratio (list) – Displacement to length ratio as list of tuples [(Value, Weight)]
  • mfd_models (list) – Magnitude frequency distributions as list of instances of :class: openquake.hmtk.faults.fault_model.RecurrenceBranch
  • mfd_models – Magnitude frequency distributions as list of instances of :class: openquake.hmtk.models.IncrementalMFD
  • area (float) – Area of fault (km ^ 2)
  • config (dict) – Dictionary of configuration paramters for magnitude freuency distribution calculation
collapse_branches(mmin, bin_width, mmax)[source]

Collapse the logic tree branches into a single IncrementalMFD

  • mmin (float) – Minimum magnitude of reference mfd
  • bin_width (float) – Bin width of reference mfd
  • mmax (float) – Maximum magnitude of reference mfd



Generates a list of magnitude frequency distributions and renders as a tuple

Parameters:config (dict/list) – Configuration paramters of magnitude frequency distribution

Creates a resulting openquake.hmtk fault source set.

Returns:source_model - list of instances of either the :class: openquake.hmtk.sources.simple_fault_source.mtkSimpleFaultSource or :class: openquake.hmtk.sources.complex_fault_source.mtkComplexFaultSource model_weight - Corresponding weights for each source model
generate_recurrence_models(collapse=False, bin_width=0.1, config=None, rendered_msr=None)[source]

Iterates over the lists of values defining epistemic uncertainty in the parameters and calculates the corresponding recurrence model At present epistemic uncertainty is supported for: 1) slip rate, 2) magnitude scaling relation, 3) shear modulus, 4) displacement to length ratio) and 5) recurrence model.

  • config (list/dict) – List of MFD model configurations
  • collapse (bool) – Boolean flag indicating whether to collapse the logic tree branches
  • bin_width (float) – If collapsing the logic tree branches the reference mfd must be defined. The minimum and maximum magnitudes are updated from the model, but the bin width must be specified here
  • config – Configuration (or sets of configurations) of the recurrence calculations
  • rendered_msr – If collapsing the logic tree branches a resulting magnitude scaling relation must be defined as instance of :class: openquake.hazardlib.scalerel.base.BaseASR

Returns the number of mfd models for a given fault model

get_tectonic_regionalisation(regionalisation, region_type=None)[source]

Defines the tectonic region and updates the shear modulus, magnitude scaling relation and displacement to length ratio using the regional values, if not previously defined for the fault

  • regionalistion – Instance of the :class: openquake.hmtk.faults.tectonic_regionalisaion.TectonicRegionalisation
  • region_type (str) – Name of the region type - if not in regionalisation an error will be raised
select_catalogue(selector, distance, distance_metric='rupture', upper_eq_depth=None, lower_eq_depth=None)[source]

Select earthquakes within a specied distance of the fault

openquake.hmtk.faults.tectonic_regionalisation module

openquake.hmtk.regionalisation.tectonic_regionalisation implements openquake.hmtk.ancillary.tectonic_regionalisation.TectonicRegion, defining the methods and attributes associated with a region, and the openquake.hmtk.ancillary.tectonic_regionalisation.TectonicRegionalisation defining a regionalisation as a set of regions

class openquake.hmtk.faults.tectonic_regionalisation.TectonicRegion(identifier, name, shear_modulus=None, disp_length_ratio=None, scaling_rel=None)[source]

Bases: object

Definition of the tectonic region

class openquake.hmtk.faults.tectonic_regionalisation.TectonicRegionalisation[source]

Bases: object

Defines a set of regionalisations


Returns the number of tectonic regions in a regionalisation


Populates the tectonic region from the list of dictionaries, where each region is a dictionary of with the following format:

region = {'Shear_Modulus': [(val1, weight1), (val2, weight2), ...],
          'Displacement_Length_Ratio': [(val1, weight1), ...],
          'Magnitude_Scaling_Relation': [(val1, weight1), ...]}

Module contents