Skip to content

Add TUEP v2.0.1 BIDS converter and CLI - #5

Open
andraderenew wants to merge 2 commits into
esl-epfl:mainfrom
andraderenew:audit/tuep-on-current-upstream-2026-08-18
Open

andraderenew wants to merge 2 commits into
esl-epfl:mainfrom
andraderenew:audit/tuep-on-current-upstream-2026-08-18

Conversation

@andraderenew

Copy link
Copy Markdown

Summary

Adds a tuep2bids converter for the TUH EEG Epilepsy Corpus (TUEP) v2.0.1, targeting the 00_epilepsy subset.

Included

  • tuep2bids CLI entry point
  • TUEP subject/session/montage indexing
  • EDF standardization to the 10-20 montage, 256 Hz, common-average reference
  • BIDS EEG output with participants, channels, recording metadata, and dataset metadata
  • *.csv_bi seizure annotation parsing and conversion to events.tsv
  • task-level events sidecar describing the generated event columns
  • lightweight post-conversion structural validation
  • TUEP-specific tests covering seizure parsing and conversion

Validation

  • ruff check src tests: pass
  • full pytest suite: 13 tests passed
  • wheel and sdist build: pass
  • installation and conversion from the built wheel: pass
  • seizure-positive test recording generated the expected seizure event:
    • onset: 733.9656 s
    • duration: 84.0546 s
  • official BIDS Validator 3.0.1: exit code 0

The remaining BIDS Validator messages are warnings for recommended acquisition/provenance fields that cannot be established reliably from the available source information.

Scope and limitations

  • The converter currently targets the TUEP v2.0.1 00_epilepsy tree.
  • Seizure annotations are currently parsed from *.csv_bi sidecars.
  • Other annotation formats are not yet implemented.
  • Hardware-specific recommended metadata is intentionally not invented when it cannot be established from the source data.

The implementation was integrated onto the current upstream main and validated before submission.

@jon-dan
jon-dan self-requested a review August 24, 2026 09:12

This branch has not been deployed

No deployments
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.

2 participants