<p>In the process of Fast Fourier Transform, the analysis assumes it is reading a periodic signal and an integer number of periods (epochs), when the editing process of EEG is rarely this perfect. The edited measured signal is usually not in an integer number
    of periods, which means that—if we were to edit an EEG, only choosing periods where the data looks good (i.e. artifact free), we would have to “smooth” the ends of the snips together. (When the number of periods in the acquisition is not an integer,
    the endpoints are not continuous). If we were to simply patch together the snips of edited EEG data, without smoothing, we would have rather sharp transitions, that would not bode well for FFT transform analysis (the discontinuities would show up
    as high frequency components).</p>
<p>Windowing matches the ends up when you cut the EEG and make epochs. If you splice ends together and there’s discontinuity you get Gibb’s artifact or “spectral leakage.” The spectrum you get by using a FFT, therefore, is not the actual spectrum of the
    original signal, but a smeared version. Thus, the process of windowing gently turns on the epoch at the beginning and turns it off at the end, this is called smearing—this is preferential to Gibb’s artifact. Windowing reduces the amplitude of the
    discontinuities at the boundaries of each finite sequence.</p>
<p>There are a few different kinds of windows: Barlett, Hanning (Hann), Hamming, and Blackman are some of the most used windows. An ideal window starts at 0. Bartlett (triangular window) has a narrow peak at the top. In general, the Hanning (Hann) window
    is satisfactory in 95 percent of cases. It has good frequency resolution and reduced spectral leakage. Both the Hamming and Hanning windows have a sinusoidal shape, which touches zero at both ends eliminating discontinuity. The Blackman-Harris window
    is similar to Hamming and Hann windows. The resulting spectrum has a wide peak, but good side lobe compression.</p>
<p style="text-align: center;"><img src="@@PLUGINFILE@@/hamming-hanning.png" alt="Hamming and Hanning Windowing" width="444" height="630" class="img-responsive atto_image_button_text-bottom"><br></p>
<p style="text-align: center;">Hamming and Hanning Windowing<br></p>
<p style="text-align: center;"><br></p>