Closed krischer closed 8 years ago
Please define for what kind of request this makes sense.
The DMC's middleware is ready to be adapted to pass along this header.
I just implemented it. It actually makes sense for all seismograms that can be returned by the /seismograms
route. It depends on the source location and that is always identical for a single request so you can just always forward the Instaseis-Mu
header. Its also documented here: http://instaseis.net/routes/seismograms.html
Is there any way to query for a model-source Instaseis-Mu
value without making a seismograms request?
Turns out that passing along this header, using the first one of potentially many HTTP requests made by the middleware, is harder than I was hoping. It'd be a lot better to lookup the value before making seismogram request(s). I can work on it if needed.
Hmm...I could add a new route that returns the shear modules for a given depth.
Alternatively we could tabulate the values as it only depends on the event depth for the models of the syngine service and you come up with something of your own.
Nonetheless this, for now, is only a nice-to-have feature. It would be required if people want to calculate their own finite sources from some file formats building them up from point sources, each requested from the syngine service.
Let's forgo a new route, and I'll adapt the middleware.
Thinking out loud for my own sake: the issue here is that miniSEED is streamed directly through the middleware with no easy opportunity to catch the first header and pass it along. This is nice because there is no buffering and minimal memory use by the middleware. On the other hand the SAC data is buffered for each request in order to re-form all backend requests into a single archive. So changing the miniSEED to do the same would make it just as "bad" as the SAC. Since only a single receiver and limited number of components are in each request the maximum size is well bounded and not really that bad. This would allow cherry-picking of the first Instaseis-Mu
header to be pushed into the output stream.
Done in iris-edu/irisws-syngine#10 and added to instaseis in 049bbcd6ef521159710cd5f3b07d9bb70223960e.
Only for requests where it makes sense. See iris-edu/irisws-syngine#10.