Instrument response correction

Hi,
I would appreciate it if someone could help me out. I used the following lines to remove the instrument response, but I was wondering if my procedure is correct? I need to remove the instrument response of this record and check the correlation with my simulation up to 5Hz.

from obspy import read
from obspy.signal.invsim import corn_freq_2_paz
st = read(r"C:\Users\NAV\Desktop\Van018\Alfred_van2015-07-15\ALFS\ALFS_20150715_215948.seed")
st.detrend(type=“demean”)
st.detrend(type=“linear”)
st.detrend(type=“polynomial”, order=2) # Adjust the order as needed
paz_sts2 = {‘poles’: [-3.70080e-02-3.70080E-02j, -3.70080E-02+3.70080E-02j,
-1131+0.0j,
-5.02650E+02+0.0j, -1.00500E+03+0.0j],
‘zeros’: [0+0j, 0+0j],
‘gain’: 5.71508E8,
‘sensitivity’:7.99998E8}

pre_filt = (0.08, 0.1, 5.2, 6.0)
st.simulate(paz_remove=paz_sts2, pre_filt=pre_filt )
st.plot()
st.write(“ALFS_vel_removedInstrumentresponse”, format=“TSPAIR”, Units=‘m/s’)

I have used this line before, but it creates a significant discrepancy at low frequencies between my recordings and simulations.

paz_10hz = corn_freq_2_paz(10.0)
st.simulate(paz_remove=paz_sts2, paz_simulate=paz_10hz)

I am just wondering whether I need to use paz_simulate=paz_10hz or not.
Thank you so much

I’m not sure where you got your STS-2 polezero response from (?)
If I look at a nominal STS-2 response, there are a lot more poles and zeros:

(https://service.iris.edu/irisws/nrl/1/combine?instconfig=sensor_Streckeisen_STS-2_EG3_SG1500_LP120_STgroundVel&format=resp)

#              Complex zeroes:
#              i  real          imag          real_error    imag_error
B053F10-13     0  +0.00000E+00  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F10-13     1  +0.00000E+00  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F10-13     2  -1.51500E+01  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F10-13     3  -1.76600E+02  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F10-13     4  -4.63100E+02  -4.30500E+02  +0.00000E+00  +0.00000E+00
B053F10-13     5  -4.63100E+02  +4.30500E+02  +0.00000E+00  +0.00000E+00
#              Complex poles:
#              i  real          imag          real_error    imag_error
B053F15-18     0  -3.70000E-02  -3.70000E-02  +0.00000E+00  +0.00000E+00
B053F15-18     1  -3.70000E-02  +3.70000E-02  +0.00000E+00  +0.00000E+00
B053F15-18     2  -1.56400E+01  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F15-18     3  -9.73400E+01  -4.00700E+02  +0.00000E+00  +0.00000E+00
B053F15-18     4  -9.73400E+01  +4.00700E+02  +0.00000E+00  +0.00000E+00
B053F15-18     5  -2.55097E+02  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F15-18     6  -3.74800E+02  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F15-18     7  -5.20300E+02  +0.00000E+00  +0.00000E+00  +0.00000E+00
B053F15-18     8  -1.05300E+04  -1.00500E+04  +0.00000E+00  +0.00000E+00
B053F15-18     9  -1.05300E+04  +1.00500E+04  +0.00000E+00  +0.00000E+00
B053F15-18    10  -1.33000E+04  +0.00000E+00  +0.00000E+00  +0.00000E+00
#

You have the low frequency poles so should have the long period corner defined, but
your high frequency shape may be off.

Also, keep in mind that you are only removing the sensor (polezero) and scaling to the overall (midband) sensitivity. Depending on your datalogger, this may or may not be correct.

Hi,
Thank you for your reply. Someone informed me that the instrument response of the soil (ALFS) and rock (ALFO) is the same. Since ALFO is an unofficial station (not part of the national network), I downloaded the instrument response for ALFO.
client = Client(“IRIS”)
network = “WU”
station = “ALFO”
location = “*”
channel = “HH?” # Channel code
start_time = UTCDateTime(“2015-07-15T21:59:56”) # Start time for metadata
time=“2015-07-15T22:00:56”;
inventory = client.get_stations(network=network, station=station, location=location,
channel=channel, starttime=start_time, level=“response”)
channel = inventory[0][0][2]
response = channel.response
inventory.write(“station_response_ALFO.xml”, format=“STATIONXML”)

I also use this XML file for ALFS.
t = UTCDateTime(“2015-07-15T21:59:56”)
st = read(r"C:\Users\Ns\Desktop\Record data ALFS-ALFO\Alfred basin_vankleek eq 2015-07-15\ALFS\ALFS_20150715_215948.seed", starttime=t, endtime=t+1.5*60)
st.detrend(type=“demean”)
st.detrend(type=“linear”)
st.detrend(type=“polynomial”, order=2)
pre_filt = (0.09, 0.1, 5.0, 5.2)
paz_sts2 = {‘poles’: [-0.044422+0.044422j, -0.044422-0.044422j, -502.65+0j, -1005.0+0j, -1131.0+0j],
‘zeros’: [0+0j, 0+0j],
‘gain’: 571508000.0,
‘sensitivity’:799998000.0}
st.simulate(paz_remove=paz_sts2, pre_filt=pre_filt)
st.write(“ALFS_data”, format=“TSPAIR”, Units=‘m/s’)
st.plot()

But I am not sure whether this way is correct. I would appreciate it if you could help me find out.