Open lnacquaroli opened 4 years ago
Not sure what QLab is?
I've been having a bugger of a time with Sgolay, using DSP.jl broke my package a few weeks ago, and I had to write my own Conv1D function etc.
Yes the edges do appear distorted relative to Matlabs implementation. The tricky part is this, savitsky golay loses information at the edges by doing the convolution, it's inevitable. Basically it's an FIR filter if I recall correctly. So some implementations, I think, enforce different boundary conditions, IE: mirror, repeating, set to 0, etc. I haven't looked at your example yet - but I can try to make it match more closely to matlab if you want.
Thank you again for the heads up!
Hi thanks for the reply.
Yeah, it was someone who actually posted that the data filter did not match that one from Matlab's. But, in any case, are just the edges, as you said. I actually found another SG implementation a bit old, using generated functions, that has the same issue.
The DSP.jl seems to work for me.
Hi there,
Please see here. Apparently the implementation of the SG filter from Qlab is not fully correct. I check with yours here and I got the following:
It seems that the SG should produce the same input
x
for this case. I checked with Matlabsgolayfilt
and it does give[1,2,3,4,5,6,7,8,9,10]
. Looks like the edges are distorted. In the Qlab implementation we have the same problem: