View source: R/spectralUtils.R
transferFunctionSpectra | R Documentation |
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.
transferFunctionSpectra(st,sampling_rate)
st |
a |
sampling_rate |
sample rate |
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.
Output is a dataframe with columns named:
freq, amp, phase
Mary Templeton met@iris.washington.edu
getEvalresp
,
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.