Learn R Programming

IRISMustangMetrics (version 1.0.0)

getPsdMetrics: Retrieve measurements from the MUSTANG BSS

Description

The getPsdMetrics method of the IrisClient makes a request of the MUSTANG BSS (Backend Storage System) and returns a dataframe containing Power Spectral Density (PSD) measurements.

Usage

getPsdMetrics(obj, network, station, location, channel, 
                   starttime, endtime, url)

Arguments

obj
an IrisClient object
network
a character string with the two letter seismic network code
station
a character string with the station code
location
a character string with the location code
channel
a character string with the three letter channel code
starttime
a POSIXct class specifying the starttime (GMT)
endtime
a POSIXct class specifying the endtime (GMT)
url
optional url of the BSS measurements service

Value

  • A dataframe with the following columns:

    target, starttime, endtime, frequency, amplitude, phase

Details

The default BSS measurement service when url is not specified is:

http://service.iris.edu/mustang/measurements/1/query?

The metric name is automatically specified by appending metric=psd to this url.

Data returned from the BSS are converted into an Rdataframe.

Error returns from the BSS will stop evaluation and generate an error message.

See Also

getBssMetricList

Examples

Run this code
# Open a connection to IRIS DMC webservices (including the BSS)
iris <- new("IrisClient", debug=TRUE)

starttime <- as.POSIXct("2012-01-24", tz="GMT")
endtime <- as.POSIXct("2012-01-25", tz="GMT")

# Get the measurement XML
xml <- getPsdMetrics(iris,"AK","PIN","","VEA",
                          starttime,endtime,metricName="sample_mean",
                          url="http://service.iris.edu/mustang/measurements/1/query?")

Run the code above in your browser using DataLab