Seismometer Correction/Simulation

Hi, I’m trying to fix the seismometer used in my data using the following script:

import obspy
from obspy import read
from import Parser

st = read('./jatoba/9FE7/2011.06*.9FE7.*1.m')

tr ="XX.9FE7..101")[0] = 'HHZ'

parser = Parser("./das130.dataless")
paz_le3d5s = parser.get_paz("XX.9FE7..HHZ")

tr.simulate(paz_remove=paz_le3d5s, water_level=10)

And I get the following error:

Traceback (most recent call last):
File “/home/lessandro/Documentos/TCC/Processamento_tcc/processamento/”, line 20, in
File “”, line 2, in simulate
File “/home/lessandro/anaconda3/envs/obspy/lib/python3.9/site-packages/obspy/core/”, line 273, in _add_processing_info
result = func(*args, **kwargs)
File “/home/lessandro/anaconda3/envs/obspy/lib/python3.9/site-packages/obspy/core/”, line 1468, in simulate = simulate_seismometer(
File “/home/lessandro/anaconda3/envs/obspy/lib/python3.9/site-packages/obspy/signal/”, line 558, in simulate_seismometer
data = np.fft.rfft(data, n=nfft)
File “<array_function internals>”, line 5, in rfft
File “/home/lessandro/anaconda3/envs/obspy/lib/python3.9/site-packages/numpy/fft/”, line 371, in rfft
output = _raw_fft(a, n, axis, True, True, inv_norm)
File “/home/lessandro/anaconda3/envs/obspy/lib/python3.9/site-packages/numpy/fft/”, line 74, in _raw_fft
r = pfi.execute(a, is_real, is_forward, fct)

Anyone know how to solve this type of problem?

Dear Lessandro,
I think the trace.simulate function has no option to specify water_level, look at the manual below
obspy.core.trace.Trace.simulate — ObsPy Documentation (1.2.0).

If you have the possibility to remove the station response using something other than a PAZ entry I would encourage you to do so. I suggest you use the parser to convert your input station information into the ObsPy internal inventory format and then try the remove_response function

Hope this is helpful