obspy.clients.neic.client.Client.get_waveforms¶
-
Client.
get_waveforms
(network, station, location, channel, starttime, endtime)[source]¶ Gets a waveform for a specified net, station, location and channel from start time to end time. The individual elements can contain wildcard
"?"
representing one character, matches of character ranges (e.g.channel="BH[Z12]"
). All fields are left justified and padded with spaces to the required field width if they are too short. Use get_waveforms_nscl for seednames specified with regular expressions.Notes
Using
".*"
regular expression might or might not work. If the 12 character seed name regular expression is less than 12 characters it might get padded with spaces on the server side.Parameters: - network (str) – The 2 character network code or regular expression (will be padded with spaces to the right to length 2)
- station (str) – The 5 character station code or regular expression (will be padded with spaces to the right to length 5)
- location (str) – The 2 character location code or regular expression (will be padded with spaces to the right to length 2)
- channel (str) – The 3 character channel code or regular expression
- starttime (
UTCDateTime
) – Start date and time. - endtime (
UTCDateTime
) – End date and time.
Return type: Returns: Stream object with requested data
Example
>>> from obspy.clients.neic import Client >>> client = Client() >>> t = UTCDateTime() - 5 * 3600 # 5 hours before now >>> st = client.get_waveforms("IU", "ANMO", "0?", "BH?", t, t + 10) >>> print(st) # doctest: +ELLIPSIS 3 Trace(s) in Stream: IU.ANMO.00.BH... | 40.0 Hz, 401 samples IU.ANMO.00.BH... | 40.0 Hz, 401 samples IU.ANMO.00.BH... | 40.0 Hz, 401 samples