Savitzky Golay filter implementation #6
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@JohanMabille I wanted to submit this to get your feedback.
I tested that the outputs are identical to within numerical error of Python so I know the math is correct. I'm not clear on if I should be trying to build expressions to represent the algorithms or do as I'm doing and directly evaluate them. I need to add documentation to these as well. What is the preferred documentation tool?
I Implemented it using a Toeplitz matrix rather than a convolution because it can be multithreaded in the future where direct convolutions cannot be easily. Currently it is likely slower than a single threaded direct convolution but faster than direct evaluation of polynomial fit solving using least squares as would be required in the direct evaluation of the SG filter. Need to benchmark at some point. Likely a different PR.
This PR resolves #1
Thanks for any and all feedback!