obspy.clients.seedlink.basic_client.Client.get_waveforms¶
- Client.get_waveforms(network, station, location, channel, starttime, endtime)[source]¶
Request waveform data from the seedlink server.
>>> from obspy import UTCDateTime >>> client = Client('rtserver.ipgp.fr') >>> t = UTCDateTime() - 3600 >>> st = client.get_waveforms("G", "FDF", "00", "BHZ", t, t + 5) >>> print(st) 1 Trace(s) in Stream: G.FDF.00.BHZ | 20... | 20.0 Hz, ... samples
Most servers support ‘?’ single-character wildcard in location and channel code fields:
>>> st = client.get_waveforms("G", "FDF", "??", "B??", t, t + 5) >>> st = st.sort(reverse=True) >>> print(st) 3 Trace(s) in Stream: G.FDF.00.BHZ | 20... | 20.0 Hz, ... samples G.FDF.00.BHN | 20... | 20.0 Hz, ... samples G.FDF.00.BHE | 20... | 20.0 Hz, ... samples
Note
Support of wildcards strongly depends on the queried seedlink server. In general, ‘?’ as single character wildcard seems to work well in location code and channel code fields for most servers. Usage of ‘*’ for multiple characters in location and channel code field is not supported. No wildcards are supported in network and station code fields by ObsPy.
Parameters: - network (str) Network code. No wildcards supported by ObsPy.
- station (str) Station code. No wildcards supported by ObsPy.
- location (str) Location code. See note on wildcards above.
- channel (str) Channel code. See note on wildcards above.
- starttime (UTCDateTime) Start time of requested time window.
- endtime (UTCDateTime) End time of requested time window.