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