seismic.inventory.dataio package¶
Submodules¶
seismic.inventory.dataio.catalogcsv module¶
Lightweight reader for CSV seismic event catalogs, indexing the found events by event ID and station.
This was adapted for the speical use case of distance-to-event QA checks performed for ticket PST-340.
- class seismic.inventory.dataio.catalogcsv.CatalogCSV(event_folder, sampling_factor=1.0)[source]¶
Bases:
object
Lightweight parser for seismic event catalog.
Catalog is format as follows:
#EHB, 2005, 09, 16, 07, 28, 39.001, 126.93300, 4.18700, 2.90000, 28, 4.50, -999.00, -999.00, -999.00, 1, 134.3000, 1 FITZ, BHZ, , , , , , P , 2005, 09, 16, 07, 33, 37.00, 22.180 WR0 , BHZ, , , , , , P , 2005, 09, 16, 07, 34, 06.00, 25.130 KUM , BHZ, , , , , , P , 2005, 09, 16, 07, 35, 02.00, 26.220 MEEK, BHZ, , , , , , P , 2005, 09, 16, 07, 35, 04.00, 31.680 FORT, BHZ, , , , , , P , 2005, 09, 16, 07, 35, 32.00, 34.780 STKA, BHZ, , , , , , P , 2005, 09, 16, 07, 36, 04.00, 38.480 KSM , BHZ, , , , , , Pn, 2005, 09, 16, 07, 32, 39.00, 16.820 KAKA, BHZ, , , , , , P , 2005, 09, 16, 07, 33, 04.00, 17.660 FITZ, BHZ, , , , , , P , 2005, 09, 16, 07, 33, 36.00, 22.180 ...
The header row, which starts with ‘#’, indicates the number of phases listed in the subsequent lines of arrival data (28 in this example).
- seismic.inventory.dataio.catalogcsv.recursive_glob(treeroot, pattern)[source]¶
Generate a complete list of files matching pattern under the root of a directory hierarchy.
- Parameters
treeroot (str or pathlib.Path) – Path to the root of the directory tree.
pattern (str) – File name pattern to match, e.g. “*.csv”
- Returns
List of paths to the files matching the pattern, qualified relative to treeroot
- Return type
seismic.inventory.dataio.event_attrs module¶
- class seismic.inventory.dataio.event_attrs.Arrival(net, sta, loc, cha, lon, lat, elev, phase, utctime, distance)[source]¶
Bases:
object
Arrival of seismic event signal at other location
- class seismic.inventory.dataio.event_attrs.Event[source]¶
Bases:
object
Container for a seismic event with high level attributes.
- class seismic.inventory.dataio.event_attrs.Magnitude(mag, mag_type)[source]¶
Bases:
object
Seismic event magnitude
- class seismic.inventory.dataio.event_attrs.Origin(utctime, lat, lon, depthkm)[source]¶
Bases:
object
Container for seismic event origin (location) within the earth
- seismic.inventory.dataio.event_attrs.indentprint(x)¶