View source: R/maxRangeMetric.R
maxRangeMetric | R Documentation |
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.
maxRangeMetric(st,
window=300,
increment=150)
st |
a |
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 |
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.
The function returns a list:
m1
= list of max_range
metric objects
Gillian Sharer gillian.sharer@earthscope.org
SingleValueMetric
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.