(no subject)

Hello everyone,

I would like to ask a few questions about how to use obspy to remove the instrument response,

So, I have a dataless and a miniseed but when I run my python scrips some warnings are shown. Altough the seismogram is finished deconvolved it is something wrong in the process??

link to the miniseed file and dataless;
https://www.dropbox.com/sh/r3oqgkozktz050c/AADAkbWMAC5oXNTPx1bKFy7Xa?dl=0

This is my first script;

from obspy import read
from obspy.io.xseed import Parser
st=read("/home/sysop/obspyfiles/WM.OBS03…SHZ")
pre_filt = (0.005, 0.006, 30.0, 35.0)
parser = Parser("/home/sysop/obspyfiles/datalessOBS03.SanVicente")
st.simulate(seedresp={‘filename’: parser, ‘units’: “DIS”},pre_filt=pre_filt,water_level=60)
#tr.write(“WM.OBS01…SHZ.DECONVEL.2015.299.mseed”, format=“mseed”)
st.plot()

And in console is shown this message;

WARNING: FIR normalized: sum[coef]=3.276800E+04; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=1.600000E+01; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=3.200000E+01; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=6.400000E+01; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=6.250000E+02; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=3.200000E+01; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=6.400000E+01; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=3.906877E+07; WM OBS03 SHZ
WARNING: FIR normalized: sum[coef]=2.077529E+07; WM OBS03 SHZ

Moreover I would like to know some information about how to use a right pre_filt and water level, because I would like not to lose information specially in low frecuencies.

I ve also tried by using a different way(poles and zeros) but the solution is different and now I am a little bit lost with this topic,

import obspy
from obspy.signal.invsim import corn_freq_2_paz
import matplotlib.pyplot as plt

st = obspy.read("/home/sysop/obspyfiles/WM.OBS03…SHZ")
paz_obs = {
‘poles’: [(-5.02655E+02 + 0.0j), (-1.00530E+03 + 0.0j),(-1.13100E+03 + 0.0j),(-3.70600E-02+3.70600E-02j),(-3.70600E-02-3.70600E-02j)],
‘zeros’: [0j, 0j],
‘sensitivity’: +7.90400E+03,
‘gain’: +2.95120E+09}

paz_1hz = corn_freq_2_paz(1.0, damp=0.707) # 1Hz instrument
paz_1hz[‘sensitivity’] = 1.0
pre_filt = [0.005, 0.006, 30.0, 35.0]
#st.remove_response(inventory=paz_obs, pre_filt=pre_filt, output=“DISP”,water_level=60, plot=True)
st_orig = st.copy()
st.simulate(paz_remove=paz_obs, paz_simulate=paz_1hz,pre_filt=pre_filt,water_level=60)
st_orig.plot()
st.plot()

(I ve attached the miniseed and the dataless)

Thanks if anyone could help.

Hi Roberto,

sorry for the late answer.

So, I have a dataless and a miniseed but when I run my python scrips some warnings are shown. Altough the seismogram is finished deconvolved it is something wrong in the process??

These evalresp warnings show up when the FIR coefficients are not properly normalized. This is usually no big problem but can lead to unstable results.

Moreover I would like to know some information about how to use a right pre_filt and water level, because I would like not to lose information specially in low frecuencies.

This is a bit of a dark art - here is my take - others likely do it different. In general the pass band of pre_filt [f2, f3] should be pretty much the frequency range you are interested in. To aid stability f1 should be no larger then f2/2 and f4 no smaller than 2.0 * f4. The water_level mainly serves to ensure numerical stability and kind of how far down you trust the instrument response. If you operate fully in the pass band of your instrument the water_level should have almost no effect.

Note that the remove_response() method has a plot keyword argument which helps you judge the effect of the various parameters: Your script not only removes the response but also adds another one so of course it will be different. Remove the paz_simulate and make sure the units are correct and it should look pretty similar. Most instrument responses can be corrected very well with just the poles and zeros and the total sensitivity but for some instruments that’s not true and the full response is required. Cheers! Lion