transferFunctionSpectra {IRISSeismic} | R Documentation |
function to retrieve response values to use for input to the IRISMustangMetrics::transferFunctionMetric
Description
The transferFunctionSpectra
function returns a frequency-amplitude-phase response from the service.iris.edu/iris/ws/evalresp web service for a seismic Stream
object
using sampling_rate to determine frequency limits. The IRISMustangMetrics::transferFunctionMetric expects this output as evalresp input.
Usage
transferFunctionSpectra(st,sampling_rate)
Arguments
st |
a |
sampling_rate |
sample rate |
Details
The transferFunctionSpectra
/determines the minfreq, maxfreq, and nfreq for input to the
getEvalresp
function based on input sample rate. Other getEvalresp inputs are units='def' (default)
and output='fap' (frequency-amplitude-phase).
transferFunctionSpectra
will always call getEvalresp
using the service.iris.edu/irisws/evalresp
web service. The IRISMustangMetrics::transferFunctionMetric expects this output as evalresp input.
Value
Output is a dataframe with columns named:
freq, amp, phase
Author(s)
Mary Templeton met@iris.washington.edu
See Also
Examples
## Not run:
# Create a new IrisClient
iris <- new("IrisClient", debug=TRUE)
# Get seismic data
starttime <- as.POSIXct("2011-05-05", tz="GMT")
endtime <- starttime + 1*24*3600
st <- getDataselect(iris,"IU","GRFO","--","BHE",starttime,endtime)
sampling_rate <- 20
# Generate power spectral density for each hour long segment
evalresp <- transferFunctionSpectra(st,sampling_rate)
## End(Not run)