- Client.timeseries(network, station, location, channel, starttime, endtime, filter=, filename=None, output='miniseed', **kwargs)¶
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.
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.
- 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".
- Calculate the envelope of the time series. This calculation uses a Hilbert transform approximated by a time domain filter.
- 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".
- 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".
- Band pass frequencies, in Hz, e.g. "bp=0.1,1.0".
- Remove mean value from data.
- 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.
- Scale data samples by the inverse of the specified factor, e.g "divscale=2.0". You cannot specify both scale and divscale.
- 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.
- 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.
- 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.
- 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.
- Differentiate using 2 point (uncentered) method
- Integrate using trapezoidal (midpoint) method
- 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.
- 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.
- Data format, 1 column (values)
- ASCII data format, 2 columns (time, value)
- Same as ascii2
- audio WAV file
- IRIS MiniSEED format
- A simple plot of the time series
- SAC, ASCII format
- SAC, binary big-endian format
- SAC, binary little-endian format
Stream or None
ObsPy Stream object if no filename is given.
>>> 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.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.data) [ -1.57488682e-06 -1.26318002e-06 -7.84807128e-07 ...