obspy.iris.client.Client.event

Client.event(filename=None, **kwargs)[source]

Low-level interface for event Web service of IRIS (http://www.iris.edu/ws/event/) - release 1.2.1 (2012-02-29).

This method returns contributed earthquake origin and magnitude estimates stored in the IRIS database. Selected information is returned in QuakeML format.

The IRIS DMC receives earthquake location and magnitude information primarily from the USGS NEIC and the ISC, other sources include the Global CMT project and the USArray ANF.

Geographic constraints - bounding rectangle

The following four parameters work together to specify a boundary rectangle. All four parameters are optional, but they may not be mixed with the parameters used for searching within a defined radius.

Parameters:
  • minlat (float, optional) Specify the southern boundary. The minimum latitude must be between -90 and 90 degrees inclusive (and less than or equal to maxlat). If not specified, then this value defaults to -90.
  • maxlat (float, optional) Specify the northern boundary. The maximum latitude must be between -90 and 90 degrees inclusive and greater than or equal to minlat. If not specified, then this value defaults to 90.
  • minlon (float, optional) Specify the western boundary. The minimum longitude must be between -180 and 180 degrees inclusive. If not specified, then this value defaults to -180. If minlon > maxlon, then the boundary will cross the -180/180 meridian
  • maxlon (float, optional) Specify the eastern boundary. The minimum longitude must be between -180 and 180 degrees inclusive. If not specified, then this value defaults to +180. If maxlon < minlon, then the boundary will cross the -180/180 meridian

Geographic constraints - bounding radius

The following four parameters work together to specify a boundary using a radius around a coordinate. lat, lon, and maxradius are all required, and must be used together. These parameters are incompatible with the boundary-box parameters described above.

Parameters:
  • lat (float, optional) Specify the central latitude point, in degrees. This value must be between -90 and 90 degrees. This MUST be used in conjunction with the lon and maxradius parameters.
  • lon (float, optional) Specify the central longitude point, in degrees. This MUST be used in conjunction with the lat and maxradius parameters.
  • maxradius (float, optional) Specify the maximum radius, in degrees. Only earthquakes within maxradius degrees of the lat/lon point will be retrieved. This MUST be used in conjunction with the lat and lon parameters.
  • minradius (float, optional) This optional parameter allows for the exclusion of events that are closer than minradius degrees from the specified lat/lon point. This MUST be used in conjunction with the lat, lon, and maxradius parameters and is subject to the same restrictions. If this parameter isn’t specified, then it defaults to 0.0 degrees.

Depth constraints

Parameters:
  • mindepth (float, optional) Specify minimum depth (kilometers), values increase positively with depth, e.g. -1.
  • maxdepth (float, optional) Specify maximum depth (kilometers), values increase positively with depth, e.g. 20.

Temporal constraints

The following two parameters impose time constrants on the query.

Parameters:
  • starttime (UTCDateTime, optional) Limit results to the events occurring after the specified start time.
  • endtime (UTCDateTime, optional) Limit results to the events occurring before the specified end time.

Magnitude constraints

Parameters:
  • minmag (float, optional) Specify a minimum magnitude.
  • maxmag (float, optional) Specify a maximum magnitude.
  • magtype (string, optional) Specify magnitude type. Some common types (there are many) include "Ml" (local/Richter magnitude), "Ms" (surface magnitude), "mb" (body wave magnitude), "Mw" (moment magnitude).

Subset the data by organization

Parameters:
  • catalog (string, optional) Specify a catalog [available catalogs]. Results will include any origins which contain the specified catalog text, i.e. "PDE" will match "NEIC PDE"
  • contributor (string, optional) Specify a contributor [available contributors]. When selecting a contributor, the result includes a preferred origin as specified by the contributor. Results will include any origins which contain the specified contributor text, i.e. "NEIC" will match "NEIC PDE-Q".

Specifying an event using an IRIS ID number

Individual events can be retrieved using ID numbers assigned by IRIS. When these parameters are used, then only the includeallmagnitudes and preferredonly parameters are also allowed.

Parameters:
  • eventid (int, optional) Retrieve an event based on the unique IRIS event id.
  • originid (int, optional) Retrieve an event based on the unique IRIS origin id.
  • magnitudeid (int, optional) Retrieve an event based on the unique IRIS magnitude id.

Miscellaneous parameters

These parameters affect how the search is conducted, and how the events are returned.

Parameters:
  • limit (int, optional) Limit the results to the specified number of events. This value must be 10 or greater. By default, the results are not limited.
  • orderby ("time" or "magnitude", optional) Sort the resulting events in order of descending time or magnitude. By default, results are sorted in descending time order.
  • updatedafter (UTCDateTime, optional) Select origins updated after a certain date. This is most useful for synchronization purposes.
  • includeallmagnitudes (bool, optional) This will include all the magnitudes in search and print criteria. If magnitudes do not exist for a certain origin, the search algorithm will consider it a miss and therefore will not include the event. Defaults to True.
  • includearrivals (bool, optional) If this event has associated phase arrival information, then it will be included in the results. Defaults to False.
  • preferredonly (bool, optional) Include preferred estimates only. When catalog is selected, the result returned will include the preferred origin as specified by the catalog. Defaults to True.
  • filename (str, optional) Name of a output file. If this parameter is given nothing will be returned. Default is None.
Return type:

str or None

Returns:

QuakeML formated string if no filename is given.

Example

>>> from obspy.iris import Client
>>> client = Client()
>>> events = client.event(minmag=9.1)
>>> print(events)  
<q:quakeml xmlns:q="http://quakeml.org/xmlns/quakeml/1.2" ...

This Page