if (FALSE) {
# Open a connection to EarthScope webservices
iris <- new("IrisClient")
starttime <- as.POSIXct("2011-01-24", tz="GMT")
endtime <- as.POSIXct("2011-01-25", tz="GMT")
# Get the waveform
stRaw <- getDataselect(iris,"AK","PIN","","BHZ",starttime,endtime)
# obtain an instrument sensitivity value with getChannel metadata)
c <- getChannel(iris, "AK","PIN","","BHZ",starttime, endtime)
sensitivityValue <- c$scale
# convert raw data
st <- multiplyBy(stRaw, 1/sensitivityValue)
rmsVariance(st)
# plot trace
plot(st, ylab=c$scaleunits)
}
Run the code above in your browser using DataLab