This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

gausssmooth and 2 color graph
#7
Ah, I think I found the issue and I can not blame it on numerical precision. I use a lookup-table for the Gauss function which I calculate once and which is already normalized. But if I cannot use 60 values to the right and to the left, the normalization of the look-up table is wrong and I need to renormalize the result. And the if that decides whether to do this renormalization is simply of by 1, so the normalization is slightly off if there are exactly 59 values to the right.

I also see your desire for negative indices. However, this would be problematic in other situations when you just calculate the index and want the index to be cut off at the end of the dataset instead of cycling to the other end of the data. However, to get the last n points, there is a simple alternative (unless it is an immense data set and speed is an issue):
Simply create another buffer with a fixed size n of exactly the number of data points that you want to average. Then use append to throw the entire buffer into it from which you want the last n values. The first values will be pushed out until the last n are in the new buffer.

Finally, about the LOESS method: Its use depends on the width (we call it d in the documentation) that you set. In fact, I implemented it to give a smooth representation of noisy data from a range-finder where Gauss would smooth away the curvature. LOESS fits a polynomial to a local window of data points and in principle you can make that window as wide as you like.

Am I correct that the issue with the dip is not too urgent? I will probably quickly fix the code, but if you do not need it right away, I will not push a beta version just for this little change.
Reply


Messages In This Thread
gausssmooth and 2 color graph - by solid - 11-14-2020, 09:35 PM
RE: gausssmooth and 2 color graph - by solid - 11-15-2020, 12:29 AM
RE: gausssmooth and 2 color graph - by solid - 11-15-2020, 10:37 AM
RE: gausssmooth and 2 color graph - by solid - 11-16-2020, 08:04 PM
RE: gausssmooth and 2 color graph - by Sebastian Staacks - 11-16-2020, 10:50 PM
RE: gausssmooth and 2 color graph - by solid - 11-17-2020, 12:24 AM
RE: gausssmooth and 2 color graph - by solid - 11-27-2020, 12:41 PM
RE: gausssmooth and 2 color graph - by solid - 11-27-2020, 03:13 PM
RE: gausssmooth and 2 color graph - by solid - 04-10-2021, 01:30 PM
RE: gausssmooth and 2 color graph - by solid - 04-10-2021, 08:19 PM
RE: gausssmooth and 2 color graph - by solid - 04-15-2021, 08:44 PM
RE: gausssmooth and 2 color graph - by solid - 04-15-2021, 09:11 PM

Forum Jump: