A spectral taper changes a signal before the transform is taken. Correcting the height of a coherent sinusoid and estimating broadband noise density then require different accounts of the taper. One depends on the sum of its samples; the other depends on their squared sum.
This matters when interpreting a robot sensor spectrum, but the following record is invented. No data acquisition system, SciPy routine, or physical sensor was run. Explicit finite sums make the normalization reproducible without treating a spectrum's appearance as a calibration.
Choose the finite window convention
Use N = 16 equally spaced samples and sampling frequency fs = 1600 Hz. Define the periodic Hann sequence w_n = [1 − cos(2 pi n/N)]/2 for n from zero through fifteen. The denominator is N, and the last sample is not forced to equal the first sample's zero value.
SciPy distinguishes periodic windows for spectral analysis from symmetric windows for filter design. Its displayed symmetric definition uses N − 1 in that denominator. Calling both sequences Hann does not make their finite sums identical.
For the periodic sequence, the cosine terms sum to zero over a whole period. Thus S1 = sum(w_n) = N/2 = 8. Expanding the square and summing the second harmonic gives S2 = sum(w_n squared) = 3N/8 = 6. Here N is sufficiently large for those harmonic sums to vanish.
The coherent gain is S1/N = 0.5. It describes a particular coherent amplitude scaling, rather than the fraction of noise power retained. The mean squared window value is S2/N = 0.375, a different number.
Recover one declared sinusoid
Let x_n = 2 cos(2 pi 3n/16) volts, a real sinusoid at 300 Hz with peak amplitude two volts and RMS amplitude square root of two volts. There is no DC offset and no detrending in this calculation.
Use the unnormalized forward DFT X_k = sum(w_n x_n exp[−i 2 pi kn/N]). At positive-frequency bin k = 3 the magnitude is eight volt-samples. The negative-frequency contribution does not overlap that bin for this chosen frequency and window.
A rectangular-window amplitude convention, 2 abs(X_3)/N, would report one volt. Dividing by the coherent gain, or equivalently using 2 abs(X_3)/S1, recovers two volts. The factor of two pairs positive and negative frequencies of a real signal away from DC and Nyquist; it must not be attached indiscriminately to those exceptional bins.
The window also creates neighboring DFT components. At bins two and four the magnitudes are four volt-samples each. Those components arise from multiplying by the cosine taper, even though the input has only one sinusoidal frequency. Correcting the main-bin amplitude does not make every side component an additional physical vibration.
Noise uses the squared sum
For independent zero-mean samples with common variance sigma squared, the expected squared magnitude of a windowed DFT coefficient is sigma squared S2. Cross terms vanish because distinct samples are uncorrelated. This expectation is a finite-sum result and does not require Gaussian sample amplitudes.
A two-sided power spectral density estimate therefore uses abs(X_k) squared divided by fs S2. For a real record, combine conjugate bins to form a one-sided density, keeping DC and Nyquist unpaired. This normalization has units of volts squared per hertz.
SciPy's periodogram documentation distinguishes this density scaling from squared-magnitude spectrum scaling. Its ratio of spectrum to density is fs S2 divided by abs(S1) squared. The documentation supplies the conventions; the sixteen-sample tone and all numbers here are independently constructed.
Define an equivalent noise bandwidth
For this window, B = fs S2/S1 squared = 1600 times 6/64 = 150 Hz. The DFT-bin spacing is fs/N = 100 Hz, so the equivalent noise bandwidth is 1.5 bins. These are different frequency quantities even though both are expressed in hertz after scaling.
With a rectangular window, S1 = N and S2 = N, giving B = fs/N, or one bin. The Hann taper's wider noise bandwidth means that matching a tone's coherent amplitude does not preserve the same amount of white-noise contribution under that amplitude normalization.
For example, assign the abstract noise variance four volts squared. The expected two-sided density at each bin is 4/1600 = 0.0025 volts squared per hertz. At ordinary positive frequencies the expected one-sided density is 0.005. These are ensemble expectations, not identical values guaranteed in a single noisy record.
Check the tone's power account
For the invented sinusoid, the one-sided density at bin three is 2 times 64/(1600 times 6), approximately 0.013333333 volts squared per hertz. Multiplying by the 100-Hz grid spacing contributes 4/3 volts squared.
Each neighboring positive bin contributes another one third volt squared after the same integration weight. Their sum is two volts squared, agreeing with the sinusoid's RMS voltage squared. The main-bin density alone does not contain that complete integrated account.
The main bin's spectrum-scaled value instead is 2 times 64/64 = two volts squared. That convenient tone-height result uses S1 squared in its denominator. Summing every spectrum-scaled bin for this tone would give three volts squared. Spectrum-bin heights are not a density integral with an implicit unit bandwidth.
Finite symmetry changes the constants
For the symmetric sixteen-point Hann, direct summation gives S1 = 7.5 and S2 = 5.625. Its coherent gain is 0.46875 and its equivalent noise bandwidth is 160 Hz, or 1.6 of the same 100-Hz bins. Substituting the periodic constants would introduce a normalization error before any measurement uncertainty.
An off-bin sinusoid requires the window's frequency response as well; the exact main-bin recovery above relied on coherent alignment. Likewise, correlated noise needs its spectral structure retained in the expectation. Naming the sampled window, transform convention, quantity being estimated, and frequency-pairing rule keeps these two normalization problems distinct.
Sources checked October 24, 2026
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.windows.hann.html
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.periodogram.html
Concept illustration: A wired fixture on a metal worktable beside a waveform display provides robotics context for this analytical model. The image does not depict the article's numerical example, a verified experiment, a product specification, or deployment evidence.