-
Notifications
You must be signed in to change notification settings - Fork 63
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
[ENH] - Add IRASA #212
[ENH] - Add IRASA #212
Conversation
@TomDonoghue Everything here looks good to me. I pushed tests updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: there was a bug in my spline code.
So I was going to suggest following what Wen and Liu do for upsampling and downsampling, which is to use cubic splines to interpolate. I decided to try and implement this to compare against what is currently done using scipy.signal.resample_poly
which filters and then imputes with zeroes. I was a bit surprised to find that the cubic spline method basically performs identically to the current way of upsampling and downsampling. I benchmarked on sum of sinusoids models with various central frequencies and the two methods differed very slightly but imperceptibly so. I did notice some interesting behavior with IRASA but I'll post that in an issue.
Anyways, I think what's currently implemented is good.
Okay, this all looks sounds good to me! @elybrand - thanks for the dive into the resampling! I was curious about the resampling approach here, and glad to see the different approaches seem equivalent! This is a a really nice sanity check to have. Some notes for myself: |
@TomDonoghue I went though your updates and everything looks good to me. |
This all seems good then - merging in! |
Add an implementation of IRASA.
Note - this implementation is inspired by / draws from the one in YASA:
https://github.com/raphaelvallat/yasa/blob/master/yasa/spectral.py#L326
Reviews / ToDos:
Some quickstart code to try it (it seems to work in the simple case):
Creates this output: