Closed journeytosilius closed 4 months ago
Hey, did you figure this out? I am struggling with the same problem. What does the result even mean? What can I do to get the entire smoothed vector? Do I need to run this in a loop for each point and a window of 2*m+1 around it?
hi, I have completely forgotten. I believe I ended up using another implementation instead of this one
Sorry for never getting back to you. This is because your convolution size and buffer size do not match.
If m = 151
one expects a vector of size 2*m+1 = 303
. Unfortunately as-is the library only supports vector of odd size, if I remember well this was a limitation of the original paper from which this implementation is derived.
There was an assertion in the code to display an error, but this would only show up in debug. I changed it to an exception and added a unit test for this particular case.
Hi, thank you for your work. This is a really interesting project since there are not savgol implementations for C++ that don't require a ton of dependencies. Unfortunately, I am testing smoothing a vector of length 300 ( so m is set to 151 ) and I get this error when I run it :
This is my code
Additionally, I have realized in your example that this implementation only returns the last datapoint, I am right ? Is there a way to get the entire vector smoothed from the start of the window ?
Is there something I am missing ? Thank you