Thread: Re: URLbuilder IRIS MUSTANG metrics - percent availability problems

Started: 2022-12-21 15:18:33
Last activity: 2022-12-21 15:18:33

Hi Daniel-

My apologies. The qa-issues list is actually at qa-issues<at>lists.ds.iris.edu <qa-issues<at>lists.ds.iris.edu>. Expect that this will get migrated to earthscope.org http://earthscope.org/ in the next few months, but that list is good for now.

-Rob


On Dec 21, 2022, at 3:15 PM, Rob Casey <rob.casey<at>earthscope.org> wrote:


Hi Daniel-

If you remove the quality=M term, then the query functions fine. When you specify a target, you provide all of the net, sta, cha, loc, and qual terms, so listing quality separately is considered redundant.

The other issue is that you want to query the 'measurements' service to get actual values returned.

http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&target=LM.NHBP.00.HHZ.M&start=2022-12-14T00:00:00&end=2022-12-14T23:00:00&nodata=404

In this case, I am seeing no results returned. I can modify the time window a bit to see if I can understand what is available. Also, formatting as text is nice and readable here, but you can choose to stick to the default of XML.

http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&target=LM.NHBP.00.HHZ.M&start=2022-12-01T00:00:00&end=2022-12-14T23:00:00&nodata=404&format=text

"Percent Availability Metric"
"value","target","start","end","lddate"
"100.000","LM.NHBP.00.HHZ.M","2022/12/01 00:00:00","2022/12/01 23:59:59","2022/12/03 13:36:23"
"100.000","LM.NHBP.00.HHZ.M","2022/12/02 00:00:00","2022/12/02 23:59:59","2022/12/04 13:39:46"
"100.000","LM.NHBP.00.HHZ.M","2022/12/03 00:00:00","2022/12/03 23:59:59","2022/12/05 13:38:47"
"100.000","LM.NHBP.00.HHZ.M","2022/12/04 00:00:00","2022/12/04 23:59:59","2022/12/06 13:40:28"
"100.000","LM.NHBP.00.HHZ.M","2022/12/05 00:00:00","2022/12/05 23:59:59","2022/12/07 13:38:33"
"100.000","LM.NHBP.00.HHZ.M","2022/12/06 00:00:00","2022/12/06 23:59:59","2022/12/08 13:36:32"
"100.000","LM.NHBP.00.HHZ.M","2022/12/07 00:00:00","2022/12/07 23:59:59","2022/12/09 13:36:20"
"100.000","LM.NHBP.00.HHZ.M","2022/12/08 00:00:00","2022/12/08 23:59:59","2022/12/10 13:36:26"
"100.000","LM.NHBP.00.HHZ.M","2022/12/09 00:00:00","2022/12/09 23:59:59","2022/12/12 13:34:00"
"100.000","LM.NHBP.00.HHZ.M","2022/12/10 00:00:00","2022/12/10 23:59:59","2022/12/12 13:35:55"
"100.000","LM.NHBP.00.HHZ.M","2022/12/11 00:00:00","2022/12/11 23:59:59","2022/12/13 13:36:04"
"100.000","LM.NHBP.00.HHZ.M","2022/12/12 00:00:00","2022/12/12 23:59:59","2022/12/14 13:36:20"
"100.000","LM.NHBP.00.HHZ.M","2022/12/13 00:00:00","2022/12/13 23:59:59","2022/12/15 13:36:56"


What I find interesting here is that you get metrics up to the end of the 13th, but nothing from the 14th. When I query for the list up to today, I get the 14th and beyond:

http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&target=LM.NHBP.00.HHZ.M&start=2022-12-01T00:00:00&end=2022-12-21T23:00:00&nodata=404&format=text

"Percent Availability Metric"
"value","target","start","end","lddate"
"100.000","LM.NHBP.00.HHZ.M","2022/12/01 00:00:00","2022/12/01 23:59:59","2022/12/03 13:36:23"
"100.000","LM.NHBP.00.HHZ.M","2022/12/02 00:00:00","2022/12/02 23:59:59","2022/12/04 13:39:46"
"100.000","LM.NHBP.00.HHZ.M","2022/12/03 00:00:00","2022/12/03 23:59:59","2022/12/05 13:38:47"
"100.000","LM.NHBP.00.HHZ.M","2022/12/04 00:00:00","2022/12/04 23:59:59","2022/12/06 13:40:28"
"100.000","LM.NHBP.00.HHZ.M","2022/12/05 00:00:00","2022/12/05 23:59:59","2022/12/07 13:38:33"
"100.000","LM.NHBP.00.HHZ.M","2022/12/06 00:00:00","2022/12/06 23:59:59","2022/12/08 13:36:32"
"100.000","LM.NHBP.00.HHZ.M","2022/12/07 00:00:00","2022/12/07 23:59:59","2022/12/09 13:36:20"
"100.000","LM.NHBP.00.HHZ.M","2022/12/08 00:00:00","2022/12/08 23:59:59","2022/12/10 13:36:26"
"100.000","LM.NHBP.00.HHZ.M","2022/12/09 00:00:00","2022/12/09 23:59:59","2022/12/12 13:34:00"
"100.000","LM.NHBP.00.HHZ.M","2022/12/10 00:00:00","2022/12/10 23:59:59","2022/12/12 13:35:55"
"100.000","LM.NHBP.00.HHZ.M","2022/12/11 00:00:00","2022/12/11 23:59:59","2022/12/13 13:36:04"
"100.000","LM.NHBP.00.HHZ.M","2022/12/12 00:00:00","2022/12/12 23:59:59","2022/12/14 13:36:20"
"100.000","LM.NHBP.00.HHZ.M","2022/12/13 00:00:00","2022/12/13 23:59:59","2022/12/15 13:36:56"
"100.000","LM.NHBP.00.HHZ.M","2022/12/14 00:00:00","2022/12/14 23:59:59","2022/12/16 13:38:33"
"100.000","LM.NHBP.00.HHZ.M","2022/12/15 00:00:00","2022/12/15 23:59:59","2022/12/17 13:39:15"
"100.000","LM.NHBP.00.HHZ.M","2022/12/16 00:00:00","2022/12/16 23:59:59","2022/12/18 13:36:19"
"100.000","LM.NHBP.00.HHZ.M","2022/12/17 00:00:00","2022/12/17 23:59:59","2022/12/19 13:37:02"
"100.000","LM.NHBP.00.HHZ.M","2022/12/18 00:00:00","2022/12/18 23:59:59","2022/12/20 13:36:41"
"100.000","LM.NHBP.00.HHZ.M","2022/12/19 00:00:00","2022/12/19 23:59:59","2022/12/21 12:38:37"


http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&target=LM.NHBP.00.HHZ.M&timewindow=2022-12-14T00:00:00,2022-12-14T23:00:00&nodata=404&format=text http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&target=LM.NHBP.00.HHZ.M&timewindow=2022-12-14T00:00:00,2022-12-14T23:00:00&nodata=404&format=text>

"Percent Availability Metric"
"value","target","start","end","lddate"


So, the current time matching algorithm doesn't appear to handle time intersections like we might expect. I have to land exactly on the daily time boundaries for the result to appear.

http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&target=LM.NHBP.00.HHZ.M&timewindow=2022-12-14T00:00:00,2022-12-14T23:59:59&nodata=404&format=text http://service.iris.edu/mustang/measurements/1/query?metric=percent_availability&target=LM.NHBP.00.HHZ.M&timewindow=2022-12-14T00:00:00,2022-12-14T23:59:59&nodata=404&format=text>

"Percent Availability Metric"
"value","target","start","end","lddate"
"100.000","LM.NHBP.00.HHZ.M","2022/12/14 00:00:00","2022/12/14 23:59:59","2022/12/16 13:38:33"


It may be that this has been a feature for some time and I will CC the QA team to call attention to it.


Thanks for reaching out and be sure to write to qa-issues if you have further questions.

Regards,

-Rob





On Dec 21, 2022, at 8:05 AM, Burk, Daniel <burkdani<at>msu.edu <burkdani<at>msu.edu>> wrote:

In using the URL builder, I attempted to generate a percent availability metric for station LM.NHBP for the Z channel.
http://services.iris.edu/mustang/metrics/1/query?metric=percent_availability&quality=M&target=LM.NHBP.00.HHZ.M&output=html&timewindow=2022-12-14T00:00:00,2022-12-14T23:00:00&nodata=404 http://services.iris.edu/mustang/metrics/1/query?metric=percent_availability&quality=M&target=LM.NHBP.00.HHZ.M&output=html&timewindow=2022-12-14T00:00:00,2022-12-14T23:00:00&nodata=404>

The following is the result, which I cannot understand. For, I do not see where I am specifying more than one target, or more than one set of parameters.

Could you please clarify where the problem lies? I wish to know the percentage of availability for data from this station located within the archived data at the DMC for this time period.



MUSTANG Error
Targets must be specified via a single mechanism: target=SNCLQ, snclqs=@<file>, or sta=...
You have specified more than one set of parameters that define which targets are required. The available options are:
target=N.S.L.C.Q[&target=...]
sta=S&net=N&loc=L&cha=C...
posting a file of targets using the snclqs parameter
But only ONE of these can be used for any request.


Daniel Burk
Chief Engineer, MSU Seismology Laboratory
Dept. of Earth & Environmental Sciences
Michigan State University
288 Farm Lane # 207
East Lansing, MI 48824 USA



12:39:57 v.22510d55