Learn R Programming

IRISMustangMetrics (version 2.4.6)

maxRangeMetric: 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)

Value

The function returns a list:

  • m1 = list of max_range metric objects

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

Author

Gillian Sharer gillian.sharer@earthscope.org

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.

See Also

SingleValueMetric

Examples

Run this code
  if (FALSE) {
# 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)
  }

Run the code above in your browser using DataLab