gapsMetric: Gaps and overlaps in a signal

View source: R/gapsMetric.R

gapsMetricR Documentation

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

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.

Value

A list of SingleValueMetric objects is returned.

Note

See the seismic package for documentation on Stream objects and the getDataselect method.

Author(s)

Jonathan Callahan jonathan@mazamascience.com

Examples

  ## 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)
  
## End(Not run)

IRISMustangMetrics documentation built on Aug. 22, 2023, 9:11 a.m.