[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in IDL's hanning() window-generating function



Just an FYI for everyone on this topic. ;-)

Thanks,
Harold Cline
IDL Product Manager

------------------------------------------
RELEASE_NOTE for IDL5.5:
HANNING:
The formula to compute the Hanning window has been changed
from 0.5 * (1-Cos(2*!Pi*k/(N-1))) to 0.5 * (1-Cos(2*!Pi*k/N)).
Because of the change from 1/(N-1) to 1/N, the Hanning window will no longer
appear symmetric in the time domain, but will give improved results for
spectral estimation.

Additional notes:

When filters such as the Hanning are to be used as finite-impulse response
(FIR) filtering in the time domain, it is useful to have the filter be
symmetric, and go to zero at both ends. However, if you are filtering your
time series in preparation for doing spectral analysis, the filter should
not be symmetric, and should not go to zero at one of the endpoints. Thus,
the new behavior of the HANNING function assumes it will be used for
spectral analysis.

Reference: Oppenheim & Schafer (Discrete-Time Signal Processing, 1999), p.
468-469.