WindowFunction
WindowFunction [/FFT[=f ] /DEST=destWave ] windowKind, srcWave
The WindowFunction operation multiplies a 1D (real or complex) srcWave by the named window function.
By default the result overwrites srcWave.
Parameters
| srcWave | A one-dimensional wave of any numerical type. See ImageWindow for windowing two-dimensional data. | |
| windowKind | Specifies the windowing function. Choices for windowKind are: | |
| Bartlett, Blackman367, Blackman361, Blackman492, Blackman474, Cos1, Cos2, Cos3, Cos4, Hamming, Hanning, KaiserBessel20, KaiserBessel25, KaiserBessel30, Parzen, Poisson2, Poisson3, Poisson4, Riemann, and an assortment of flat-top windows listed under FFT. | ||
| See FFT for window equations and details. The equations assume that /FFT=1. | ||
Flags
| /DEST=destWave | ||
| Creates or overwrites destWave with the result of the multiplication of srcWave and the window function. | ||
| When used in a function, the WindowFunction operation by default creates a real wave reference for the destination wave. See Automatic Creation of Wave References for details. | ||
| /FFT [=1] | The window interval is 0...N=numpnts(srcWave). This sets the first value of srcWave to zero, but not the last value. This is appropriate for windowing data in preparation for Fourier Transforms, and is the same algorithm used by FFT. | |
| If /FFT is missing or /FFT=0, the window interval is 0...N=numpnts(srcWave)-1. This sets the first and last value of srcWave to 0. This is the (only) algorithm that the Hanning operation uses. | ||
Details
A "window function" alters the input data by decreasing values near the start and end of the data smoothly towards zero, so that when the FFT of the data is computed the effects of nonintegral-periodic signals are diminished. This improves the ability of the FFT to distinguish among closely-spaced frequencies. Each window function has advantages and disadvantages, usually trading off rejection of "leakage" against the ability to discriminate adjacent frequencies. For more details, see the References.
WindowFunction stores the window function's normalization value (the average squared window value) in V_value. This is the value you would get from WaveStats's V_rms*V_rms for a wave of sricWave's length whose values were all equal to 1:
Make/O data = 1
WindowFunction Bartlet, data // Bartlet allowed as synonym for Bartlett
Print V_value // Prints 0.330709, mean of squared window values
WaveStats/Q data
Print V_rms*V_rms // Prints 0.330709
See Also
References
For more information about the use of window functions see:
Harris, F.J., "On the use of windows for harmonic analysis with the discrete Fourier Transform", Proc, IEEE, 66, 51-83, 1978.
Online Wikipedia entry: http://en.wikipedia.org/wiki/Window_function.