obspy.clients.fdsn.client.Client.get_stations_bulk
- Client.get_stations_bulk(bulk, level=None, includerestricted=None, includeavailability=None, filename=None, minlatitude=None, maxlatitude=None, minlongitude=None, maxlongitude=None, latitude=None, longitude=None, minradius=None, maxradius=None, updatedafter=None, matchtimeseries=None, format=None, **kwargs)[source]
Query the station service of the client. Bulk request.
Send a bulk request for stations to the server. bulk can either be specified as a filename, a file-like object or a string (with information formatted according to the FDSN standard) or a list of lists (each specifying network, station, location, channel, starttime and endtime). See examples and parameter description for more details.
bulk can be provided in the following forms:
As a list of lists. Each list item has to be list of network, station, location, channel, starttime and endtime.
As a valid request string/file as defined in the FDSNWS documentation. The request information can be provided as a..
a string containing the request information
a string with the path to a local file with the request
an open file handle (or file-like object) with the request
>>> client = Client("EARTHSCOPE") >>> t1 = UTCDateTime("2010-02-27T06:30:00.000") >>> t2 = t1 + 1 >>> t3 = t1 + 3 >>> bulk = [("IU", "ANMO", "*", "BHZ", t1, t2), ... ("IU", "AFI", "1?", "BHE", t1, t3), ... ("GR", "GRA1", "*", "BH*", t2, t3)] >>> inv = client.get_stations_bulk(bulk) >>> print(inv) Inventory created at ... Created by: IRIS WEB SERVICE: fdsnws-station | version: ...
Sending institution: IRIS-DMC (IRIS-DMC) Contains:
- Networks (2):
GR, IU
- Stations (2):
GR.GRA1 (GRAFENBERG ARRAY, BAYERN) IU.ANMO (Albuquerque, New Mexico, USA)
Channels (0):
>>> inv.plot()
(Source code, png)
>>> inv = client.get_stations_bulk(bulk, level="channel") >>> print(inv) Inventory created at ... Created by: IRIS WEB SERVICE: fdsnws-station | version: ...
Sending institution: IRIS-DMC (IRIS-DMC) Contains:
- Networks (2):
GR, IU
- Stations (2):
GR.GRA1 (GRAFENBERG ARRAY, BAYERN) IU.ANMO (Albuquerque, New Mexico, USA)
- Channels (5):
GR.GRA1..BHZ, GR.GRA1..BHN, GR.GRA1..BHE, IU.ANMO.00.BHZ, IU.ANMO.10.BHZ
>>> inv = client.get_stations_bulk("/tmp/request.txt") ... >>> print(inv) Inventory created at 2014-04-28T14:42:26.000000Z Created by: IRIS WEB SERVICE: fdsnws-station | version: 1.0.14 None Sending institution: IRIS-DMC (IRIS-DMC) Contains: Networks (2): GR IU Stations (2): GR.GRA1 (GRAFENBERG ARRAY, BAYERN) IU.ANMO (Albuquerque, New Mexico, USA) Channels (5): GR.GRA1..BHE, GR.GRA1..BHN, GR.GRA1..BHZ, IU.ANMO.00.BHZ, IU.ANMO.10.BHZ
- Parameters:
bulk (str, file or list[list]) – Information about the requested data. See above for details.
minlatitude (float) – Limit to stations with a latitude larger than the specified minimum.
maxlatitude (float) – Limit to stations with a latitude smaller than the specified maximum.
minlongitude (float) – Limit to stations with a longitude larger than the specified minimum.
maxlongitude (float) – Limit to stations with a longitude smaller than the specified maximum.
latitude (float) – Specify the latitude to be used for a radius search.
longitude (float) – Specify the longitude to be used for a radius search.
minradius (float) – Limit results to stations within the specified minimum number of degrees from the geographic point defined by the latitude and longitude parameters.
maxradius (float) – Limit results to stations within the specified maximum number of degrees from the geographic point defined by the latitude and longitude parameters.
level (str) – Specify the level of detail for the results (“network”, “station”, “channel”, “response”), e.g. specify “response” to get full information including instrument response for each channel.
includerestricted (bool) – Specify if results should include information for restricted stations.
includeavailability (bool) – Specify if results should include information about time series data availability.
updatedafter (
UTCDateTime
) – Limit to metadata updated after specified date; updates are data center specific.matchtimeseries (bool) – Only include data for which matching time series data is available.
filename (str or file) – If given, the downloaded data will be saved there instead of being parsed to an ObsPy object. Thus it will contain the raw data from the webservices.
format (str) – The format in which to request station information.
"xml"
(StationXML) or"text"
(FDSN station text format). XML has more information but text is much faster.
Any additional keyword arguments will be passed to the webservice as additional arguments. If you pass one of the default parameters and the webservice does not support it, a warning will be issued. Passing any non-default parameters that the webservice does not support will raise an error.