Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolling mean offsetter #84

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

meierman1
Copy link

@meierman1 meierman1 commented Nov 5, 2021

Fix #80 by offsetting the rolling mean by a percentage of the standard deviation of the signal, making it DC-component-independent.

Independently, I added negative offsets. Various data that I have tested with suggest that sometimes it is more reliable to detect peaks based on the low points which is essentially what we are doing by moving the rolling average down.
This makes the library a bit slower (not too much but I did not measure). If we want to compensate, we can remove any offset above 70% as this corresponds to an average only 0.3% of all samples lie above.

I chose the base value as 4*std as this seemed to be the closest to the rolling mean for the included data, making the results (especially the best value) in that case nearly identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Results are depending on DC component of the signal
1 participant