Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with PH5 services #10

Open
rtweekly-iris opened this issue Feb 24, 2022 · 2 comments
Open

Compatibility with PH5 services #10

rtweekly-iris opened this issue Feb 24, 2022 · 2 comments
Assignees

Comments

@rtweekly-iris
Copy link

Currently, irisFetch is not compatible with the suite of PH5 web services. The underlying dependency on the IRIS-WS Java library, by default, adds some parameters to the event and dataselect service calls that are not recognized/applicable to the ph5ws-* services but are compliant with the FDSN spec.

As an example:

tr = irisFetch.Traces('Z1','1','*','DPZ','2018-07-01 00:00:00','2018-07-01 00:00:10','DATASELECTURL:http://service.iris.edu/ph5ws/dataselect/1/','STATIONURL:http://service.iris.edu/ph5ws/station/1/','verbose')

    'spz:'    [0]    'vb:'    [1]    'auth:'    [0]    'qual:'    'M'    'un&pw:'    ''    ''

Using dataselect service at: http://service.iris.edu/ph5ws/dataselect/1/
Using station service at: http://service.iris.edu/ph5ws/station/1/
traces = tracedata.fetchTraces("Z1", "1", "*", "DPZ", "2018-07-01 00:00:00.000", "2018-07-01 00:00:10.000", 'M', 0)
2022/02/23 19:34:29 INFO: edu.iris.dmc.extensions.fetch.TraceData fetchTraces: StationService url set to: http://service.iris.edu/ph5ws/station/1/
2022/02/23 19:34:29 FINER: edu.iris.dmc.extensions.fetch.TraceData usrMessage: Found  1 applicable metadata
2022/02/23 19:34:29 INFO: edu.iris.dmc.extensions.fetch.TraceData fetchTraces: WaveService url set to: http://service.iris.edu/ph5ws/dataselect/1/
2022/02/23 19:34:29 FINER: edu.iris.dmc.extensions.fetch.TraceData usrMessage: Requesting: Z1 1 -- DPZ 2018-07-01T00:00:00.000 2018-07-01T00:00:10.000
2022/02/23 19:34:29 FINER: edu.iris.dmc.extensions.fetch.TraceData usrMessage: Fetching waveform data
edu.iris.dmc.criteria.CriteriaException: Bad request parameter: Error 400: Unrecognized argument - quality -- Exception while reading stderr, excep: Stream closed

More Details:
handler exited, code: 3  reason: Bad Request

Request:
http://service.iris.edu/ph5ws/dataselect/1/query

Request Submitted:
2022/02/24 03:34:31 UTC

Service version:
Service: ph5ws-dataselect  version: 1.0.0


	at edu.iris.dmc.service.WaveformService.fetch(WaveformService.java:120)
	at edu.iris.dmc.service.WaveformService.fetch(WaveformService.java:239)
	at edu.iris.dmc.service.WaveformService.fetch(WaveformService.java:292)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:394)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:192)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:137)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:102)
An [MATLAB:Java:GenericException] exception occurred in irisFetch.getTheTraces() but was caught
 full text follows:
message:
Java exception occurred: 
java.io.IOException: edu.iris.dmc.criteria.CriteriaException: Bad request parameter: Error 400: Unrecognized argument - quality -- Exception while reading stderr, excep: Stream closed

More Details:
handler exited, code: 3  reason: Bad Request

The full list of parameters that need to be validated, the variable type, and the corresponding web service is below

ph5ws-event:

  • includearrivals (boolean)
  • includeallmagnitudes (boolean)
  • includeallorigins (boolean)

ph5ws-dataselect:

  • quality (single-character string)
@rtweekly-iris rtweekly-iris self-assigned this Feb 24, 2022
@rtweekly-iris rtweekly-iris changed the title irisFetch and compatibility with PH5 services Compatibility with PH5 services Feb 24, 2022
@rtweekly-iris
Copy link
Author

The ph5ws-event service is also problematic to fix. The service doesn't recognize what's coming back from the library, and the library doesn't recognize what it's sending to the service.

ev = irisFetch.Events('catalog','8A','shotline','001','shotid','5013','BASEURL','http://service.iris.edu/ph5ws/event/1/')

fetching...
Error using irisFetch.Events (line 887)
Java exception occurred:
edu.iris.dmc.criteria.CriteriaException: Bad request parameter: Error 400: doIrisProcessing -
No type defined or unknown query parameter: includeallmagnitudes

Request:
http://service.iris.edu/ph5ws/event/1/query?catalog=8A&shotline=001&shotid=5013&includearrivals=false&includeallmagnitudes=false&includeallorigins=false

Request Submitted:
2022/02/24 02:50:59 UTC

On the library side, if we use the fdsnws-event service url instead, there's a glimpse of the problems that will be coming in from the library:

ev = irisFetch.Events('catalog','8A','shotline','001','shotid','5013','BASEURL','http://service.iris.edu/fdsnws/event/1/')
fetching...
Error using irisFetch.Events (line 887)
Java exception occurred:
edu.iris.dmc.criteria.CriteriaException: Bad request parameter: Error 400: doIrisProcessing -
No type defined or unknown query parameter: shotline

Request:
http://service.iris.edu/fdsnws/event/1/query?catalog=8A&shotline=001&shotid=5013&includearrivals=false&includeallmagnitudes=false&includeallorigins=false

Request Submitted:
2022/02/24 02:53:15 UTC

Service version:
Service: fdsnws-event version: 1.1.13

at edu.iris.dmc.service.EventService.fetch(EventService.java:145)
    at edu.iris.dmc.service.EventService.fetch(EventService.java:113)

What parameters need to be validated by which piece?

ph5ws-dataselect needs to validate:

  • quality

ph5ws-event needs to validate:

  • includearrivals
  • includeallorigins
  • includeallmagnitudes

IRIS-WS needs to validate:

  • shotid
  • shotline

@rtweekly-iris
Copy link
Author

Updated error output using the newest release candidate of the IRIS-WS library.

>> tr = irisFetch.Traces('Z1','1','*','DPZ','2018-07-01 00:00:00','2018-07-01 00:00:10','DATASELECTURL:http://service.iris.edu/ph5ws/dataselect/1/','STATIONURL:http://service.iris.edu/ph5ws/station/1/','verbose')

edu.iris.dmc.criteria.CriteriaException: Bad request parameter: Error 400: Unrecognized argument - quality

More Details:
handler exited, code: 3  reason: Bad Request

Request:
http://service.iris.edu/ph5ws/dataselect/1/query

Request Submitted:
2022/11/17 18:27:15 UTC

Service version:
Service: ph5ws-dataselect  version: 1.0.1


	at edu.iris.dmc.service.WaveformService.fetch(WaveformService.java:115)
	at edu.iris.dmc.service.WaveformService.fetch(WaveformService.java:182)
	at edu.iris.dmc.service.WaveformService.fetch(WaveformService.java:220)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:193)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:82)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:70)
	at edu.iris.dmc.extensions.fetch.TraceData.fetchTraces(TraceData.java:62)
An [MATLAB:Java:GenericException] exception occurred in irisFetch.getTheTraces() but was caught
 full text follows:
message:
Java exception occurred: 
java.io.IOException: edu.iris.dmc.criteria.CriteriaException: Bad request parameter: Error 400: Unrecognized argument - quality

More Details:
handler exited, code: 3  reason: Bad Request

Request:
http://service.iris.edu/ph5ws/dataselect/1/query

Request Submitted:
2022/11/17 18:27:15 UTC

ph5ws-event service output:

>> ev = irisFetch.Events('catalog','8A','shotline','001','shotid','5013','BASEURL','http://service.iris.edu/ph5ws/event/1/')
fetching...
Error using irisFetch.Events
Java exception occurred:
edu.iris.dmc.criteria.CriteriaException: Bad request parameter: Error 400: doIrisProcessing - No
type defined or unknown query parameter: includeallmagnitudes

Request:
http://service.iris.edu/ph5ws/event/1/query?catalog=8A&shotline=001&shotid=5013&includearrivals=false&includeallmagnitudes=false&includeallorigins=false

Request Submitted:
2022/11/17 18:34:24 UTC

Service version:
Service: ph5ws-event  version: 1.0.0


	at edu.iris.dmc.service.EventService.fetch(EventService.java:111)
	at edu.iris.dmc.service.EventService.fetch(EventService.java:70)
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant