Use Inventory response for PPSD class

Dear developers,

I am looking for a way to use the response information stored in a
StationXML file for the PPSD routines.

As I understand it, PPSD takes Poles and Zeros, either from a Parser
object or from a dictionary with entries {gain, poles, sensitivities,
zeros}.

However, I see no way to create either from an inventory object (or
anything else that I can get from a StationXML file) without manually
assembling something like:

paz = {'gain': resp.response_stages[1].stage_gain *
               resp.response_stages[0].stage_gain}

and so on, which seems a bit clumsy.

Is there a more elegant way that I am currently missing?

On a related issue: Can the PPSD class use data that has already been
instrument-corrected?

Thanks for your help,

Simon

Hi Simon,

indeed PPSD has not yet been modified to accomodate StationXML/Inventory
objects. It would not be very hard to do, but even if somebody would do
it, this would go into master branch and would only be available to you
on the next major release (so not very soon).

As you mentioned one option would be to extract PAZ yourself from the
Inventory, you might want to have a look at something like..

resp = inventory.get_response("IU.ANMO.00.BHZ", UTCDateTime())
resp.get_paz()

.. but you still would need to assemble the basic dictionary.

Probably the fastest (although not nicest) option would be to use the
IRIS java tool to convert your stationXML files to dataless SEED for use
with xseed Parser in combination with PPSD.
https://seiscode.iris.washington.edu/projects/stationxml-converter

Regarding already corrected data.. you could probably do that (in a
hacky way) using `is_rotational_data=True` and providing a dictionary
with "sensitivity=1.0" as paz, but then your data would have to be
acceleration already..

best,
T