Skip to content

FIX Allow epoched EEGLAB files without events - #14163

Merged
larsoner merged 2 commits into
mne-tools:mainfrom
viranovskaya:fix/eeglab-no-events-current
Aug 23, 2026
Merged

FIX Allow epoched EEGLAB files without events#14163
larsoner merged 2 commits into
mne-tools:mainfrom
viranovskaya:fix/eeglab-no-events-current

Conversation

@viranovskaya

Copy link
Copy Markdown
Contributor

Closes #6610.

Some epoched EEGLAB files contain neither EEG.epoch nor EEG.event, for example after the original events fall outside a cropped epoch. read_epochs_eeglab currently fails on these files.

This change:

  • warns that the event information is missing;
  • assigns every epoch to a single unknown event category;
  • uses sequential sample indices for the synthetic events;
  • leaves the existing event-reading path unchanged when metadata is present.

The regression test creates synthetic .set files with both empty and absent event fields and checks the loaded data, events, and event ID.

Local checks:

  • EEGLAB test module available without the external testing dataset: 2 passed, 26 skipped
  • ruff check and format
  • ty
  • codespell
  • rstcheck

@viranovskaya
viranovskaya marked this pull request as ready for review August 17, 2026 05:53

@larsoner larsoner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable, thanks @viranovskaya !

@larsoner
larsoner merged commit 12a1eed into mne-tools:main Aug 23, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow opening epoched EEGLAB .set files without any events

2 participants