I have a signal, shown in the attachment (blue one). As you can see that the latter part of my signal has a higher dc offset. I want to bring the signal into the same level. I have tried eliminate the low frequency signal by using FFT (I FFT the signal, then set the low frequency element to be 0, then returned it by IFFT), but the result that I get is shown in red color. I am open to any suggestion and any python code is very appreciated.
First part for an answer. There are several unknowns in you question. The fist is of course:
- why do you really want to bring the signal to the same level?
and the second:
- what is this "same level"?
Assuming that the baseline is the lower levels, do those simulated signals approximately match your expectations?