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).

get_events()[source]

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

epicenter()[source]

Get the epicenter attribute as (lat, long). Lat and long are in degrees.

Returns:

Location of the seismic event epicenter

Return type:

tuple(double, double)

location()[source]

Get the location attribute as (lat, long, depth). Lat and long are in degrees, depth is in km.

Returns:

Location of the seismic event origin

Return type:

tuple(float, float, float)

seismic.inventory.dataio.event_attrs.indentprint(x)

Module contents