Trace.simulate(paz_remove=None, paz_simulate=None, remove_sensitivity=True, simulate_sensitivity=True, **kwargs)[source]

Correct for instrument response / Simulate new instrument response.

  • paz_remove (dict, None) – Dictionary containing keys 'poles', 'zeros', 'gain' (A0 normalization factor). Poles and zeros must be a list of complex floating point numbers, gain must be of type float. Poles and Zeros are assumed to correct to m/s, SEED convention. Use None for no inverse filtering.

  • paz_simulate (dict, None) – Dictionary containing keys 'poles', 'zeros', 'gain'. Poles and zeros must be a list of complex floating point numbers, gain must be of type float. Or None for no simulation.

  • remove_sensitivity (bool) – Determines if data is divided by paz_remove['sensitivity'] to correct for overall sensitivity of recording instrument (seismometer/digitizer) during instrument correction.

  • simulate_sensitivity (bool) – Determines if data is multiplied with paz_simulate['sensitivity'] to simulate overall sensitivity of new instrument (seismometer/digitizer) during instrument simulation.

This function corrects for the original instrument response given by paz_remove and/or simulates a new instrument response given by paz_simulate. For additional information and more options to control the instrument correction/simulation (e.g. water level, demeaning, tapering, …) see simulate_seismometer().

paz_remove and paz_simulate are expected to be dictionaries containing information on poles, zeros and gain (and usually also sensitivity).

If both paz_remove and paz_simulate are specified, both steps are performed in one go in the frequency domain, otherwise only the specified step is performed.


Instead of the builtin deconvolution based on Poles and Zeros information, the deconvolution can be performed using evalresp instead by using the option seedresp (see documentation of simulate_seismometer() and the ObsPy Tutorial.


This operation is performed in place on the actual data arrays. The raw data is not accessible anymore afterwards. To keep your original data, use copy() to create a copy of your trace object. This also makes an entry with information on the applied processing in stats.processing of this trace.


>>> from obspy import read
>>> from obspy.signal.invsim import corn_freq_2_paz
>>> st = read()
>>> tr = st[0]
>>> paz_sts2 = {'poles': [-0.037004+0.037016j, -0.037004-0.037016j,
...                       -251.33+0j,
...                       -131.04-467.29j, -131.04+467.29j],
...             'zeros': [0j, 0j],
...             'gain': 60077000.0,
...             'sensitivity': 2516778400.0}
>>> paz_1hz = corn_freq_2_paz(1.0, damp=0.707)
>>> paz_1hz['sensitivity'] = 1.0
>>> tr.simulate(paz_remove=paz_sts2, paz_simulate=paz_1hz)
<...Trace object at 0x...>
>>> tr.plot()  

(Source code, png)