mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

`Epochs.drop` should warn if all epochs would be dropped

Open sappelhoff opened this issue 2 months ago • 1 comments

https://mne.tools/stable/generated/mne.Epochs.html#mne.Epochs.drop

We do the same for drop_channels: https://github.com/mne-tools/mne-python/blob/b44c46ae7f9b6ffc5318b5d64f12906c1f2d875c/mne/channels/channels.py#L600-L601

sappelhoff avatar Oct 30 '25 08:10 sappelhoff

+1 although I would prefer at least the option of a warning (as your title suggests) rather than error (as is done for channels). In a large-dataset-pipeline context I could see wanting both options actually: error during exploratory runs while tuning the reject thresholds, and warning at other times so that the pipeline keeps running even if one recording was really noisy. Which I guess means on_drop_all="ignore"|"warn"|"raise" ?

drammock avatar Oct 30 '25 14:10 drammock