obspy.clients.neic.client.Client.get_waveforms_nscl

Client.get_waveforms_nscl(seedname, starttime, duration)[source]

Gets a regular expression of channels from a start time for a duration in seconds. The regular expression must represent all characters of the 12-character NNSSSSSCCCLL pattern e.g. “US.....[BSHE]HZ..” is valid, but “US.....[BSHE]H” is not. Complex regular expressions are permitted “US.....BHZ..|CU.....[BH]HZ..”

Notes

For detailed information regarding the usage of regular expressions in the query, see also the documentation for CWBQuery (“CWBQuery.doc”) available at ftp://hazards.cr.usgs.gov/CWBQuery/. 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:
  • seedname (str) The 12 character seedname or 12 character regexp matching channels
  • start (UTCDateTime) The starting date/time to get
  • duration (float) The duration in seconds to get
Return type:

Stream

Returns:

Stream object with requested data

Example

>>> from obspy.clients.neic import Client
>>> from obspy import UTCDateTime
>>> client = Client()
>>> t = UTCDateTime() - 5 * 3600  # 5 hours before now
>>> st = client.get_waveforms_nscl("IUANMO BH.00", t, 10)
>>> print(st)  
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