gain/sensitivity in simulate


A problem with sensitivity in “simulate” - any suggestions welcome

I have imported details of a RESP response file, using “attach_resp” from obspy.sac, and then have the following
in the trace (tr) stats for that trace :

network: NZ
station: KNZ
location: 10
channel: HHN
starttime: 2011-12-10T00:00:00.968393Z
endtime: 2011-12-10T23:58:59.998393Z
sampling_rate: 100.0
delta: 0.01
npts: 8633904
calib: 1.0
_format: MSEED
paz: AttribDict({‘digitizer_gain’: 1.0, ‘seismometer_gain’: 838861000.0, ‘zeros’: [0j, 0j, (159+0j), 0j, 0j, (159+0j), 0j, 0j, (159+0j), 0j, 0j, 0j], ‘gain’: 1932953847860000.0, ‘t_shift’: 1.2483732000000001, ‘poles’: [(-0.023560000000000001+0.023560000000000001j), (-0.023560000000000001-0.023560000000000001j), (-50+0j), (-0.023560000000000001+0.023560000000000001j), (-0.023560000000000001-0.023560000000000001j), (-50+0j), (-0.023560000000000001+0.023560000000000001j), (-0.023560000000000001-0.023560000000000001j), (-50+0j), (-0.011780000000000001+0.011780000000000001j), (-0.011780000000000001-0.011780000000000001j), (-180+0j), (-160+0j), (-80+0j)]})
mseed: AttribDict({‘dataquality’: ‘D’, ‘record_length’: 512, ‘byteorder’: ‘>’, ‘encoding’: ‘STEIM2’})

If I then try tr.simulate (paz_remove=‘self’, remove_sensitivty=True) then I get the following :

Traceback (most recent call last):
File “”, line 893, in
tr4 = scbresp.stream_remove_response(tr3)
File “”, line 156, in stream_remove_response
File “/sp/prj/tvz95/mypython/lib/python2.6/site-packages/obspy.core-0.4.8.dev_r2862-py2.6.egg/obspy/core/”, line 1055, in simulate
simulate_sensitivity=simulate_sensitivity, **kwargs)
File “/sp/prj/tvz95/mypython/lib/python2.6/site-packages/obspy.signal-0.4.9.dev_r2863-py2.6-linux-x86_64.egg/obspy/signal/”, line 448, in seisSim
data /= paz_remove[‘sensitivity’]
File “/sp/prj/tvz95/mypython/lib/python2.6/site-packages/obspy.core-0.4.8.dev_r2862-py2.6.egg/obspy/core/”, line 134, in getitem
return super(AttribDict, self).getitem(name)
KeyError: ‘sensitivity’

Any suggestions anyone ??


Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.

Hi Stephen,

I think that probably some values get stored in the wrong fields of the
attached paz dictionary. As I do not use SAC PZ or RESP files and do not
know these formats very well I have opened a ticket for everybody to
comment on this: