I’m trying analyze a clinical EEG data. The goal is to indicate reduction of the 8-15 Hz activity (maybe delta waves as well).
First, the bandpass filter is set at 0.1-70 Hz. Then, 2 seconds EEG data from each channels are detrended as one series by using mne.Evoked.detrend function.
Here, I have two questions.
How can I apply a Hanning window to reduce the effect of spectral leakage and then transform each series into a frequency domain by FFT, from which the power spectrum at 8–15 Hz bandwidth can obtain?
How can I smooth the 2 seconds power spectra with Welch’s method through averaging 10 series?
I would be grateful if anyone can help me how properly perform this analysis with MNE.
How can I apply a Hanning window to reduce the effect of spectral leakage and then transform each series into a frequency domain by FFT, from which the power spectrum at 8–15 Hz bandwidth can obtain?
You can always get the data yourself using epochs.get_data(), then multiply by numpy.hanning(data.shape[-1]), then call scipy.fft.rfft and use scipy.fft.rfftfreq to get the frequencies associated with the FFT.
How can I smooth the 2 seconds power spectra with Welch’s method through averaging 10 series?
I would use psd_multitaper as above to get single-epoch multitaper estimates, then average across epochs (which makes it Welch-like), then average over the frequencies in the 8-15 Hz range. At least I think this will get you what you’re looking for…