obspy.clients.fdsn.routing.eidaws_routing_client.EIDAWSRoutingClient
- class EIDAWSRoutingClient(url='http://www.orfeus-eu.org/eidaws/routing/1', include_providers=None, exclude_providers=None, debug=False, timeout=120, **kwargs)[source]
Bases:
obspy.clients.fdsn.routing.routing_client.BaseRoutingClient
Routing client for the EIDAWS routing service.
http://www.orfeus-eu.org/data/eida/webservices/routing/
For waveform queries it will first launch a station query, get the station information at each data center with additional constraints (e.g. latitude/longitude/…) and use that information for the final waveform query. This means that with ObsPy the EIDA routing client behaves very similar to the IRIS federator routing client.
Attributes
Public Methods
Return a semantic version number of the remote service as a string. |
|
Get stations from multiple data centers. |
|
Bulk station download from multiple stations. |
|
Get waveforms from multiple data centers. |
|
Get waveforms from multiple data centers. |
Private Methods
Warning
Private methods are mainly for internal/developer use and their API might change without notice.
- EIDAWSRoutingClient._download(url, params=None, filename=None, data=None)
Download the URL with GET or POST and the chosen parameters.
Will call the
_handle_requests_http_error()
method if the response comes back with an HTTP code other than 200. Returns the response object if successful andfilename
is not given - if given it will save the response to the specified file and returnNone
.By default it will send a GET request - if data is given it will send a POST request.
- Parameters
url (str) – The URL to download from.
params (dict) – Additional URL parameters.
filename (str or file-like object) – String or file like object. Will download directly to the file. If specified, this function will return nothing.
data (dict, bytes, or file-like object) – If specified, a POST request will be sent with the data in the body of the request.
- Returns
The response object assuming
filename
isNone
.- Return type
- EIDAWSRoutingClient._download_parallel(split, data_type, **kwargs)
- EIDAWSRoutingClient._download_stations(split, **kwargs)
- EIDAWSRoutingClient._download_waveforms(split, **kwargs)
- EIDAWSRoutingClient._expand_providers(providers)
- EIDAWSRoutingClient._filter_requests(split)
Filter requests based on including and excluding providers.
- Parameters
split (dict) – A dictionary containing the desired routing.
- EIDAWSRoutingClient._handle_requests_http_error(r)
This assumes the same error code semantics as the base fdsnws web services.
Please overwrite this method in a child class if necessary.
- static EIDAWSRoutingClient._split_routing_response(data)[source]
Splits the routing responses per data center for the EIDAWS output.
Returns a dictionary with the keys being the root URLs of the fdsnws endpoints and the values the data payloads for that endpoint.
- Parameters
data – The return value from the EIDAWS routing service.
Special Methods
- EIDAWSRoutingClient.__delattr__(name, /)
Implement delattr(self, name).
- EIDAWSRoutingClient.__dir__()
Default dir() implementation.
- EIDAWSRoutingClient.__eq__(value, /)
Return self==value.
- EIDAWSRoutingClient.__format__(format_spec, /)
Default object formatter.
- EIDAWSRoutingClient.__ge__(value, /)
Return self>=value.
- EIDAWSRoutingClient.__getattribute__(name, /)
Return getattr(self, name).
- EIDAWSRoutingClient.__gt__(value, /)
Return self>value.
- EIDAWSRoutingClient.__hash__()
Return hash(self).
- EIDAWSRoutingClient.__init__(url='http://www.orfeus-eu.org/eidaws/routing/1', include_providers=None, exclude_providers=None, debug=False, timeout=120, **kwargs)[source]
Initialize an EIDAWS router client.
All parameters except
url
are passed on to theBaseRoutingClient
parent class- Parameters
url (str) – The URL of the routing service.
- EIDAWSRoutingClient.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- EIDAWSRoutingClient.__le__(value, /)
Return self<=value.
- EIDAWSRoutingClient.__lt__(value, /)
Return self<value.
- EIDAWSRoutingClient.__ne__(value, /)
Return self!=value.
- EIDAWSRoutingClient.__new__(**kwargs)
- EIDAWSRoutingClient.__reduce__()
Helper for pickle.
- EIDAWSRoutingClient.__reduce_ex__(protocol, /)
Helper for pickle.
- EIDAWSRoutingClient.__repr__()
Return repr(self).
- EIDAWSRoutingClient.__setattr__(name, value, /)
Implement setattr(self, name, value).
- EIDAWSRoutingClient.__sizeof__()
Size of object in memory, in bytes.
- EIDAWSRoutingClient.__str__()
Return str(self).
- EIDAWSRoutingClient.__subclasshook__()
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).