obspy.iris.client.Client.availability

Client.availability(network='*', station='*', location='*', channel='*', starttime=UTCDateTime(2012, 12, 11, 5, 24, 14, 930926), endtime=UTCDateTime(2012, 12, 11, 5, 24, 24, 930944), lat=None, lon=None, minradius=None, maxradius=None, minlat=None, maxlat=None, minlon=None, maxlon=None, output='bulkdataselect', restricted=False, filename=None, **kwargs)[source]

Low-level interface for availability Web service of IRIS (http://www.iris.edu/ws/availability/) - release 1.2.1 (2012-04-06).

This method returns information about what time series data is available at the IRIS DMC. Users can query for station metadata by network, station, channel, location, time and other search criteria. Results are may be formated in two formats: 'bulk' or 'xml'.

The ‘bulk’ formatted information can be passed directly to the bulkdataselect() method.

The XML format contains station locations as well as channel time range for availability().

Parameters:
  • network (str, optional) Network code, e.g. 'IU', wildcards allowed. Defaults to '*'.
  • station (str, optional) Station code, e.g. 'ANMO', wildcards allowed. Defaults to '*'.
  • location (str, optional) Location code, e.g. '00', wildcards allowed. Defaults to '*'. Use '--' for empty location codes.
  • channel (str, optional) Channel code, e.g. 'BHZ', wildcards allowed. Defaults to '*'.
  • restricted (bool, optional) If True, availability of restricted as well as unrestricted data is reported. Defaults to False.
  • starttime (UTCDateTime) Start date and time.
  • endtime (UTCDateTime) End date and time.
  • minlat (float, optional) Minimum latitude for rectangular bounding box.
  • minlon (float, optional) Minimum longitude for rectangular bounding box.
  • maxlat (float, optional) Maximum latitude for rectangular bounding box.
  • maxlon (float, optional) Maximum longitude for rectangular bounding box.
  • lat (float, optional) Latitude of center point for circular bounding area.
  • lon (float, optional) Longitude of center point for circular bounding area.
  • minradius (float, optional) Minimum radius for circular bounding area.
  • maxradius (float, optional) Maximum radius for circular bounding area.
  • output (str, optional) Output format, either "bulkdataselect" or "xml". Defaults to "bulkdataselect".
  • 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:

String that lists available channels, either as plaintext bulkdataselect format (output="bulkdataselect") or in XML format (output="xml") if no filename is given.

Note

For restricting data by geographical coordinates either:

  • all of minlat, maxlat, minlon and maxlon have to be specified for a rectangular bounding box, or
  • all of lat, lon, minradius and maxradius have to be specified for a circular bounding area

Example

>>> from obspy.iris import Client
>>> from obspy import UTCDateTime
>>> client = Client()
>>> t1 = UTCDateTime("2010-02-27T06:30:00")
>>> t2 = UTCDateTime("2010-02-27T06:40:00")
>>> result = client.availability("IU", "B*", "*", "BH*", t1, t2)
>>> print(result)
IU BBSR 00 BH1 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BBSR 00 BH2 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BBSR 00 BHZ 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BBSR 10 BHE 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BBSR 10 BHN 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BBSR 10 BHZ 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BILL 00 BHE 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BILL 00 BHN 2010-02-27T06:30:00 2010-02-27T06:40:00
IU BILL 00 BHZ 2010-02-27T06:30:00 2010-02-27T06:40:00
>>> st = client.bulkdataselect(result)
>>> print(st)  
9 Trace(s) in Stream:
IU.BBSR.00.BH1 | 2010-02-27T06:30:00... | 40.0 Hz, 24000 samples
IU.BBSR.00.BH2 | 2010-02-27T06:30:00... | 40.0 Hz, 24000 samples
IU.BBSR.00.BHZ | 2010-02-27T06:30:00... | 40.0 Hz, 24000 samples
IU.BBSR.10.BHE | 2010-02-27T06:30:00... | 40.0 Hz, 24000 samples
IU.BBSR.10.BHN | 2010-02-27T06:30:00... | 40.0 Hz, 24000 samples
IU.BBSR.10.BHZ | 2010-02-27T06:30:00... | 40.0 Hz, 24000 samples
IU.BILL.00.BHE | 2010-02-27T06:30:00... | 20.0 Hz, 12000 samples
IU.BILL.00.BHN | 2010-02-27T06:30:00... | 20.0 Hz, 12000 samples
IU.BILL.00.BHZ | 2010-02-27T06:30:00... | 20.0 Hz, 12000 samples

This Page