Learn R Programming

IRISMustangMetrics (version 2.4.7)

sampleRateRespMetric: Sample rate consistency between miniSEED and metadata

Description

The sampleRateRespMetric() function compares the miniSEED sample rate with the sample rate derived from the high-frequency corner of the channel's amplitude response.

Usage

sampleRateRespMetric(st,
                 resp_pct=15,
	         norm_freq=NULL,
                 evalresp=NULL)

Value

A list of lists is returned containing:

  • m1 = list of sample_rate_resp metric objects

Arguments

st

a Stream object containing a seismic signal

resp_pct

percentage by which the miniSEED and response-derived sample rates must agree to be considered a match

norm_freq

the normalization frequency at which the stationXML InstrumentSensitivity or dataless Stage 0 Sensitivity is valid, optional

evalresp

dataframe of freq, amp, phase information matching output of getEvalresp, optional

Author

Mary Templeton mary.templeton@earthscope.org

Details

Next the function retrieves the instrument response that corresponds with the start of the miniSEED time series, from frequencies one decade below the norm_freq through one decade above the miniSEED sampling frequency. The difference of the amplitude values,normalized for frequency spacing, are then scanned to find the first steep rolloff. The frequency associated with the maximum difference in the rolloff is stored as the empirical Nyquist frequency and multiplied by two to give the empirical response-derived sample rate. The function then compares this sample rate with the miniSEED sample rate to see whether both rates agree within resp_pct percent. The default percentage of 15 there is significant variations across instruments. If norm_freq or evalresp values are not provided, the code will retrieve values from EarthScope web services.

The sampleRateMetric function calculates and returns the following metrics:

sample_rate_resp -- "agreement between daily miniSEED and response-derived sample rates"

A boolean measurement that returns 0 if miniSEED and Response-derived sample rates agree within 15%, or 1 if they disagree. Response-derived sample rates assume that the high-frequency amplitude rolloff is ~85% of the Nyquist frequency.

See Also

SingleValueMetric

Examples

Run this code
  if (FALSE) {
# Open a connection to EarthScope webservices
iris <- new("IrisClient")

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

# Get channel-level metadata, sample rate and normalizaton frequency
meta <- IRISSeismic::getChannel(iris, "IU","ANMO","00","BHZ",starttime,endtime)
norm_freq <- meta$scalefreq
  
# Get the waveform
st <- IRISSeismic::getDataselect(iris,"IU","ANMO","00","BHZ",starttime,endtime)

# Calculate the sample rate metrics
list1 <- sampleRateRespMetric(st,resp_pct=15,norm_freq)
  }

Run the code above in your browser using DataLab