Thread: Re: Does Mustang work?

Started: 2015-10-06 17:44:03
Last activity: 2015-10-06 18:21:14
Topics: Web Services
Mary Templeton
2015-10-06 17:44:03
Hi Shahar,

I know people who have done that, although I haven't done it myself.
We don't have a special script like our irisFetch script for the dataselect web
service, but I suspect people may just call curl or wget.

I'm forwarding your email back to the Web Services list so that other
matlab/MUSTANG users can share how they do it.

cheers,
Mary


On Oct 6, 2015, at 10:33 AM, Shahar Barak <shaharb<at>stanford.edu> wrote:

Hi Mary,

Thank you. Is there a way to call Mustang from within Matlab?

Shahar


On Mon, Oct 5, 2015 at 3:14 PM, Mary Templeton <met<at>iris.washington.edu> wrote:
Hi Shahar,

It's great to see that you're giving MUSTANG a try! Let me see if I can
shed some light on why the query you sent isn't working… Here is a similar
query that does work:

http://service.iris.edu/mustang/measurements/1/query?metric=orientation_check&net=XD&sta=A01&cha=BH[12ENZ]&format=text&timewindow=2011-09-30T21:32:19,2015-10-05T21:32:19

I made 5 changes to your original query:

1) changed http://service.iris.edu/mustang/metrics to http://service.iris.edu/mustang/measurements
2) deleted &loc=--
3) I used BH[12ENZ] instead of BH*
4) changed &output=html to &output=text
5) changed the year of the end date to 2015

Explanations
-----------------
1) we try to use "metric" to mean the algorithm that's running and "measurement" to mean the values
computed by the algorithm that get stored in the database. (In a week, a channel will have 7 measurements
for a single metric.) So unless you want information about the algorithm itself, you'll want to choose the
_measurement_ service (not _metrics_).

2 & 3) The MUSTANG measurement service doesn't yet use the same wildcarding as the other web
services, or even the noise-pdf, noise-psd services. We hope to fix that. The wildcards above should
get you the measurements you are looking for.

4) I find I get the most useful output if I use output={text, xml or csv}. I'm not sure why HTML wasn't designed
to return similar output…

5) orientation_check only runs when there's an M>=7 event that is shallower that 100 km. The station was
running from 2011/01/14-2012/08/18 and I'm seeing measurements only for 2012/02/02 through 2012/04/11.
I tried your original timespan for the IU network and it looks like there weren't any suitable events during
that week.

Please let me know if you have any additional questions.

Best regards,
Mary Templeton
IRIS DMC

On Oct 5, 2015, at 3:47 PM, Shahar Barak <shaharb<at>stanford.edu> wrote:

Hi,

I tried using mustang, but it doesn't work. I tried with various networks/station combinations, and also tried to change other parameters such as channel, etc.
I always get a "400 No targets were found after filtering"

For example"
http://service.iris.edu/mustang/metrics/1/query?metric=orientation_check&net=XD&sta=A01&loc=--&cha=BH*&output=html&timewindow=2011-09-30T21:32:19,2011-10-05T21:32:19

----------------------
Web Services (http://ds.iris.edu/message-center/topic/webservices/)

Sent via IRIS Message Center (http://ds.iris.edu/message-center/)
Update subscription preferences at http://ds.iris.edu/account/profile/




  • Shahar Barak
    2015-10-06 18:21:14
    It works with Matlab's urlwrite
    <http://www.mathworks.com/help/matlab/ref/urlwrite.html command.

    e.g.:
    URL = sprintf('
    http://service.iris.edu/mustang/measurements/1/query?metric=orientation_check&net=%s&sta=%s&cha=BH[12ENZ]&format=text&timewindow=%sT00:00:00,%sT23:23:59',net,
    stn, dstart, dend);
    filename ='test.txt';
    urlwrite(URL,filename);

    On Tue, Oct 6, 2015 at 9:44 AM, Mary Templeton <met<at>iris.washington.edu>
    wrote:

    Hi Shahar,

    I know people who have done that, although I haven't done it
    myself.
    We don't have a special script like our irisFetch script for the
    dataselect web
    service, but I suspect people may just call curl or wget.

    I'm forwarding your email back to the Web Services list so that
    other
    matlab/MUSTANG users can share how they do it.

    cheers,
    Mary


    On Oct 6, 2015, at 10:33 AM, Shahar Barak <shaharb<at>stanford.edu> wrote:

    Hi Mary,

    Thank you. Is there a way to call Mustang from within Matlab?

    Shahar


    On Mon, Oct 5, 2015 at 3:14 PM, Mary Templeton <met<at>iris.washington.edu>
    wrote:
    Hi Shahar,

    It's great to see that you're giving MUSTANG a try! Let me see
    if I can
    shed some light on why the query you sent isn't working… Here is a
    similar
    query that does work:


    http://service.iris.edu/mustang/measurements/1/query?metric=orientation_check&net=XD&sta=A01&cha=BH[12ENZ]&format=text&timewindow=2011-09-30T21:32:19,2015-10-05T21:32:19

    I made 5 changes to your original query:

    1) changed http://service.iris.edu/mustang/metrics to
    http://service.iris.edu/mustang/measurements
    2) deleted &loc=--
    3) I used BH[12ENZ] instead of BH*
    4) changed &output=html to &output=text
    5) changed the year of the end date to 2015

    Explanations
    -----------------
    1) we try to use "metric" to mean the algorithm that's running and
    "measurement" to mean the values
    computed by the algorithm that get stored in the database. (In
    a week, a channel will have 7 measurements
    for a single metric.) So unless you want information about the
    algorithm itself, you'll want to choose the
    _measurement_ service (not _metrics_).

    2 & 3) The MUSTANG measurement service doesn't yet use the same
    wildcarding as the other web
    services, or even the noise-pdf, noise-psd services. We hope to
    fix that. The wildcards above should
    get you the measurements you are looking for.

    4) I find I get the most useful output if I use output={text, xml or
    csv}. I'm not sure why HTML wasn't designed
    to return similar output…

    5) orientation_check only runs when there's an M>=7 event that is
    shallower that 100 km. The station was
    running from 2011/01/14-2012/08/18 and I'm seeing measurements
    only for 2012/02/02 through 2012/04/11.
    I tried your original timespan for the IU network and it looks
    like there weren't any suitable events during
    that week.

    Please let me know if you have any additional questions.

    Best regards,
    Mary Templeton
    IRIS DMC

    On Oct 5, 2015, at 3:47 PM, Shahar Barak <shaharb<at>stanford.edu> wrote:

    Hi,

    I tried using mustang, but it doesn't work. I tried with various
    networks/station combinations, and also tried to change other parameters
    such as channel, etc.
    I always get a "400 No targets were found after filtering"

    For example"

    http://service.iris.edu/mustang/metrics/1/query?metric=orientation_check&net=XD&sta=A01&loc=--&cha=BH*&output=html&timewindow=2011-09-30T21:32:19,2011-10-05T21:32:19

    ----------------------
    Web Services (http://ds.iris.edu/message-center/topic/webservices/)

    Sent via IRIS Message Center (http://ds.iris.edu/message-center/)
    Update subscription preferences at http://ds.iris.edu/account/profile/





Page built 05:12:19 | v.88350d0a