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

Improve plotting by replacing the rolling mean implementation #9

Open
sroener opened this issue Nov 6, 2022 · 0 comments
Open

Improve plotting by replacing the rolling mean implementation #9

sroener opened this issue Nov 6, 2022 · 0 comments

Comments

@sroener
Copy link
Collaborator

sroener commented Nov 6, 2022

This should be a replacement for the rolling function. Test with TSS

from scipy.ndimage import uniform_filter1d

if smoothing:
       if rolling:
           sample = sample.apply(lambda x:savgol_filter(x,window_length=21, polyorder=2))
           sample = sample.apply(lambda x:x-uniform_filter1d(x, 200))
       
       else:
           sample = sample.apply(lambda x:savgol_filter(x,window_length=21, polyorder=2))
           
   else:
       if rolling:
           sample = sample.apply(lambda x:x-uniform_filter1d(x, 200))
           
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

No branches or pull requests

1 participant