alexenge / hu-neuro-pipeline

Single trial EEG pipeline at the Abdel Rahman Lab for Neurocognitive Psychology, Humboldt-Universität zu Berlin
https://hu-neuro-pipeline.readthedocs.io
MIT License
14 stars 3 forks source link

Warn but continue if epochs selected with `average_by` is empty #171

Closed alexenge closed 5 months ago

alexenge commented 5 months ago

E.g., when all trials of a certain condition get rejected, the resulting epochs object will be empty, and this raises an error when computing epochs.average() (for creating the evokeds). Would be better to raise a warning about this participant/condition and continue (omitting this participant/condition from the evokeds and grands outputs).