# obspy.clients.iris.client.Client.timeseries¶

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

Low-level interface for timeseries Web service of IRIS (http://service.iris.edu/irisws/timeseries/)- release 1.3.5 (2012-06-07).

This method fetches segments of seismic data and returns data formatted in either MiniSEED, ASCII or SAC. It can optionally filter the data.

Channel and temporal constraints (required)

The four SCNL parameters (Station - Channel - Network - Location) are used to determine the channel of interest, and are all required. Wildcards are not accepted.

Parameters: network (str) Network code, e.g. 'IU'. station (str) Station code, e.g. 'ANMO'. location (str) Location code, e.g. '00' channel (str) Channel code, e.g. 'BHZ'. starttime (UTCDateTime) Start date and time. endtime (UTCDateTime) End date and time.

Filter Options

The following parameters act as filters upon the time series.

Parameters: filter (list of str, optional) Filter list. List order matters because each filter operation is performed in the order given. For example filter=["demean", "lp=2.0"] will demean and then apply a low-pass filter, while filter=["lp=2.0", "demean"] will apply the low-pass filter first, and then demean. "taper=WIDTH,TYPE" Apply a time domain symmetric tapering function to the time series data. The width is specified as a fraction of the trace length from 0 to 0.5. The window types HANNING (default), HAMMING, or COSINE may be optionally followed, e.g. "taper=0.25" or "taper=0.5,COSINE". "envelope=true" Calculate the envelope of the time series. This calculation uses a Hilbert transform approximated by a time domain filter. "lp=FREQ" Low-pass filter the time-series using an IIR 4th order filter, using this value (in Hertz) as the cutoff, e.g. "lp=1.0". "hp=FREQ" High-pass filter the time-series using an IIR 4th order filter, using this value (in Hertz) as the cutoff, e.g. "hp=3.0". "bp=FREQ1,FREQ2" Band pass frequencies, in Hz, e.g. "bp=0.1,1.0". "demean" Remove mean value from data. "scale" Scale data samples by specified factor, e.g. "scale=2.0" If "scale=AUTO", the data will be scaled by the stage-zero gain. Cannot specify both scale and divscale. Cannot specify both correct and scale=AUTO. "divscale" Scale data samples by the inverse of the specified factor, e.g "divscale=2.0". You cannot specify both scale and divscale. "correct" Apply instrument correction to convert to earth units. Uses either deconvolution or polynomial response correction. Cannot specify both correct and scale=AUTO. Correction on > 10^7 samples will result in an error. At a sample rate of 20 Hz, 10^7 samples is approximately 5.8 days. "freqlimits=FREQ1,FREQ2,FREQ3,FREQ4" Specify an envelope for a spectrum taper for deconvolution, e.g. "freqlimits=0.0033,0.004,0.05,0.06". Frequencies are specified in Hertz. This cosine taper scales the spectrum from 0 to 1 between FREQ1 and FREQ2 and from 1 to 0 between FREQ3 and FREQ4. Can only be used with the correct option. Cannot be used in combination with the autolimits option. "autolimits=X,Y" Automatically determine frequency limits for deconvolution, e.g. "autolimits=3.0,3.0". A pass band is determined for all frequencies with the lower and upper corner cutoffs defined in terms of dB down from the maximum amplitude. This algorithm is designed to work with flat responses, i.e. a response in velocity for an instrument which is flat to velocity. Other combinations will likely result in unsatisfactory results. Cannot be used in combination with the freqlimits option. "units=UNIT" Specify output units. Can be DIS, VEL, ACC or DEF, where DEF results in no unit conversion, e.g. "units=VEL". Option units can only be used with correct. "diff" Differentiate using 2 point (uncentered) method "int" Integrate using trapezoidal (midpoint) method "decimate=SAMPLERATE" Specify the sample-rate to decimate to, e.g. "decimate=2.0". The sample-rate of the source divided by the given sample-rate must be factorable by 2,3,4,7.

Miscelleneous options

Parameters: filename (str, optional) Name of a output file. If this parameter is given nothing will be returned. Default is None. output (str, optional) Output format if parameter filename is used. 'ascii' Data format, 1 column (values) 'ascii2' ASCII data format, 2 columns (time, value) 'ascii' Same as ascii2 'audio' audio WAV file 'miniseed' IRIS MiniSEED format 'plot' A simple plot of the time series 'saca' SAC, ASCII format 'sacbb' SAC, binary big-endian format 'sacbl' SAC, binary little-endian format Stream or None ObsPy Stream object if no filename is given.

Example

>>> from obspy.clients.iris import Client
>>> from obspy import UTCDateTime
>>> dt = UTCDateTime("2005-01-01T00:00:00")
>>> client = Client()
>>> st = client.timeseries("IU", "ANMO", "00", "BHZ", dt, dt+10)
>>> print(st[0].data)
[  24   20   19   19   19   15   10    4   -4  -11 ...
>>> st = client.timeseries("IU", "ANMO", "00", "BHZ", dt, dt+10,
...     filter=["correct", "demean", "lp=2.0"])
>>> print(st[0].data)
[ -1.57488682e-06  -1.26318002e-06  -7.84807128e-07 ...