loading bad epochs from custom list of epochs indexes

Hi everybody,
I have a text file with a list of bad epochs’ indexes (if you are wondering why, I spent a couple of hours selecting bad epochs using epochs.plot. Before saving the epochs object, my computer crushed, but I rescued the list from the terminal output).

Is there a way to pass this list to the epochs constructor, and then save it in the epochs object? I’ve tried passing this list to epochs.drop but, when I run epochs.plot again, the epochs are not marked as bad, as they are displayed in black, and not red color.

If the answer is “no”, I guess that the way to do this is by dropping the indexes of my list from the epochs.selection array, I’m I right?

Best,
Mauricio.

Hello and welcome to the forum! “Dropped” epochs are gone forever, hence you won’t see them when plotting (not even in red). If you check the epochs indices on the X axis, you should see that the ones you dropped are, in fact, missing.

Best wishes,
Richard