obspy.io.sh.evt._read_evt

_read_evt(filename, encoding='utf-8', **kwargs)[source]

Read a SeismicHandler EVT file and returns an ObsPy Catalog object.

Warning

This function should NOT be called directly, it registers via the ObsPy read_events() function, call this instead.

Parameters:

encoding (str) – encoding used (default: utf-8)

Return type:

Catalog

Returns:

An ObsPy Catalog object.

Note

The following fields are supported by this function: [‘applied filter’, ‘component’, ‘depth (km)’, ‘distance (deg)’, ‘error ellipse major’, ‘error ellipse minor’, ‘error ellipse strike’, ‘error in depth (km)’, ‘error in latitude (km)’, ‘error in longitude (km)’, ‘error in origin time’, ‘event id’, ‘event type’, ‘latitude’, ‘longitude’, ‘magnitude (M?)’, ‘mean magnitude (M?)’, ‘no. of stations used’, ‘onset time’, ‘onset type’, ‘origin time’, ‘phase flags’, ‘phase name’, ‘pick type’, ‘sign’, ‘source region’, ‘station code’, ‘theo. azimuth (deg)’, ‘weight’].

Compare with http://www.seismic-handler.org/wiki/ShmDocFileEvt

The following parameters deal with the problem, that the format only stores station names for the picks, but the Pick object expects a SEED id. The SEED id is looked up for every pick by the following procedure:

  1. look at seedid_map for a direct station name match and use the specified template

  2. if 1 did not succeed, look if the station is present in inventory and use its first channel as template

  3. if 1 and 2 did not succeed, use specified default template (default_seedid)

Parameters:
  • inventory (Inventory) – Inventory used to retrieve network code, location code and channel code of stations (SEED id).

  • seedid_map (dict) – Default templates for each station (example: seedid_map={‘MOX’: ‘GR.{}..HH{}’). The values must contain three dots and two {} which are substituted by station code and component.

  • default_seedid (str) – Default SEED id template. The value must contain three dots and two {} which are substituted by station code and component.

  • warn (bool) – Whether or not to warn on failed look ups (no matching data found or ambiguous results) in the inventory