[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in IDL's hanning() window-generating function
David Fanning wrote:
> Scott Bennett writes after a long analysis of the Hanning function:
>
> > In any case, I think the point Harris made is that a discrete
> > sampling of a window function should not taper to the same value at
> > the end that it has at the beginning because to do so would include
> > the first sample of the *next* period (windowed segment.) So IDL's
> > hanning() gets it wrong for both even- and odd-length windows. :-(
>
> Uh, huh. And how did RSI respond when you contacted them
> about it?
I suspect they would suggest the following workaround:
function Harris, n, _EXTRA=extra
return, (hanning(n+1, _EXTRA=extra))[0:n-1]
end
Scott, I've read your post, but I'm not sure I'm getting the point.
Tapering from zero to zero seems like good idea to me, the symmetry
sort of "feels good". Besides, it is convenient to have the weight of
the window at its centre. What exactly is so wrong with it?
Jaco
PS: I would look it up myself, but I seem to have misplaced
IEEE vol. 66 somehow...
----------------
Jaco van Gorkom
FOM-Instituut voor Plasmafysica "Rijnhuizen", The Netherlands
e-mail: gorkom@rijnh.nl