Model notes
Ported from ADCToolbox 0.9.1. analyze_spectrum with the window, its power correction of 4 / mean(w²) and the side bins that count as signal, all from spectrum/compute_spectrum and spectrum/_window. This page is the interactive companion to its examples exp_b02, exp_s06, exp_s08 and exp_s09; python/adc_coherent_sampling.py runs the library on the same samples and every number here matches it.
The converter is perfect. Nothing here is an ADC defect: an ideal quantiser, an exact sine, no noise unless you add some. Everything you see the measurement do to it, the measurement did on its own.
Coherent means the record holds a whole number of cycles, so it joins onto itself and the tone lands in exactly one bin. Leave a fraction of a cycle over and the record has a step at the seam; the FFT has no way to tell that step from signal, so it spreads the tone across every bin. A tenth of a bin is enough to read 2.2 ENOB off a perfect 12-bit converter.
A window tapers the record to zero at both ends so there is no step to spread. It costs main-lobe width — the tone now occupies several bins — which is why each window comes with the number of side bins that must be counted as signal. ADCToolbox's defaults: none 0, Hann 1, Blackman–Harris 3, flat top 4. Count too few and you throw away signal; too many and you hide a close-in spur.
Choosing. If you control the frequency, make it coherent and use no window: nothing beats an unwindowed coherent capture, and the odd number of cycles keeps every harmonic off the fundamental. If you do not — a free-running source, a recorded file — a window is not a nicety. Blackman–Harris loses nothing at a tenth of a bin, where an unwindowed capture has already lost ten.
Record length buys resolution, not signal-to-noise. The same total quantisation noise spread over twice as many bins sits 3 dB lower in each of them, so the floor drops and close spurs separate, while ENOB stays where it was. Watch SFDR climb and ENOB hold as you lengthen the record.