Statistical Methods

Apply a Hann taper without confusing window gain and signal amplitude

Define the task

A finite record may begin and end at incompatible values when treated as a repeating signal. A taper downweights its edges, reducing some spectral leakage while broadening peaks and changing amplitudes. Choose the taper for the intended spectral procedure rather than assuming that any smooth-looking sequence is scientifically improved.

Carry out the check

For the symmetric Hann window of length N, weight sample n by 0.5 minus 0.5 cos(2πn/(N−1)). Multiply each observation by its weight. Record the endpoint convention: a periodic Hann window used for some spectral workflows is not identical to this symmetric form. The mean window weight is the coherent gain, but dividing by that gain is not a universal correction for all signals or power-spectrum definitions.

Worked hypothetical example

For four hypothetical observations all equal to 2, the symmetric weights are 0, 0.75, 0.75 and 0. The tapered sequence is 0, 1.5, 1.5 and 0; mean weight is 0.375. This is a changed sequence, not evidence that the original process fell to zero at either end. The accompanying tool reports the weights and their squared sum so the chosen downstream scaling can be audited. It does not estimate a power spectral density or automatically correct amplitudes.

Method checked 15 November 2026 against SciPy documentation: hann.

Open the symmetric hann taper audit.

Related reading

Reading path: Analyze data. Guide 147 of 152. Choose any guide to suit your project.

Statistical Methods

Record the assumptions of a Savitzky–Golay smoothing window

Specify polynomial smoothing and boundary assumptions.

Statistical Methods

Apply a prespecified Box–Cox transformation reproducibly

A practical guide with worked examples: Apply a prespecified Box–Cox power to positive measurements.

Browse this reading pathTools for this stageGuides and downloads for this stage