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

Epochs dropped as `'TOO_SHORT'` or `'NO_DATA'` cause log file merging errors #166

Closed alexenge closed 7 months ago

alexenge commented 7 months ago

This occurred in the intro-to-eeg seminar for the MMN component.

For some participants in the ERP CORE MMN dataset (e.g., 'sub-002'), there are events (tones) right up until the end of the Raw recording, making it impossible to extract the full epoch length for the last couple of events.

MNE automatically rejects these last couple of epochs during the Epochs constructor. They get the label 'TOO_SHORT' in epochs.drop_log. This behavior cannot be changed in MNE, which makes sense, given that all epochs should have the same length. So our only option is too raise a warning and then also drop these same trials from the log files before merging.