obspy.iris.client.Client.getWaveform

Client.getWaveform(network, station, location, channel, starttime, endtime, quality='B')[source]

Retrieves waveform data from IRIS and returns an ObsPy Stream object.

Parameters:
  • network (str) Network code, e.g. 'IU' or 'I*'. Network code may contain wild cards.
  • station (str) Station code, e.g. 'ANMO' or 'A*'. Station code may contain wild cards.
  • location (str) Location code, e.g. '00' or '*'. Location code may contain wild cards.
  • channel (str) Channel code, e.g. 'BHZ' or 'B*'. Channel code may contain wild cards.
  • starttime (UTCDateTime) Start date and time.
  • endtime (UTCDateTime) End date and time.
  • quality ('D', 'R', 'Q', 'M' or 'B', optional) Mini-SEED data quality indicator. 'M' and 'B' (default) are treated the same and indicate best available. If 'M' or 'B' are selected, the output data records will be stamped with a 'M'.
Returns:

ObsPy Stream object.

Examples

  1. Requesting waveform of a single channel.

    >>> from obspy.iris import Client
    >>> from obspy import UTCDateTime
    >>> client = Client()
    >>> t1 = UTCDateTime("2010-02-27T06:30:00.000")
    >>> t2 = UTCDateTime("2010-02-27T07:00:00.000")
    >>> st = client.getWaveform("IU", "ANMO", "00", "BHZ", t1, t2)
    >>> print(st)  
    1 Trace(s) in Stream:
    IU.ANMO.00.BHZ | 2010-02-27T06:30:00... | 20.0 Hz, 36001 samples
    
  2. Requesting waveforms of multiple channels using wildcard characters.

    >>> t1 = UTCDateTime("2010-084T00:00:00")
    >>> t2 = UTCDateTime("2010-084T00:30:00")
    >>> st = client.getWaveform("TA", "A25A", "", "BH*", t1, t2)
    >>> print(st)  
    3 Trace(s) in Stream:
    TA.A25A..BHE | 2010-03-25T00:00:00... | 40.0 Hz, 72001 samples
    TA.A25A..BHN | 2010-03-25T00:00:00... | 40.0 Hz, 72001 samples
    TA.A25A..BHZ | 2010-03-25T00:00:00... | 40.0 Hz, 72001 samples
    

This Page