Hello there,
I am trying to remove the instrument response from a waveform I have retrieved using obspy.arclink.client.
I use the code given below. However, when it reaches the command “wav.simulate (paz_remove=paz,paz_simulate=None)” it gives back an error.
For some reason the key ‘poles’ from the “paz” dictionary was not recognized. I put the error below.
It would be great if you kindly can help me and give me your thoughts in this regard.
Cheers,
Sep
Error:
{‘SABA.2006.303.HZ’: AttribDict({‘poles’: [(-0.037+0.037j), (-0.037-0.037j), (-13300+0j), (-10530+10050j), (-10530-10050j), (-520.3+0j), (-374.8+0j), (-97.34-400.7j), (-97.34+400.7j), (-15.64+0j), (-255.1+0j)], ‘sensitivity’: 629145000.0, ‘zeros’: [(-463.1+430.5j), (-463.1-430.5j), (-176.6+0j), (-15.15+0j), 0j, 0j], ‘name’: ‘SABA.2006.303.HZ’, ‘gain’: 3.46844e+17})}
Traceback (most recent call last):
File “./sleeman2.py”, line 37, in
wav.simulate (paz_remove=paz,paz_simulate=None)
File “/usr/local/lib/python2.7/site-packages/obspy.core-0.7.1-py2.7.egg/obspy/core/stream.py”, line 1702, in simulate
simulate_sensitivity=simulate_sensitivity, **kwargs)
File “/usr/local/lib/python2.7/site-packages/obspy.core-0.7.1-py2.7.egg/obspy/core/trace.py”, line 1186, in simulate
simulate_sensitivity=simulate_sensitivity, **kwargs)
File “/usr/local/lib/python2.7/site-packages/obspy.signal-0.7.0-py2.7-linux-x86_64.egg/obspy/signal/invsim.py”, line 422, in seisSim
raise KeyError(“Missing key: %s” % key)
KeyError: ‘Missing key: poles’
Code:
#!/usr/bin/env python
import obspy.signal
import os
import matplotlib.pyplot as plt
from obspy.core import read
from obspy.core import UTCDateTime
from obspy.arclink.client import Client
from obspy.xseed import Parser
client=Client(“webdc.eu”, 18001, user=‘’) t0 = UTCDateTime (“2012-09-08 20:30:00”) wav = client.getWaveform (‘NA’, ‘SABA’, ‘’, ‘BHZ’, t0 - 900, t0 + 900) paz = client.getPAZ (‘NA’, ‘SABA’, ‘’, ‘BHZ’, t0 - 900, t0 + 900 ) wav.simulate (paz_remove=paz,paz_simulate=None) wav.plot()