Window functions are used in spectral
analysis/modification/
resynthesis, as well as
beamforming and
antenna design. (DTFT) also exhibits the same leakage pattern (rows 3 and 4). But when the DTFT is only sparsely sampled, at a certain interval, it is possible (depending on your point of view) to: (1) avoid the leakage, or (2) create the illusion of no leakage. For the case of the blue DTFT, those samples are the outputs of the
discrete Fourier transform (DFT). The red DTFT has the same interval of zero-crossings, but the DFT samples fall in-between them, and the leakage is revealed.
Spectral analysis The
Fourier transform of the function is zero, except at frequency ±
ω. However, many other functions and waveforms do not have convenient closed-form transforms. Alternatively, one might be interested in their spectral content only during a certain time period. In either case, the Fourier transform (or a similar transform) can be applied on one or more finite intervals of the waveform. In general, the transform is applied to the product of the waveform and a window function. Any window (including rectangular) affects the spectral estimate computed by this method.
Filter design Windows are sometimes used in the design of
digital filters, in particular to convert an "ideal" impulse response of infinite duration, such as a
sinc function, to a
finite impulse response (FIR)
filter design. That is called the
window method.
Statistics and curve fitting Window functions are sometimes used in the field of
statistical analysis to restrict the set of data being analyzed to a range near a given point, with a
weighting factor that diminishes the effect of points farther away from the portion of the curve being fit. In the field of Bayesian analysis and
curve fitting, this is often referred to as the
kernel.
Rectangular window applications Analysis of transients When analyzing a transient signal in
modal analysis, such as an impulse, a shock response, a sine burst, a chirp burst, or noise burst, where the energy vs time distribution is extremely uneven, the rectangular window may be most appropriate. For instance, when most of the energy is located at the beginning of the recording, a non-rectangular window attenuates most of the energy, degrading the
signal-to-noise ratio.
Harmonic analysis One might wish to measure the harmonic content of a musical note from a particular instrument or the harmonic distortion of an amplifier at a given frequency. Referring again to
Figure 2, we can observe that there is no leakage at a discrete set of harmonically-related frequencies sampled by the
discrete Fourier transform (DFT). (The spectral nulls are actually zero-crossings, which cannot be shown on a logarithmic scale such as this.) This property is unique to the rectangular window, and it must be appropriately configured for the signal frequency, as described above. == Overlapping windows ==