maxRangeMetric: Maximum daily sample range calculated over a rolling window

View source: R/maxRangeMetric.R

maxRangeMetricR Documentation

Maximum daily sample range calculated over a rolling window

Description

This metric calculates the difference between the largest and smallest sample value in a 5-minute rolling window and returns the largest value encountered within a 24-hour timespan.

Usage

maxRangeMetric(st,
               window=300,
               increment=150)

Arguments

st

a Stream object containing a seismic signal

window

number of seconds over which to evaluate the minimum and maximum sample values

increment

number of seconds to advance the window for each max_range calculation

Details

For a time series passed as a Stream object, this function calculates differences between largest and smallest amplitudes in a series of (default) 300-second windows, incrementing the window by (default) 150 seconds for each difference calculated. It reports the largest difference as the max_range.

Value

The function returns a list:

  • m1 = list of max_range metric objects

Author(s)

Gillian Sharer gillian.sharer@earthscope.org

See Also

SingleValueMetric

Examples

  ## Not run: 
# Open a connection to IRIS DMC webservices
iris <- new("IrisClient")

starttime <- as.POSIXct("2019-08-01",tz="GMT")
endtime <- as.POSIXct("2019-08-02",tz="GMT")

# Get the waveform
st <- getDataselect(iris,"IU","ANMO","00","BHZ",starttime,endtime)

# Calculate the max_range metric
tempList <- maxRangeMetric(st)
  
## End(Not run)

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