Dear all,
I would like to drop bad epochs from my epochs data. Therefore, I create Epochs:
Epochs = mne.Epochs(RawData_Notched, events = Events_from_annot, tmin = Tmin, tmax = Tmax, baseline = None, preload = True, event_id = {"Stimulus/S 5": 5, "Stimulus/S 10": 10, "Stimulus/S 14": 14})
Then I plot the epochs and I left click on the epochs I want to remove:
Epochs.plot()
Then I remove the visually selected epochs:
Epochs.drop(True, reason = "bads")
Then I plot again the Epochs and selected Epochs indeed seems to have been removed
Epochs.plot()
However, when I want to get the indices of the removed Epochs, bads is empty:
Epochs.info
returns
<Info | 9 non-empty values
bads: []
ch_names: Fp1, F3, F7, FT9, FC5, FC1, C3, T7, TP9, CP5, CP1, Pz, P3, P7, ...
chs: 64 EEG, 1 ECG
custom_ref_applied: True
dig: 67 items (3 Cardinal, 64 EEG)
highpass: 0.5 Hz
lowpass: 100.0 Hz
meas_date: 2024-03-09 10:54:44 UTC
nchan: 65
projs: []
sfreq: 500.0 Hz
>Dropped 0 epochs:
The following epochs were marked as bad and are dropped:
[]
Channels marked as bad:
none
What is wrong? I would like to get the indices of the visually removed Epochs in the bad list to save them because it is important to stay transparent at each step, but I can’t, the bad list is empty…
I am using Spyder 5.5.1 and python 3.12, and I am using Windows.
Thank you so much for your help!!