Converting Poles and Zeros to dataless/stationxml

Hi all,

I have a bunch of files which look like this:

4.276e+10 # Tgain
7 # Number of poles.
-1.770e-02 1.7601e-02 # Poles
-1.770e-02 -1.7601e-02
-1.267e+02 0.0
-1.920e+02 2.5911e+02
-1.920e+02 -2.5911e+02
-5.577e+02 1.1431e+04
-5.577e+02 -1.1431e+04
5 # Number of zeros.
0.0 0.0 # Zeros
0.0 0.0
-9.166e+01 0.0
-1.601e+02 0.0
-3.207e+03 0.0

Is this some standard format I am not aware of?
If I read it my self into a paz dictionary is there a way I can save it as dateless/stationxml?


Hi Omry,

yes you can convert it to a StationXML, but it is a bit of manual work. Have a look at this tutorial here:

You’ll have to replace the response from NRL with a custom one. It might be helpful to start with an NRL one and inspect the required objects. If you assemble all the objects correctly, ObsPy can write it out as a StationXML file.



Thanks, this looks great.
Is there a way I can create a response object from poles and zeros?

Hi Omry,

excuse the tardy answer.

Yes - as I’ve written below I’d start with the link I’ve pasted in the previous answer. This gives you fully formed response objects. Use this to inspect how the objects are built-up and then replace values with your own. I think this is a good way of learning how our internal objects work. Alternatively you could of course also write out the StationXML file and edit it, or directly manually create a Response object with all its stages but this is tedious and fairly error prone.