openquake.hmtk.parsers.faults package


openquake.hmtk.parsers.faults.fault_yaml_parser module

Module: openquake.hmtk.parsers.fault.fault_yaml_parser implements parser of a fault model from the Yaml format

class openquake.hmtk.parsers.faults.fault_yaml_parser.FaultYmltoSource(filename)[source]

Bases: object

Class to parse a fault model definition from Yaml format to a fault model class


Processes the tectonic regionalisation from the yaml file

read_fault_geometry(geo_dict, mesh_spacing=1.0)[source]

Creates the fault geometry from the parameters specified in the dictionary.

  • geo_dict (dict) – Sub-dictionary of main fault dictionary containing only the geometry attributes
  • mesh_spacing (float) – Fault mesh spacing (km)

Instance of SimpleFaultGeometry or ComplexFaultGeometry, depending on typology


Reads the file and returns an instance of the FaultSource class.

Parameters:mesh_spacing (float) – Fault mesh spacing (km)

For a dictionary of scaling relation values convert string list to object list and then to tuple


Parses the tectonic regionalisation dictionary attributes to tuples

openquake.hmtk.parsers.faults.fault_yaml_parser.weight_list_to_tuple(data, attr_name)[source]

Converts a list of values and corresponding weights to a tuple of values

Module contents