openquake.hmtk.parsers.catalogue package¶
Submodules¶
openquake.hmtk.parsers.catalogue.base module¶
Module openquake.hmtk.parsers.catalogue.base
defines an abstract base
class for CatalogueParser
.
openquake.hmtk.parsers.catalogue.csv_catalogue_parser module¶
Module openquake.hmtk.parsers.catalogue.csv_catalogue_parser
implements CsvCatalogueParser
.
- class openquake.hmtk.parsers.catalogue.csv_catalogue_parser.CsvCatalogueParser(input_file)[source]¶
Bases:
openquake.hmtk.parsers.catalogue.base.BaseCatalogueParser
CSV Catalogue Parser Class
- class openquake.hmtk.parsers.catalogue.csv_catalogue_parser.CsvCatalogueWriter(output_file)[source]¶
Bases:
openquake.hmtk.parsers.catalogue.base.BaseCatalogueWriter
Writes catalogue to csv file
- OUTPUT_LIST = ['eventID', 'Agency', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeError', 'longitude', 'latitude', 'SemiMajor90', 'SemiMinor90', 'ErrorStrike', 'depth', 'depthError', 'magnitude', 'sigmaMagnitude', 'magnitudeType']¶
- apply_purging(catalogue, flag_vector, magnitude_table)[source]¶
Apply all the various purging conditions, if specified.
- Parameters
catalogue – Earthquake catalogue as instance of
openquake.hmtk.seismicity.catalogue.Catalogue
flag_vector (numpy.array) – Boolean vector specifying whether each event is valid (therefore written) or otherwise
magnitude_table (numpy.ndarray) – Magnitude-time table specifying the year and magnitudes of completeness
- write_file(catalogue, flag_vector=None, magnitude_table=None)[source]¶
Writes the catalogue to file, purging events if necessary.
- Parameters
catalogue – Earthquake catalogue as instance of :class: openquake.hmtk.seismicity.catalogue.Catalogue
flag_vector (numpy.array) – Boolean vector specifying whether each event is valid (therefore written) or otherwise
magnitude_table (numpy.ndarray) – Magnitude-time table specifying the year and magnitudes of completeness
- class openquake.hmtk.parsers.catalogue.csv_catalogue_parser.CsvGCMTCatalogueWriter(output_file)[source]¶
Bases:
openquake.hmtk.parsers.catalogue.csv_catalogue_parser.CsvCatalogueWriter
Writes GCMT catalogue to csv file
- OUTPUT_LIST = ['eventID', 'centroidID', 'Agency', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeError', 'longitude', 'latitude', 'depth', 'depthError', 'magnitude', 'sigmaMagnitude', 'magnitudeType', 'moment', 'SemiMajor90', 'SemiMinor90', 'ErrorStrike', 'strike1', 'rake1', 'dip1', 'strike2', 'rake2', 'dip2', 'f_clvd', 'e_rel', 'eigenvalue_b', 'azimuth_b', 'plunge_b', 'eigenvalue_p', 'azimuth_p', 'plunge_p', 'eigenvalue_t', 'azimuth_t', 'plunge_t']¶
- apply_purging(catalogue, flag_vector, magnitude_table)[source]¶
Apply all the various purging conditions, if specified.
- Parameters
catalogue – Earthquake catalogue as instance of :class: openquake.hmtk.seismicity.catalogue.Catalogue:
flag_vector (numpy.array) – Boolean vector specifying whether each event is valid (therefore written) or otherwise
magnitude_table (numpy.ndarray) – Magnitude-time table specifying the year and magnitudes of completeness
- write_file(catalogue, flag_vector=None, magnitude_table=None)[source]¶
Writes the catalogue to file, purging events if necessary.
- Parameters
catalogue – Earthquake catalogue as instance of :class: openquake.hmtk.seismicity.catalogue.Catalogue
flag_vector (numpy.array) – Boolean vector specifying whether each event is valid (therefore written) or otherwise
magnitude_table (numpy.ndarray) – Magnitude-time table specifying the year and magnitudes of completeness
- class openquake.hmtk.parsers.catalogue.csv_catalogue_parser.GCMTCsvCatalogueParser(input_file)[source]¶
Bases:
openquake.hmtk.parsers.catalogue.csv_catalogue_parser.CsvCatalogueParser
openquake.hmtk.parsers.catalogue.gcmt_ndk_parser module¶
Parser for moment tensor catalogue in GCMT format into a set of GCMT classes
Module contents¶
Package openquake.hmtk.parsers.catalogue
contains base classes and
implementations of catalogue parsers.