IRIS DMC MUSTANG metrics Web Service Documentation

ts_num_gaps Number of gaps in a day calculated at query time


This metric reports the number of gaps encountered within a 24-hour window calculated at query time. It counts gaps based on information stored in the rapidly-accessible IRIS SEED and PH5 archive database indexes (ts_index), as returned by the or the web service.

In contrast, the standard MUSTANG num_gaps metric retrieves and analyzes the archived time series in order to count gaps, which is a much slower process. Measurements for num_gaps calculated according to a schedule and updated regularly, but their values reflect the completeness of the archive when the measurement was made (lddate) rather than at query time.

The ts_num_gaps metric is currently a prototype that will eventually replace the standard MUSTANG num_gaps metric.


Data gaps can indicate problems with data transmission configuration or performance, power cycling or other equipment down time, or data loss after transmission. The metric can also be used to cull data that is not continuous enough for certain research applications.

Data Analyzed

Traces – one N.S.L.C (Network.Station.Location.Channel) per measurement
Window – 24 hours starting at 00:00:00 UTC
Data SourceIRIS miniSEED archive database time series index (ts_index)

SEED Channel Types – All Time Series Channels


  • Request availability web service trace extents for 24 hours of a single N.S.L.C.
  • Assume that missing data at the beginning of the day is a gap that begins at the day boundary and ends when the data begins.
  • Assume that missing data at the end of the day is a gap that begins after the last data sample and ends at the day boundary.
  • For x entries/data segments returned,
    • Calculate end time of each data segment:
      endtime(x) = starttime(x) + ( (num_samples(x) – 1) / sample_rate)
    • Calculate time between segments:
      segdt(x) = endtime(x-1) – starttime(x)
    • Count the number of gaps for the segments – if the end of one data segment lags the day boundary or next segment’s start time by more than one and a half sample intervals, it is a gap:
      num_gaps = count(gap(x) > 1.5/sample_rate)

Metric Values Returned

value – daily number of gaps
target – the trace analyzed, labeled as N.S.L.C.Q (Network.Station.Location.Channel.Quality)
start – beginning of the data day requested (00:00:00 UTC)
end – end of the data day requested (truncated as 23:59:59 UTC)
lddate – local date/time the measurement was made


If the user specified end date does not include hour:min:sec, then it defaults to 00:00:00.

If the requested start time is earlier than the metadata start time for the station-channel, the first 24-hour day returned will be 00:00:00-23:59:59 UTC for the day the metadata begins.

If the requested end time is later than the metadata end time for the station-channel, the last 24-hour day returned will be 00:00:00-23:59:59 UTC for the day the metadata ends.


  • Robert Casey


See Also