IRIS DMC MUSTANG metrics Web Service Documentation

num_gaps Number of data gaps in a day


This metric reports the number of gaps encountered within a 24-hour window based on analysis of the time series. Measurements for num_gaps are updated regularly, but represent the gap count at the time the measurement was made (lddate). For an instantaneous gap count calculated at query time, see ts_num_gaps.


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 or IRIS PH5 archive

SEED Channel Types – ?H?, ?L?, ?N?, ?G?, ?P?, VM? | High Gain, Low Gain, Accelerometer, Gravimeter, Geophone, Mass Channels


  • Request 24 hours of data for a single N.S.L.C.
  • Request the data sample rate, defining an overlap as smaller than one sample interval.
  • 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 data segments returned,
    • Calculate end time of each data segment:
      endtime(x) = starttime(x) + ( (num_samples(x) – 1) / sample_rate)
    • Calculate gap lengths between segments:
      gap(x) = endtime(x-1) – starttime(x)
    • Count the number of gaps for the segments – if the beginning of one data segment lags the day boundary or previous segment’s end time by more than one sample interval, it is a gap:
      num_gaps = count(gap(x) > 0)

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 – date/time the measurement was made and loaded into the MUSTANG database (UTC)


Gaps are currently not measured across day boundaries. A gap crossing a day boundary is treated as two separate gaps for purposes of counting gaps.


See Also