IRIS DMC MUSTANG metrics Web Service Documentation

ts_max_gap_total Maximum data gap found within the entire specified time span


This metric reports the maximum gap size in seconds encountered within the requested time period, calculated at query time. It calculates gaps in data availability based on information stored in the rapidly-accessible IRIS SEED and PH5 archive database indexes (ts_index), as returned by the and web services.

The ts_max_gap_total metric is currently a prototype that will eventually become a standard MUSTANG 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 – from start time to the end time of the request
Data SourceIRIS miniSEED archive database time series index (ts_index)

SEED Channel Types – All Time Series Channels


  • Assemble availability web service trace extents for the time duration on each matching N.S.L.C.
    total_duration = request_end_time - request_start_time;
  • For x entries/data segments returned,
    • Calculate time between segments:
      segdt(x) = endtime(x-1) – starttime(x)
    • Calculate the gap size:
      if ( segdt(x) > (1.5 / sample_rate) )
          gap(x) = segdt(x) - 1 / sample_rate
          gap(x) = 0
    • Find the maximum gap length for this total duration:
      max_gap(x) = max( (gap(x)>0), max_gap(x-1) )

Metric Values Returned

value – maximum gap length expressed in seconds
target – the trace analyzed, labeled as N.S.L.C.Q (Network.Station.Location.Channel.Quality)
start – beginning of the date requested (UTC)
end – end of the date requested (UTC)
lddateUTC 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.


  • Robert Casey


See Also