smoothing of data


Jul Bob
03-15-2002, 01:44 AM
hi,
I tried to use the smoothing of data program smooft in pascal.
It gives the output of the smoothing in a weird format : for
an input data of 4096 pts for exemple, it gives the averaged
data in the last 4096 pts of a 8192 pts data where the first 4096
other points are just showing a slow decreasing line.
Furthermore, there is an oscillation, like if the data was superposed to itself and shifted a bit. I suspect this comes from
a wrong recombination of the data after FFT.
Anyone has any idea how to solve this ?

Thanks in advance
Julien

Bill Press
03-16-2002, 09:59 AM
Hello!

It's nice to see that someone is still using NR in Pascal, even though we never updated it beyond the First Edition (1989)! I'd be curious, though, about why you have stuck with Pascal, since most users have by now switched.

For the Second Edition we decided that smooft was not a very good routine and replaced it by the much more standard method of Savitzky-Golay filtering. So, smooft was retired, and we instead recommend using convlv with filter coefficients obtained from the new routine savgol. You might consider porting these 2nd Edition routines to Pascal.

So, smooft is not a maintained routine at this time. Are you dimensioning y to at least the next larger integral power of two than n+2*pts?

Perhaps some other 1st Edition user can help.