-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
add Baxter King filter #223
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #223 +/- ##
==========================================
- Coverage 95.87% 95.86% -0.02%
==========================================
Files 25 25
Lines 1067 1063 -4
==========================================
- Hits 1023 1019 -4
Misses 44 44
Continue to review full report at Codecov.
|
Hi @Shunsuke-Hori thanks for submitting! I googled for some references on the BK filter equations and found conflicting evidence. Two references are
A few differences:
your code seems to more closely follow the pdf, but I'm not sure. What reference did you use? How do we know which is correct? |
@sglyon Thank you for the review. I first looked the html but since the output was not same as python's, I switched to the pdf. I checked the original paper and it seems the pdf is consistent with the paper (although, honestly, I mindlessly trusted the result of `bk_filter' of python when I wrote the code) |
Hi @Shunsuke-Hori So I think, it is fine. |
src/filter.jl
Outdated
- `y::AbstractVector` : data to be filtered | ||
- `wu::Real` : upper cutoff frequencies | ||
- `wl::Real` : lower cutoff frequencies | ||
- `K::Integer` : number of lead and lag of the moving average |
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.
Should be leads and lags
Many thanks @andi3141 for your review. This looks good to me too (aside from very minor comment above). |
Codecov Report
@@ Coverage Diff @@
## master #223 +/- ##
==========================================
- Coverage 95.87% 95.86% -0.02%
==========================================
Files 25 25
Lines 1067 1063 -4
==========================================
- Hits 1023 1019 -4
Misses 44 44
Continue to review full report at Codecov.
|
Looks good to me. Over to you @sglyon |
test is added too