obspy.earthworm.client.Client.getWaveform¶
- Client.getWaveform(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.earthworm import Client >>> client = Client("pele.ess.washington.edu", 16017) >>> dt = UTCDateTime(2013, 1, 17) - 2000 # now - 2000 seconds >>> st = client.getWaveform('UW', 'TUCA', '', 'BHZ', dt, dt + 10) >>> st.plot() >>> st = client.getWaveform('UW', 'TUCA', '', 'BH*', dt, dt + 10) >>> st.plot()