Apologies if I'm using incorrect terms, and if this question's already been answered here. I have a data set which consists of a high DC signal modulated by AC signal (taken from custom-built biomedical instrumentation). Now the problem is that my signal has some low-frequency features that I'm having a hard time getting rid of using scipy. Please note that I'm a researcher but have limited practical experience in signal processing. I first do a low-pass on the signal to remove high-frequency components, and then I am trying to add a second filter to remove this low-frequency feature.
I tried doing a (butterworth order 1, cutoff 0.1Hz) high-pass filter but this removes the DC offset, which is important for me to keep (Figure 1). It also behaves in a rather odd manner.
I then tried doing a (butterworth order 1, band 0.1Hz to 0.5Hz) bandstop filter (removing low frequencies just above zero and just below my range of interest) but this results in a strange peak in the filtered output which I am unable to explain (Figure 2 - bonus points for someone who can shed light on this).
What I want to do is level the data, and remove these artifacts, so that each peak will be in line with the next. I've searched around but there doesn't seem to be an obvious and readily available solution to this.
To give you an idea of what I would really like to do, here is a similar treatment of the signal done in OriginPro: (Look at the blue signal - it has not had its DC offset shifted at all. How is OriginPro implementing this highpass filter? How can I replicate this behaviour in scipy?)
Why do I want to use scipy if my job's being done in Origin? Simple: (1) I want to understand the processing in greater detail so I can optimize it to not lose important parts of the signal (2) To automate the entire processing from acquisition to analysis.
Would greatly appreciate any help at all. Thanks in advance.