Saving rejected epochs for later use

Can I mark epochs as bad in epochs.plot() without immediately dropping them? I’d like to save my selection of bad epochs, load and modify this selection later, and then drop the manually and automatically marked bad epochs at a later point in my workflow. If possible, how can I implement this?

Hello, unfortunately there is no easy way to do this. I suggest to save a copy of all epochs before rejection so you can always go back to it and recover the data.

Richard

Thank you for your prompt reply. I’m wondering if it’s possible to retrieve and save the epoch numbers of the rejected epochs, including those automatically rejected using the ‘reject’ parameter and those manually rejected through the epochs.plot() function. This information is very important for ensuring reproducibility of our preprocessing.

This is preserved in epochs.drop_log. It’s not a beautiful structure to work with, but it’s all there.

Best wishes,
Richard