| gapsMetric {IRISMustangMetrics} | R 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 |
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
stmax_gap:legnth of maximum gap (sec) found in
stnum_overlaps:number of overlaps found in
stmax_overlap:legnth of maximum overlap (sec) found in
stpercent_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)