Skip to content

FIX Allow epoched EEGLAB files without events - #14163

Open
viranovskaya wants to merge 2 commits into
mne-tools:mainfrom
viranovskaya:fix/eeglab-no-events-current
Open

FIX Allow epoched EEGLAB files without events#14163
viranovskaya wants to merge 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
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

1 participant