What I want is to select, 20 or 30 epochs of 2 secs or 4 secs and apply FFT on them to get spectral analysis of all bands (delta, theta, alpha , betha, gamma) from backgroung EEG activity without events.
An alternative route (good to me) could be the creation of a new fif, using those selected epochs.
MNE-Python version: 23.4
operating system: win10
note: I’m creating an GUI for the mean neurophysiologist/clinical neurologist (without python skills). For us clinicians, It is more intuitive to seletc slices and analise them than remove bad. Why? Because, as neurophysiologists, we already know the segments to select or avoid by visual inspection.
Figure. For illustration, it shows my interface and the beginning of an electrographic electroclinical classic absence seizure:
Hi @PauloKanda,
You can create and add whatever annotations you like to the raw data, they don’t have to always designate bad signal regions. Take a look at this tutorial.
Only annotations whose description begin with 'bad' or 'BAD' are treated as signal segments to ignore in later analysis steps, so for example:
when creating epochs, epochs overlapping with these segments will be automatically dropped (this behavior is controlled via reject_by_annotation argument, see this tutorial)
when computing fft on raw data, signal segments with bad annotations are ignored
What I want is to select, 20 or 30 epochs of 2 secs or 4 secs and apply FFT on them to get spectral analysis of all bands
If you want to epoch your continuous data - then I would first add bad annotations (these signal segments will not be epoched), then epoch the data (follow this tutorial) and then perform the FFT. You can then average predfined frequency ranges (some advice on how this can be done can be found here and here).