Learn R Programming

IRISMustangMetrics (version 2.4.6)

upDownTimesMetric: Up/down times for a channel

Description

The upDownTimesMetric() function determines the times at which data collection starts and stops within a seismic Stream.

Usage

upDownTimesMetric(st, min_signal, min_gap)

Value

A list with a single MultipleTimeValueMetric object is returned.

Arguments

st

a Stream object containing a seismic signal

min_signal

minimum duration of a Trace in seconds (default=30)

min_gap

minimum gap in seconds (default=60)

Author

Jonathan Callahan jonathan@mazamascience.com

Details

This function uses the output of the getUpDownTimes method of Stream objects.

See Also

getUpDownTimes

Examples

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

starttime <- as.POSIXct("2012-01-24", tz="GMT")
endtime <- as.POSIXct("2012-01-25", tz="GMT")

# Get the waveform
st <- getDataselect(iris,"AK","PIN","","BHZ",starttime,endtime)

# Create the upDownTimesMetric, ignoring Traces < 3 minutes and gaps of < 5 minutes
metricList <- upDownTimesMetric(st, min_signal=180, min_gap=300)
  }

Run the code above in your browser using DataLab