Help: measurements v.1

Description

The measurements web service returns measurements for metrics relating to station data quality. This is the primary query interface for MUSTANG users.

Use of command line queries

Using curl to query metrics

An alternative to using a browser or simple URL GET call to MUSTANG for metrics is to use a command line utility like curl. Below, we show some examples of querying MUSTANG measurements using curl.

Usage Synopsis
curl [--data-urlencode snclqs@filename] query_URL

Where

curl ::  this is the curl utility, which you will need to have installed on your machine
--data-urlencode ::  (optional) this flag asserts that the following entry will contain a list of SNCLQs
snclqs@filename ::  (with --data-urlencode) this passes the indicated text filename _(as POST)_ to the snclqs parameter as a list.
More detail is provided in the section below.
query_URL ::  this is the URL itself, which is identical to that provided in the query usage docs

Examples
curl 'http://service.iris.edu/mustang/measurements/1/query?metric=max_stalta&station=ANMO&start=2012-10-01&end=2013-01-01'

curl --data-urlencode snclqs@targets.txt 'http://service.iris.edu/mustang/measurements/1/query?metric=sample_snr&start=2012-10-01&end=2013-01-01'

snclqs file specifier

Multiple targets can be specified with this parameter, using a multi-line string as the value. The formatting is the same as what is returned by the targets service:

In this example the file of targets is first retrieved from the targets service (this file can be edited by hand to select particular targets):
curl http://service.iris.edu/mustang/targets/1/query?metric=sample_mean > targets.txt

The targets.txt file is then used as a list filter for getting at measurements (specifying the sample_mean metric as above):
curl --data-urlencode snclqs@targets.txt http://service.iris.edu/mustang/measurements/1/query?metric=sample_mean

More examples — a walk-through of MUSTANG queries

(please note that some web browsers may have difficulty displaying XML output, which is the default)

What is available for ‘target’ stations for the STA LTA metric for network IU?
http://service.iris.edu/mustang/targets/1/query?net=IU&metric=max_stalta

Give me all available STA LTA metrics for station PTGA, first half of 2012
http://service.iris.edu/mustang/measurements/1/query?metric=max_stalta&net=IU&station=PTGA&start=2012-01-01T00:00:00&end=2012-07-01T00:00:00

…where the metric is greater than 5
http://service.iris.edu/mustang/measurements/1/query?metric=max_stalta&net=IU&station=PTGA&start=2012-01-01T00:00:00&end=2012-07-01T00:00:00&value_gt=5.0

_…for all of virtual network GSN for the month of May only
http://service.iris.edu/mustang/measurements/1/query?net=_GSN&metric=max_stalta&start=2012-05-01T00:00:00&end=2012-06-01T00:00:00&value_gt=5.0

Let me see num overlaps for every BHZ channel in Network II, for March 2013
http://service.iris.edu/mustang/measurements/1/query?metric=num_overlaps&chan=BHZ&net=II&start=2012-03-01&end=2012-04-01

This same example with text formatted output
http://service.iris.edu/mustang/measurements/1/query?metric=num_overlaps&chan=BHZ&net=II&start=2012-03-01&end=2012-04-01&format=text

This same example with downloadable CSV output
http://service.iris.edu/mustang/measurements/1/query?metric=num_overlaps&chan=BHZ&net=II&start=2012-03-01&end=2012-04-01&format=csv

What is the max_gap metric?
http://service.iris.edu/mustang/metrics/1/query?metric=max_gap

What about percent availability for specific YT PASSCAL experiment stations (MPAT, SIPL, and HOWD) prior to Oct 2008?
http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&network=YT&startbefore=2008-10-01T00:00:00.000&station=MPAT,SIPL,HOWD&format=text

Anything below 90 percent in any time period for the YT network code?
http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&network=YT&value_lt=90&format=text

What is the percent availability for network MS for channels BH and VM in the latter half of August 2016?
http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&net=MS&cha=BH?,VM?&start=2016-08-15&end=2016-09-01&orderby=target,start&format=text

…only for SPACE SPACE (empty) location codes? (represented with dashes)
http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&net=MS&loc=—&cha=BH?,VM?&start=2016-08-15&end=2016-09-01&orderby=target,start&format=text

I want transfer function metrics for one station that pairs with location=60 and any HH channels for April 2016
http://service.iris.edu/mustang/measurements/1/query?metric=transfer_function&net=IU&sta=KMBO&loc=60&cha=HH?&start=2016-04-01&end=2016-05-01&orderby=target,start&format=text

Same query, but for locations paired with 00 or 10
http://service.iris.edu/mustang/measurements/1/query?metric=transfer_function&net=IU&sta=KMBO&loc=00,10&cha=HH?&start=2016-04-01&end=2016-05-01&orderby=target,start&format=text

Same query, but pair only with location pair 10:00
http://service.iris.edu/mustang/measurements/1/query?metric=transfer_function&net=IU&sta=KMBO&loc=10:00&cha=HH?&start=2016-04-01&end=2016-05-01&orderby=target,start&format=text

Use very specific SNCL filters for two stations
http://service.iris.edu/mustang/measurements/1/query?metric=transfer_function&target=IU.ADK.10.BH?.M,IU.KMBO.60.HH?.M&start=2016-04-01&end=2016-05-01&orderby=target,start&format=text