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()
formethod=-1
.
- Returns:
ObsPy
Stream
object.
Example
>>> from obspy.clients.earthworm import Client >>> client = Client("pubavo1.wr.usgs.gov", 16022) >>> dt = UTCDateTime() - 15000 # now - 15000 seconds >>> st = client.get_waveforms('AV', 'AKV', '', 'BHE', dt, dt + 10) >>> st.plot() >>> st = client.get_waveforms('AV', 'AKV', '', 'BH*', dt, dt + 10) >>> st.plot()