# Instrument Response Reomoval

**URL:** https://discourse.obspy.org/t/instrument-response-reomoval/2371
**Category:** Usage Questions
**Created:** [March 12, 2026, 2:25pm UTC](https://discourse.obspy.org/t/instrument-response-reomoval/2371 "2026-03-12T14:25:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Muhammad\_Awais](https://discourse.obspy.org/user_avatar/discourse.obspy.org/muhammad_awais/32/1162_2.png) [@Muhammad\_Awais](https://discourse.obspy.org/u/Muhammad_Awais)
#### Post date: [March 12, 2026, 2:25pm UTC](https://discourse.obspy.org/t/instrument-response-reomoval/2371/1 "2026-03-12T14:25:08Z")

</div>

Hi there,

I have an XML file for my station and am trying to convert counts to displacement (m) using obspy. I also did separate counts to velocity (m/s), and integrated to displacement (m). After simulating to WA seismometer using gains 1, magnification (V) 2800, and damping factor (h) 0.8/km, I measured the mean maximum displacement on two horizontal components to put into the Oman Local Magnitude Scale equation below:

ML = logAwa(R) +0.95logR + 0.0011R− 3

Paper link: [Determination of a local earthquake magnitude scale for the Sultanate of Oman | Arabian Journal of Geosciences | Springer Nature Link](https://link.springer.com/article/10.1007/s12517-014-1343-9)

I noticed that for my recorded event with (epicenter ~890 km, depth 10 km, reported local network ML 4.61), the measured mean maximum amplitude from two horizontal components is around 41 micrometers; however, for a similar event (epicenter ~960 km, depth 10 km, and magnitude 4.59), their mean maximum amplitude is around ~1300 micrometers. For this, my calculated ML is 2.40, while the reported one is 4.61. This is a 2.21 ML difference from the reported ML because my measured mean maximum displacement on the WA seismometer is way less than it should be. Can you please guide me on where I am making the mistake? It must be with the amplitude measurement on the simulated WA seismometer, or earlier, with my Instrument response removal step. I can not figure it out myself so far. Please help. Thanks

Best,

Muhammad Awais

---

<div class="post-metadata">

### Author: ![filefolder](https://discourse.obspy.org/user_avatar/discourse.obspy.org/filefolder/32/411_2.png) [@filefolder](https://discourse.obspy.org/u/filefolder)
#### Post date: [March 15, 2026, 6:09am UTC](https://discourse.obspy.org/t/instrument-response-reomoval/2371/2 "2026-03-15T06:09:19Z")

</div>

if you remove the instrument response to recover displacement (e.g. `st.remove_response(inv,output=’DISP’)` are the resulting amplitudes similar to the reported 1300 um?

---

<div class="post-metadata">

### Author: ![ThomasLecocq](https://discourse.obspy.org/user_avatar/discourse.obspy.org/thomaslecocq/32/10_2.png) [@ThomasLecocq](https://discourse.obspy.org/u/ThomasLecocq)
#### Post date: [March 16, 2026, 4:12pm UTC](https://discourse.obspy.org/t/instrument-response-reomoval/2371/3 "2026-03-16T16:12:28Z")

</div>

also note that ML for \>400 km distance is probably not super-super adapted…

---

<div class="post-metadata">

### Author: ![zacherle](https://discourse.obspy.org/user_avatar/discourse.obspy.org/zacherle/32/1180_2.png) [@zacherle](https://discourse.obspy.org/u/zacherle)
#### Post date: [March 21, 2026, 12:20pm UTC](https://discourse.obspy.org/t/instrument-response-reomoval/2371/4 "2026-03-21T12:20:04Z")

</div>

Try to set `stats.calib` to 1.0 immediately after calling `remove_response`, for example:

```python
st.remove_response(inv) # or st.remove_response(inv,output='DISP')
for trace in st:
    trace.stats.calib = 1.0

```

ObsPy does not automatically reset `stats.calib` after these operations, so you need to do this manually to ensure the data is scaled correctly for plotting and further processing.  
This is especially necessary if you are reading data in CSS, GSE, SEG, or another format that provides raw counts and sets ‘stats.calib’ to a value other than 1.0.
