Removing response vs removing sensitivity

I wanted to get some opinions on whether I have found a potential bug, or I just have a usage issue.

I am looking at accelerometer data and have found that removing response creates some very undesirable results, while removing sensitivity seems to be just fine. I show an example in the attached screenshots. The first shows the result when simply removing sensitivity. The second shows the same data when removing response, and the earthquake signal is almost entirely lost. Both are in acceleration.

You can use the handy plot argument of remove_response() to see what is going on. It looks like the noise was amplified by the waterlevel.

Yes, the water level definitely seems to be causing problems. Only the high frequency signal is left.

You are right: The response information of the low-pass filter of the digitizer together with the low water level is causing your problems. Obviously, remove_response does not add much value for the flat response spectra of accelerometers. To get similar waveforms both with remove_response and with remove_sensitivity, you can try to set a higher water level (lower the value, because it is specified in dB relative to maximum) .

When you look at your data spectrum, you clearly want to not use a water level (water_level=None) and then instead use the pre_filt option.
Actually, the problem is that the water level is not even doing anything in your case, so you could try a lower water level, or just go the pre_filt route which is more intuitive.

Here is the result when using a pre-filter with no water level, which is still not desirable.

This is the result when I use a water_level = 1, which looks much better. (Note that I demeaned and detrended the signal for the last two figures)

The pre_filt you chose is not doing anything to suppress those high frequencies blowing up.

A) left part of pre_filt is not acting on those higher amplitudes at low frequencies, but it’s not problematic and you can get rid of them with a filtering afterwards if you want

B) pre_filt is not zeroing out the high frequencies, that originally in your data spectrum are low and not noticeable, but later get blown up because this is were the inverted response spectrum (the anti alias filter) blows this part up

C) high frequency part is out of control and gets blown up with 3-5 orders of magnitude higher than what the instrument correction does to the central part

you could try water level None and pre_filt maybe something like [0.02, 0.04, 10, 15]

Thank you @megies . This makes sense to me and seems to work well. I suppose this boils down to the response of the individual instrument. It seems to me that removing only sensitivity may be the better thing to do if I am simply staying in acceleration.

In your opinion, would you say that the maximum frequency of the pre-filter is limited to the Nyquist frequency? The results look quite good with a maximum frequency of 25 (this is a 50 Hz recording).

Well yes, water level mechanism depends a lot on the specific instrument response. With pre_filt you could simply restrict to the frequency range of interest and then hope that it works ok for most instruments.

Not sure if I understand correctly what you mean, but in any case your problem earlier was the steep slope of the Anti Aliasing filter, that you needed to cut off so in your case the upper pre_filt corner needed to be lower that that steep slope from the inverted instrument response