obspy.clients.filesystem.tsindex.Client._are_timespans_adjacent

Client._are_timespans_adjacent(ts1, ts2, sample_rate, tolerance=0.5)[source]

Checks whether or not two time span named tuples (e.g. NameTuple(earliest, latest)) are adjacent within a given tolerance.

Parameters:
  • ts1 (NamedTuple) Earliest timespan.
  • ts2 (NamedTuple) Latest timespan.
  • sample_rate (int) Sensor sample rate.
  • tolerance (float) Tolerance in seconds to determine whether a adjacent timespan should be merged.