openquake.hmtk.parsers.faults package

Submodules

openquake.hmtk.parsers.faults.fault_yaml_parser module

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

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

Bases: object

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

process_tectonic_regionalisation()[source]

Processes the tectonic regionalisation from the TOML file

read_fault_geometry(geo_dict, mesh_spacing=1.0)[source]

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

Parameters
  • geo_dict (dict) – Sub-dictionary of main fault dictionary containing only the geometry attributes

  • mesh_spacing (float) – Fault mesh spacing (km)

Returns

Instance of SimpleFaultGeometry or ComplexFaultGeometry, depending on typology

read_file(mesh_spacing=1.0)[source]

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

Parameters

mesh_spacing (float) – Fault mesh spacing (km)

openquake.hmtk.parsers.faults.fault_yaml_parser.get_scaling_relation_tuple(msr_dict)[source]

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

openquake.hmtk.parsers.faults.fault_yaml_parser.parse_tect_region_dict_to_tuples(region_dict)[source]

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