-
Notifications
You must be signed in to change notification settings - Fork 239
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
added q value parameter to be passed to filter functions #515
added q value parameter to be passed to filter functions #515
Conversation
I have added a 2nd parameter to the filter functions low_pass, high_pass, to_low_pass, and to_high pass; allowing a q value to be passed along with the frequency.
this is intended as a solution to #514 |
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.
Hi there, thanks for the contribution, I am just passing along and had some thoughts hope you don't mind me adding them as a review:
I personally have a vague idea what a q value is, but I do know high/low pass and freq. How would you feel about adding doc/comments that specify a good default q value?
And/Or we could change the proposed API, make it an Option defaulting to a good default. Yet another alternative would be the builder pattern, though that might be overkill.
Finally, this would change the public API (adding a parameter). That would require every downstream user to fix their code adding the parameter. Maybe we could add another method? Something along the lines of high_pass_with_q
?
I agree that changing the existing method could cause problems. |
I have added secondary methods which are the same as |
I think I have got a good solution for that. Lets make the implementation of the non q versions call the |
The low_pass, etc. now just call low_pass_with_q while also passing the original default q value of 0.5
I have implemented this correction. |
I believe this could be better implemented using a default instead of a secondary method. I will implement this change |
Upon revision. that would not be possible. I believe this should be pulled to master as the |
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.
Looks great, I found some small stuff but that should be easy to fix.
After that you should ask est31 for a review. They are a maintainer and can merge this. I am only trying to help them out a bit.
Ps; its perfectly normal to have little errors like this, I have it too. You read over it yourself without noticing.
Co-authored-by: David Kleingeld <[email protected]>
Co-authored-by: David Kleingeld <[email protected]>
My apologies for the rookie mistakes. I am fairly new to rust as a programming language. I will submit the pull request for review. You have been a massive help, thank you. |
@est31 could this please be merged? Thanks. |
I have added a 2nd parameter to the filter functions low_pass, high_pass, to_low_pass, and to_high pass; allowing a q value to be passed along with the frequency.