obspy.clients.earthworm.client.Client.get_waveforms¶
- Client.get_waveforms(network, station, location, channel, starttime, endtime, cleanup=True)[source]¶
Retrieves waveform data from Earthworm Wave Server and returns an ObsPy Stream object.
Parameters: - filename (str) Name of the output file.
- network (str) Network code, e.g. 'UW'.
- station (str) Station code, e.g. 'TUCA'.
- location (str) Location code, e.g. '--'.
- channel (str) Channel code, e.g. 'BHZ'. Last character (i.e. component) can be a wildcard (‘?’ or ‘*’) to fetch Z, N and E component.
- starttime (UTCDateTime) Start date and time.
- endtime (UTCDateTime) End date and time.
- cleanup (bool) Specifies whether perfectly aligned traces should be merged or not. See obspy.core.stream.Stream.merge() for method=-1.
Returns: ObsPy Stream object.
Example
>>> from obspy.clients.earthworm import Client >>> client = Client("pubavo1.wr.usgs.gov", 16022) >>> dt = UTCDateTime() - 2000 # now - 2000 seconds >>> st = client.get_waveforms('AV', 'ACH', '', 'EHE', dt, dt + 10) >>> st.plot() >>> st = client.get_waveforms('AV', 'ACH', '', 'EH*', dt, dt + 10) >>> st.plot()
(Source code, png, hires.png)