obspy.clients.iris.client.Client.resp

Client.resp(network, station, location='*', channel='*', starttime=None, endtime=None, filename=None, **kwargs)[source]

Low-level interface for resp Web service of IRIS (http://service.iris.edu/irisws/resp/) - 1.4.1 (2011-04-14).

This method provides access to channel response information in the SEED RESP format (as used by evalresp). Users can query for channel response by network, station, channel, location and time.

Parameters:
  • network (str) – Network code, e.g. 'IU'.

  • station (str) – Station code, e.g. 'ANMO'.

  • location (str, optional) – Location code, e.g. '00', wildcards allowed. Defaults to '*'.

  • channel (str, optional) – Channel code, e.g. 'BHZ', wildcards allowed. Defaults to '*'.

Temporal constraints

The following three parameters impose time constraints on the query. Time may be requested through the use of either time OR the start and end times. If no time is specified, then the current time is assumed.

Parameters:
  • time (UTCDateTime, optional) – Find the response for the given time. Time cannot be used with starttime or endtime parameters

  • starttime (UTCDateTime, optional) – Start time, may be used in conjunction with endtime.

  • endtime (UTCDateTime, optional) – End time, may be used in conjunction with starttime.

  • 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:

SEED RESP file as string if no filename is given..

Example

>>> from obspy.clients.iris import Client
>>> from obspy import UTCDateTime
>>> client = Client()
>>> dt = UTCDateTime("2010-02-27T06:30:00.000")
>>> data = client.resp("IU", "ANMO", "00", "BHZ", dt)
>>> print(data.decode())  
#
####################################################################...
#
B050F03     Station:     ANMO
B050F16     Network:     IU
B052F03     Location:    00
B052F04     Channel:     BHZ
...