obspy.neic.client.Client.getWaveform

Client.getWaveform(network, station, location, channel, starttime, endtime)[source]

Gets a waveform for a specified net, station, location and channel from starttime to endtime. 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 getWaveformNSCL 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:

Stream

Returns:

Stream object with requested data

Example

>>> from obspy.neic import Client
>>> client = Client()
>>> t = UTCDateTime() - 5 * 3600  # 5 hours before now
>>> st = client.getWaveform("IU", "ANMO", "0?", "BH?", t, t + 10)
>>> print st  
3 Trace(s) in Stream:
IU.ANMO.00.BH... | 20.0 Hz, 201 samples
IU.ANMO.00.BH... | 20.0 Hz, 201 samples
IU.ANMO.00.BH... | 20.0 Hz, 201 samples

This Page