A rectangular window keeps all samples in a selected finite record with equal weight and sets the signal outside it to zero. For discrete samples, for and zero otherwise. Calling this no taper does not remove the effect of having a finite record. SciPy's primary implementation documentation identifies the boxcar and rectangular window as this same all-ones choice.[ref]
Its discrete-time Fourier transform at frequency in cycles per sample is a finite geometric sum:At integer , the limiting value is . The first zeros surrounding the central maximum are at , so the central zero-to-zero width is . The phase factor depends on the record's time origin; the magnitude response does not.
For a continuous centered record of duration , on has transformwhere the normalized sinc function is . Multiplication by the finite window spreads a sharp spectral component according to this response, producing spectral leakage.
An original finite-record example quantifies an off-bin amplitude error. A complex tone of amplitude lying half a DFT bin from the nearest sampled frequency has normalized responseAt the ratio is about , or relative to the coherent peak. The coherent gain of a window is still one; it does not correct this scalloping loss. Zero-padding samples the same frequency response more densely rather than lengthening the measured record.
For independent equal-variance sample noise, rectangular weighting has equivalent noise bandwidth of one DFT bin under the usual coherent-amplitude normalization. A Hann window suppresses distant sidelobes but changes the central width and noise scaling. The primary analysis manual reports these separate window properties rather than one universal best window.[ref]
A proposed test records a known sinusoidal input with an integer and then a non-integer number of cycles in the same record length, holding the sampling rate and amplitude fixed. Compare the raw DFT bins and the continuous window response. This separates finite-record leakage and bin placement from aliasing, which involves a different sampling ambiguity.
New to topics? Read the docs here!