# Window function
A **window function** is a function that is zero outside a chosen interval and tapers smoothly to
zero at the edges of that interval rather than stopping abruptly. Multiplying a longer signal by a
window keeps only the segment that falls inside the interval, shaped so its edges do not cut the
signal off sharply; the practice is also called apodization or tapering. It is applied whenever a
finite stretch of an otherwise longer or continuous signal must be examined on its own — before a
[[Fourier_transform|Fourier transform]], before an [[Finite_impulse_response|FIR filter]] is designed
from an ideal frequency response, or before a statistical estimate is fit to noisy data. The Spectral
estimation sketch on this page carries a signal built from several sine waves plus noise through this
step: the reader sets how many tones are present, how much noise corrupts them, and how many samples
are transformed, then switches the taper between a plain rectangular cut and a Hann window to watch
the spectrum sharpen, spread, or sink beneath a rising leakage floor.
Every window is a compromise between two things a sharp cutoff does badly at once: concentrating a
signal's energy into a narrow band of frequencies, and keeping the energy that leaks into neighboring
bands low. A rectangular window — the default of simply keeping N samples and discarding the rest —
has the narrowest possible main lobe but the highest [[Spectral_leakage|leakage]] into distant
frequencies; every other shape in this article trades some of that narrowness for lower leakage, in a
different place along the same curve. Dozens of named windows exist because different jobs sit at
different points on that curve: an application tolerant of nearby interference wants narrowness, one
sensitive to a weak signal beside a strong one wants low side lobes, and a handful of adjustable
windows let the same shape be dialed between the two.
## Applications
Spectral analysis is the largest use: a window shapes a finite block of samples before a
[[Discrete_Fourier_transform|discrete Fourier transform]], so the transform sees a tapered segment
rather than one with sharp edges that behave, once the transform treats the segment as endlessly
repeating, like a discontinuity of their own. In [[Filter_design|filter design]], the window method
builds a practical [[Finite_impulse_response|FIR filter]] by taking the impulse response of an ideal
filter, which in general runs on forever, and multiplying it by a window that truncates it to a usable
length; the window's own frequency response then sets how much ripple and how sharp a transition band
the finished filter has. In [[Statistics|statistics]] and curve fitting, a taper is applied for the
same reason a spectral analyst applies one: to down-weight the samples nearest the edge of a finite
data record so that an estimate — a [[Spectral_density|spectral density]], a correlation, a regression
— is not dominated by an artifact of where the record happens to start and stop. Rectangular window
applications are the exception that proves the rule: a plain rectangular window, equivalent to no
taper at all, is still the right choice for a transient that already starts and ends near zero within
the record, so there is no edge discontinuity to tame, and for harmonic analysis of a signal that is
exactly periodic in the record length, where every one of its frequency components already falls on a
bin and no leakage is possible regardless of the taper.
## Overlapping windows
A single windowed segment necessarily down-weights the samples near its edges, so a long signal
cannot be covered evenly by laying non-overlapping windows end to end: whatever a window suppresses at
one segment's edge is never picked up by its neighbor. The standard remedy is to overlap consecutive
segments, typically by half the window length for a Hann window or by three-quarters for a window with
a wider taper, so that a sample near the edge of one segment sits near the middle, fully weighted, of
the next. A set of overlapped windows is said to satisfy the constant-overlap-add property when the
shifted copies sum to a constant at every sample; this matters both for the
[[Short-time_Fourier_transform|short-time Fourier transform]], which tracks how a spectrum changes
over time by transforming many overlapped, windowed segments in turn, and for resynthesizing a signal
from windowed segments afterward without an amplitude ripple appearing at the seams. Denser overlap
buys smoother coverage at the cost of more segments to transform for the same total record, a
resolution-versus-computation trade that runs alongside the one the window shape itself makes.
## Two-dimensional windows
A window need not be restricted to a single dimension. The direct extension multiplies a
two-dimensional array by a separable window built from the product of two one-dimensional profiles,
one along each axis; the alternative is a radially symmetric window built by rotating a single
one-dimensional profile about the center, which avoids the faint diagonal-versus-axis asymmetry a
separable product leaves in its frequency response. Two-dimensional windows serve the same purpose as
their one-dimensional counterparts wherever a finite two-dimensional record must be transformed or
filtered: tapering an image before a two-dimensional [[Fourier_transform|Fourier transform]] in
[[Digital_image_processing|digital image processing]], to control the ringing a sharp rectangular crop
would otherwise introduce, and tapering the illumination across a receiving or transmitting aperture in
an [[Antenna_array|antenna array]], to trade main-beam width for lower sidelobes in the radiated or
received pattern, in direct analogy with a one-dimensional window trading main-lobe width for lower
spectral sidelobes. A radar image formed by combining range and Doppler processing is tapered in both
of those dimensions for the same reason a one-dimensional spectrum is tapered in one: the sidelobes
of a strong reflector would otherwise mask a weak one sitting nearby in range or in velocity.
## Examples of window functions
The rectangular window is the trivial case: it is 1 across the chosen interval and 0 outside it,
equivalent to applying no taper at all before a [[Discrete_Fourier_transform|discrete Fourier
transform]]. Its frequency response is a sinc function whose main lobe is the narrowest of any window
in this article and whose side lobes — a first side lobe only about 13 dB below the peak — are the
highest, which is the [[Spectral_leakage|leakage]] a taper exists to reduce.[^tib96]
The triangular and Parzen windows belong to the B-spline family, built by convolving the rectangular
window with itself one or more times; each additional convolution smooths the shape further, widening
the main lobe but pushing the side lobes down and making them fall off faster with frequency. The
Welch window, a simple upward parabola reaching zero at both edges, sits close to the triangular window
on the same trade-off without being built by convolution at all.
The raised-cosine family adds a single cosine term to a constant: the Hann window sets the constant
and the cosine's amplitude equal, which places a zero exactly at the window's edges, while the Hamming
window uses a slightly different ratio chosen to cancel the first side lobe instead. Against a
rectangular window of the same length, the Hann window's main lobe is about twice as wide but its side
lobes fall far lower and keep falling.[^tib101] The difference shows up directly in how well two
nearby tones can be told apart: for a 10 Hz tone observed for one second, a second tone only 1 Hz away
is still merged into a single peak, one 2 Hz away is resolved but its measured frequency is biased by
the first tone's skirt, and only past about 2.5 Hz of separation does the pair read cleanly under a
rectangular window.[^tib98] A second tone at one quarter the amplitude of the first is masked
completely at 1 Hz of separation and stays visibly biased even at 2 Hz; a window with lower side lobes
trades away a little of that raw resolution to pull the weak tone free sooner.[^tib100] The
cosine-sum windows generalize the idea by adding more cosine harmonics: the three-term Blackman
window; the four-term Nuttall and Blackman–Harris windows, close relatives with different coefficient
choices, alongside the related Blackman–Nuttall design; and the flat top window, whose several terms
are chosen not for a low side lobe but for a passband so flat that a tone which does not sit exactly on
a bin still reads close to its correct amplitude, at the cost of the widest main lobe of any window in
common use. The Rife–Vincent windows are a further, parametrized family in the same cosine-sum form.
Some windows expose the trade-off as a continuous parameter rather than fixing it by name. The
Gaussian window, and the confined, approximate confined, and generalized normal variants built to
correct its slow taper to an exact zero, is set by a single width parameter; the Tukey window is a
rectangular window with only its two edges cosine-tapered, adjustable from a pure rectangle to a full
Hann shape by the fraction of the length given to the taper; the Planck-taper window uses a smoother,
exponential-based edge for the same purpose. The Kaiser window, built from a modified Bessel function,
approximates the discrete prolate spheroidal sequence, or Slepian window — the shape that is provably
optimal at concentrating a fixed-length signal's energy inside a chosen bandwidth — far more cheaply
than computing the Slepian window directly; the Dolph–Chebyshev and ultraspherical windows instead fix
every side lobe at the same chosen level and let the main lobe width follow from that choice. The
exponential, or Poisson, window applies a one-sided or symmetric exponential decay, suited to signals
that are themselves decaying.
A handful of windows are hybrids of two of the families above, chosen for a particular roll-off: the
Bartlett–Hann, Planck–Bessel, and Hann–Poisson windows each combine two constructions to shape how
quickly the side lobes fall rather than only how low they start. Other windows, including the
generalized adaptive polynomial window and the sinc-based Lanczos window, also used to resample
images, fill in further points on the same map. Every window described so far is symmetric about the
center of its interval; an asymmetric window instead tapers its two edges differently, useful when a
transient's sharp onset must be preserved while its slower decay is tapered away.
## Microsims
The Spectral estimation sketch estimates a power spectral density from a short, noisy record and lets
the choice of window act directly on the result. K sets how many sine-wave components make up the
signal, from one up to six; the noise slider sets how much white noise is layered on top, from none up
to a level that can swamp a weak tone entirely; f0 sets the fundamental frequency the components are
built from; the FFT size control sets how many samples, from 64 up to 512, are transformed at once,
with a longer record giving narrower bins and sharper peaks; and a window dropdown switches the taper
applied before the transform between rectangular and Hann. The left panel plots the time-domain record
x[n]; the right panel plots the resulting periodogram, the power estimate P(f) = |FFT{x·w}|²/N, on a
decibel scale, so a lower window floor between peaks is visible directly as a lower baseline.
*Try:* Switch the window from rectangular to Hann at a fixed FFT size and watch the floor around a
strong tone drop while its peak spreads slightly wider, trading a little sharpness for the leakage the
rectangular window was hiding in plain sight.
A three.js companion renders the same trade-off as a surface, plotting main-lobe width against
side-lobe level for the window family described above.
<!-- SIGSIM:BEGIN g35 — Signal Processing portal microsim (framework build, specs/sims/Window_function.json); do not hand-edit inside -->
**Microsim — three.js (Wikitube framework), pending deploy:** *Window functions: main-lobe width against side-lobe level* will play here once `https://wikitube-3d-microsims.netlify.app/signal/Window_function.html` is live.
<!-- pending: <div class="wt-sim" data-src="https://wikitube-3d-microsims.netlify.app/signal/Window_function.html" data-title="Window function"></div> -->
*Built from `MICROSIM_GUIDE/specs/sims/Window_function.json`; part of the [[Signal_processing]] set ([[PORTAL_Signal_Processing]]).*
<!-- SIGSIM:END -->
## Wikipedia : Wikitube
**Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Window_function) : [Wikitube](https://en.wikitube.io/wiki/Window_function)
Skeleton mirrored at revision 1368601234. Prose, emphasis and the microsims are Wikitube's own.
## See also
- [[Spectral_leakage]]
- [[Short-time_Fourier_transform]]
- [[Finite_impulse_response]]
- [[Discrete_Fourier_transform]]
- [[Filter_design]]
- [[Fourier_transform]]
- [[Spectral_density]]
## Notes
The Spectral estimation sketch is ILLUSTRATIVE: it adds synthetic white noise and computes a single
periodogram directly from one FFT rather than averaging several overlapped segments, which is closer
to standard practice for a genuinely noisy record.
## Page citations
Page numbers in the references below are the PDF page numbers of the open edition linked there, not
the printed page numbers of the original work.
## References
[^tib96]: Tiberius, C.; Mulder, M. *Engineering Signal Analysis: From Fourier to filtering: Theory*. 2026, p. 96 (PDF page). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/engineering-signal-analysis-from-fourier-to-filtering-theory . CC BY.
[^tib98]: Tiberius, C.; Mulder, M. *Engineering Signal Analysis: From Fourier to filtering: Theory*. 2026, pp. 98–100 (PDF pages). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/engineering-signal-analysis-from-fourier-to-filtering-theory . CC BY.
[^tib100]: Tiberius, C.; Mulder, M. *Engineering Signal Analysis: From Fourier to filtering: Theory*. 2026, p. 100 (PDF page). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/engineering-signal-analysis-from-fourier-to-filtering-theory . CC BY.
[^tib101]: Tiberius, C.; Mulder, M. *Engineering Signal Analysis: From Fourier to filtering: Theory*. 2026, pp. 101–102 (PDF pages). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/engineering-signal-analysis-from-fourier-to-filtering-theory . CC BY.
## Further reading
- Christian Tiberius; Max Mulder. *Engineering Signal Analysis: From Fourier to filtering: Theory* (2026). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/engineering-signal-analysis-from-fourier-to-filtering-theory
## External links
- Spectral estimation, live sketch: https://editor.p5js.org/sciencenibber/full/DN2hHBLIN
- Spectral estimation, editor fork: https://editor.p5js.org/sciencenibber/sketches/DN2hHBLIN
<!-- Hubs: Signal_processing. Portals: PORTAL_Signal_Processing. Signal Processing portal wave 1 · 2026-09-17 · drafted. -->