IRISMustangMetrics (version 2.3.0)

basicStatsMetric: 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 Stream object containing a seismic signal

Value

A list of SingleValueMetric objects is returned.

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.

Examples

Run this code
# NOT RUN {
  
# }
# 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)
  
# }

Run the code above in your browser using DataCamp Workspace