The Hann or Hanning window is a type of cosine window that tapers the edges of a signal, reducing the amplitude at the beginning and end of the window. This helps to minimize artifacts such as ringing and smearing that can occur when analyzing signals with sharp edges or discontinuities.
The Hann window is named after Julius von Hann, an Austrian meteorologist who first proposed its use in 1895. It is also known as the Hanning window given the similarity with the [[Hamming window]].
It is defined as:
$
w(n) =
\begin{cases} 0.5-0.5\cos\left(\frac{2\pi n}{M}\right) & 0 \leq n \lt M \\
0 &\text{otherwise} \\
\end{cases}
$
The Fourier transform of the Hann window has a wider main lobe than the [[rectangular window]], but the secondary peak has a lower amplitude:
![[Window_function_and_its_Fourier_transform_–_Hann_(n_=_0...N).svg]]
[Wikimedia](https://en.wikipedia.org/wiki/File:Window_function_and_its_Fourier_transform_–_Hann_(n_%3D_0...N).svg)