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() - 1500 >>> st = client.get_waveforms("G", "FDFM", "00", "BHZ", t, t + 5) >>> print(st) 1 Trace(s) in Stream: G.FDFM.00.BHZ | 20... | 20.0 Hz, ... samples
Most servers support ‘?’ single-character wildcard in location and channel code fields:
>>> st = client.get_waveforms("G", "FDFM", "??", "B??", t, t + 5) >>> st = st.sort(reverse=True) >>> print(st) 6 Trace(s) in Stream: G.FDFM.10.BHZ | 20... | 20.0 Hz, ... samples G.FDFM.10.BHN | 20... | 20.0 Hz, ... samples G.FDFM.10.BHE | 20... | 20.0 Hz, ... samples G.FDFM.00.BHZ | 20... | 20.0 Hz, ... samples G.FDFM.00.BHN | 20... | 20.0 Hz, ... samples G.FDFM.00.BHE | 20... | 20.0 Hz, ... samples
Depending on server capabilities, ‘*’ multi-character wildcards might work in any parameter:
>>> st = client.get_waveforms("*", "FDFM", "*", "B*", t, t + 5) >>> st = st.sort(reverse=True) >>> print(st) 6 Trace(s) in Stream: G.FDFM.10.BHZ | 20... | 20.0 Hz, ... samples G.FDFM.10.BHN | 20... | 20.0 Hz, ... samples G.FDFM.10.BHE | 20... | 20.0 Hz, ... samples G.FDFM.00.BHZ | 20... | 20.0 Hz, ... samples G.FDFM.00.BHN | 20... | 20.0 Hz, ... samples G.FDFM.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 ‘*’ relies on the server supporting info requests on station or even channel level, see Client.get_info().
Parameters: - network (str) Network code. See note on wildcards above.
- station (str) Station code. See note on wildcards above.
- 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.