Returns a list of all trace gaps/overlaps of the Stream object.
Parameters: |
|
---|
The returned list contains one item in the following form for each gap/ overlap: [network, station, location, channel, starttime of the gap, endtime of the gap, duration of the gap, number of missing samples]
Please be aware that no sorting and checking of stations, channels, ... is done. This method only compares the start- and endtimes of the Traces.
Example
Our example stream has no gaps:
>>> from obspy import read, UTCDateTime
>>> st = read()
>>> st.getGaps()
[]
>>> st.printGaps()
Source Last Sample ...
Total: 0 gap(s) and 0 overlap(s)
So let’s make a copy of the first trace and cut both so that we end up with a gappy stream:
>>> tr = st[0].copy()
>>> t = UTCDateTime("2009-08-24T00:20:13.0")
>>> st[0].trim(endtime=t)
<...Trace object at 0x...>
>>> tr.trim(starttime=t+1)
<...Trace object at 0x...>
>>> st.append(tr)
<...Stream object at 0x...>
>>> st.getGaps()
[['BW', 'RJOB', '', 'EHZ', UTCDateTime(2009, 8, 24, 0, 20, 13), ...
>>> st.printGaps()
Source Last Sample ...
BW.RJOB..EHZ 2009-08-24T00:20:13.000000Z ...
Total: 1 gap(s) and 0 overlap(s)