obspy.iris.client.Client.bulkdataselect

Client.bulkdataselect(bulk, quality=None, filename=None, minimumlength=None, longestonly=True)[source]

Low-level interface for bulkdataselect Web service of IRIS (http://www.iris.edu/ws/bulkdataselect/) - release 1.4.5 (2012-05-03).

This method returns multiple channels of time series data for specified time ranges. With this service you specify a list of selections composed of network, station, location, channel, starttime and endtime and the service streams back the selected raw waveform data as an ObsPy Stream object.

Simple requests with wildcards can be performed via getWaveform(). The list with channels can also be generated using availability().

Parameters:
  • bulk (str) List of channels to fetch as returned by availability(). Can be a filename with a text file in bulkdataselect compatible format or a string in the same format.
  • quality ('D', 'R', 'Q', 'M' or 'B', optional) Mini-SEED data quality indicator. 'M' and 'B' (default) are treated the same and indicate best available. If 'B' is selected, the output data records will be stamped with a M.
  • minimumlength (float, optional)

    Enforce minimum segment length - seconds. Only time-series segments of this length or longer will be returned. .. note:: No data will be returned for selected time windows

    shorter than minimumlength.
  • longestonly (bool, optional) Limit to longest segment only. For each time-series selection, only the longest segment is returned. Defaults to False.
  • filename (str, optional) Name of a output file. If this parameter is given nothing will be returned. Default is None.
Return type:

Stream or None

Returns:

ObsPy Stream object if no filename is given.

Example

>>> from obspy.iris import Client
>>> from obspy import UTCDateTime
>>> client = Client()
>>> req = []
>>> req.append("TA A25A -- BHZ 2010-084T00:00:00 2010-084T00:10:00")
>>> req.append("TA A25A -- BHN 2010-084T00:00:00 2010-084T00:10:00")
>>> req.append("TA A25A -- BHE 2010-084T00:00:00 2010-084T00:10:00")
>>> req = "\n".join(req) # use only a single backslash!
>>> print(req)
TA A25A -- BHZ 2010-084T00:00:00 2010-084T00:10:00
TA A25A -- BHN 2010-084T00:00:00 2010-084T00:10:00
TA A25A -- BHE 2010-084T00:00:00 2010-084T00:10:00
>>> st = client.bulkdataselect(req)
>>> print(st)  
3 Trace(s) in Stream:
TA.A25A..BHE | 2010-03-25T00:00:00.000001Z ... | 40.0 Hz, 24001 samples
TA.A25A..BHN | 2010-03-25T00:00:00.000000Z ... | 40.0 Hz, 24001 samples
TA.A25A..BHZ | 2010-03-25T00:00:00.000000Z ... | 40.0 Hz, 24000 samples

This Page