-
Notifications
You must be signed in to change notification settings - Fork 113
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
Create WelchConfig object #502
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #502 +/- ##
==========================================
+ Coverage 97.56% 97.58% +0.01%
==========================================
Files 18 18
Lines 3124 3147 +23
==========================================
+ Hits 3048 3071 +23
Misses 76 76 ☔ View full report in Codecov by Sentry. |
Should we introduce periodogram(s::AbstractVector{T}, config::WelchConfig) where T<:Number = welch_pgram(s, config)
periodogram(signal::AbstractVector, config::MTConfig) = mt_pgram(signal, config) ? I'm not sufficiently familiar with these functions to tell whether this makes sense, but if it doesn't, the common supertype |
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.
Testing welch_pgram!
would be good to get it covered as well.
On the topic of abstract supertypes, |
True. I wouldn't mind it being deleted if it bothers you. |
f13c4e3
to
5c54327
Compare
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.
Generally LGTM.
The suggestions concerning the default for buffer
are just that - suggestions.
As I don't know this code too well, another approval before merge would be welcome.
buffer kwargs Co-authored-by: Martin Holters <[email protected]>
With so many configs lying around, would it be good to also add configs for |
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.
I'm also not too familiar with this code, but I looked through it and I think it's good for merging.
Also FWIW I ran tests for SignalAnalysis.jl
master (which uses welch_pgram
) with this PR after fixing up digitalfilter
and compat there and they passed.
Merging soon, if there aren't further objections.
This allows
welch_pgram
to use a predefined set of configuration parameters in an object namedWelchConfig
, rather than passing these configuration values by keyword argument. FFT plans and intermediate buffers are preconfigured inWelchConfig
making repeated calls that use the same config object faster.This also sets
MTConfig
andWelchConfig
to be children of the abstract typeAbstractPGramConfig