IRISMustangMetrics (version 2.3.0)

gapsMetric: Gaps and overlaps in a signal

Description

The gapsMetric() function calculates metrics associated with gaps and overlaps in a seismic signal, i.e. when st consists of more than one Trace.

Usage

gapsMetric(st)

Arguments

st

a Stream object containing a seismic signal

Value

A list of SingleValueMetric objects is returned.

Details

This function uses the output of the getGaps method of Stream objects to calculate the following metrics:

num_gaps:

number of gaps found in st

max_gap:

legnth of maximum gap (sec) found in st

num_overlaps:

number of overlaps found in st

max_overlap:

legnth of maximum overlap (sec) found in st

percent_availability:

percentage of total requested time for which a signal is available

The requestedStarttime and requestedEndtime slots for the Stream are used to determine gaps before the start of the first or after the end of the last Trace in the Stream.

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
# Open a connection to IRIS DMC webservices
iris <- new("IrisClient")

# Get the waveform
starttime <- as.POSIXct("2012-01-24", tz="GMT")
endtime <- as.POSIXct("2012-01-25", tz="GMT")
st <- getDataselect(iris,"AK","PIN","","BHZ",starttime,endtime)

# Calculate the gaps metrics and show the results
metricList <- gapsMetric(st)
dummy <- lapply(metricList, show)
  
# }

Run the code above in your browser using DataCamp Workspace