| basicStatsMetric {IRISMustangMetrics} | R Documentation |
Min, median, mean, rms variance, max, and number of unique values of a signal
Description
The basicStatsMetric() function calculates the min, median, mean, max, rmsVariance and number of unique values for
the input seismic signal.
Usage
basicStatsMetric(st)
Arguments
st |
a |
Details
This metric applies the min, median, mean and max methods of Stream objects
to the st parameter to calculate the following metrics:
-
sample_min -
sample_median -
sample_mean -
sample_max -
sample_rms
It also calculates length(unique(stmerged@traces[[1]]@data)), where stmerged is the st parameter after mergeTraces is applied to it, for the following metric:
-
sample_unique
Any error messages generated in the process will pass through untrapped.
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, inclusiveEnd=FALSE)
# Calculate some metrics and show the results
metricList <- basicStatsMetric(st)
dummy <- lapply(metricList, show)
## End(Not run)