obspy.io.seiscomp.event._read_sc3ml

_read_sc3ml(filename, id_prefix='smi:org.gfz-potsdam.de/geofon/')[source]

Read a SC3ML file and returns a Catalog.

An XSLT file is used to convert the SC3ML file to a QuakeML file. The catalog is then generated using the QuakeML module.

This function should NOT be called directly, it registers via the the write() method of an ObsPy Catalog object, call this instead.

Parameters:
  • filename (str) SC3ML file to be read.
  • id_prefix (str) ID prefix. SC3ML does not enforce any particular ID restriction, this ID prefix allows to convert the IDs to a well formatted QuakeML ID. You can modify the default ID prefix with the reverse DNS name of your institute.
Return type:

Catalog

Returns:

An ObsPy Catalog object.

Example

>>> from obspy import read_events
>>> cat = read_events('/path/to/iris_events.sc3ml')
>>> print(cat)
2 Event(s) in Catalog:
2011-03-11T05:46:24.120000Z | +38.297, +142.373
2006-09-10T04:26:33.610000Z |  +9.614, +121.961