Repository navigation
feat(datasets): add Shin2022 and NeuroTUMBCI2025 continuous MI readers - #1192
Merged
bruAristimunha merged 18 commits intoOct 4, 2026
Merged
Conversation
Pass-2 review: kept the fail-closed/recovery path (corrupted-zip re-download or explicit extraction error) unchanged.
- resolve_montage_name (moabb.datasets._montage, re-exported by utils): MNE 1.13 renamed standard_1005/1020 (and the other standard_* templates) to colin27_*, warns on the old names and 1.14 removes them. Returns the spelling the installed MNE knows; electrode files are byte-identical (dig positions checked equal on MNE 1.10.2, 1.12.1 and 1.13.2). Every make_standard_montage/set_montage call in moabb now goes through it; METADATA montage labels are descriptive and unchanged. - download_and_extract_zip: download once, extract unless a marker exists, optional warn + forced re-download of a corrupted archive. - read_raw_brainvision_repaired: repair stale DataFile/MarkerFile references in a temporary header (strict mode raises on missing entries/siblings). - rename_stimulus_codes, edge_boundary_annotations; SetRawAnnotations keeps 'EDGE boundary' markers. - moabb.datasets._openneuro_mirror moved here verbatim (byte-identical copies in NeuroTechX#1186 and NeuroTechX#1189), with dataset-agnostic tests.
# Conflicts: # docs/source/whats_new.rst
…tage names Merges NeuroTechX#1200 (datasets/shared-loader-helpers): local zip/BrainVision/EDGE-boundary code replaced by moabb.datasets.utils helpers, montage calls spelled with the MNE 1.13 colin27_* names via resolve_montage_name, new classes without a public NEMAR mirror listed in NEMAR_ID_EXEMPT. Behaviour fingerprints unchanged.
MNE 1.13 renamed the standard_* templates to colin27_* (identical .elc files). With the floor at 1.13 the resolve_montage_name shim and the _montage module are not needed: every call site spells the new name.
- download_and_extract_zip -> extend download_and_extract_subject_zip with keyword-only fname and redownload_corrupted (defaults keep the 10 develop callers unchanged) - read_raw_brainvision_repaired -> mne.io.read_raw_brainvision(overrides=) at the call sites (MNE >= 1.13) - edge_boundary_annotations -> mne.Annotations(onsets, 0.0, 'EDGE boundary') - drop_native_stim / relabel_annotations / write_dataset_description -> drop_channels / annotations.rename / mne_bids.make_dataset_description - tests: no nested functions, Mock data_dl
# Conflicts: # docs/source/whats_new.rst
- resolve_montage_name("colin27_1020") -> "colin27_1020" (mne>=1.13)
- tests: Mock instead of monkeypatched / bound lambdas, asserting call_args
…udit) Docstring-only paper-vs-release note (no value changed): the paper states "Each session consisted of 10 runs of 24 1D LR center-out discrete trials" because the NT = 0 run "was jointly represented by the 'BW = 60 s (default)' run, thus forming 10 runs (4 + 2 + 4)", while MOABB documents 11 run files (NT0/NT24/NT48). The loader enumerates the archive, so runs_per_session=11 and n_trials=2640 stay declared but are flagged needs_real_data_check. The 60 Hz line frequency is supported by the online "Notch filtered 58-62 Hz". Evidence: ~/Projects/moabb/.paper-audit/reports/mi-readers/Shin2022/report.md
…audit) - publication_year 2026 -> 2025: the Zenodo record is issued 2025-12-29 (DataCite "publicationYear": 2025) and the preprint arXiv:2511.23384 was first posted in November 2025 (the cached v4 is dated 30 Mar 2026); the citation year is corrected accordingly. - docstring: "The pilot IDs are P1 for the patient and P2 for the healthy participant" (paper, Availability of data); record creator is the organisation "neuroTUM e.V." while the preprint's first author is Isabel W. Tscherniak (class name kept pending decision, see audit report). Evidence: ~/Projects/moabb/.paper-audit/reports/mi-readers/neuroTUMBCI/report.md
The record presents the name itself: Zenodo 18087806 is titled "neuroTUM-BCI: Cybathlon Dataset" (creator neuroTUM e.V., issued 2025; the associated arXiv preprint 2511.23384, Tscherniak et al. 2025, has no dataset name in its title). Rule 1 gives the official name in Python class spelling (first letter upper-cased, hyphen removed) plus the record year, since the name carries none: NeuroTUMBCI2025. Renamed class, module, code (was "neuroTUM-BCI"), registry, api.rst, whats_new, summary CSV, tests and the NEMAR exemption list; no deprecated alias (the name was never released).
bruAristimunha
marked this pull request as ready for review
October 4, 2026 17:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port two continuous-recording MI loaders onto develop: Shin2022 (16-channel BCI2000 LIVE EEG only) and NeuroTUMBCI2025 (was neuroTUMBCI) (24-channel XDF, two participants with subject-specific three-class tasks).
bci2000optional extra. No obsoleteexternalextra. neuroTUM uses develop's existing native XDF reader instead of adding pyxdf; h5py/pymatreader are already core dependencies.Source reconciliation
Compared
codex/mi58-corrected-20260801withbruaristimunha-fork/codex/mi-dataset-expansionfile-by-file: all four extra-reader source modules are identical. This port adapts continuous readers to current metadata and selection APIs and removes obsoleten_channelsfields.Local checks (isolated fake MNE home, existing temporary data directory, PYTHONPATH verified)
nemar_id is None. No fake ID, exemption, or unassigned pending entry was added.Draft / merge blockers
nemarDatasetsGitHub catalog was paginated (787 entries) and descriptions searched; web-search provider also failed. This is a bounded search, not proof that no mirror exists. nm000267/nm000268 are Shin2017, nm000339 is Stieger2021: none is a substitute. Keep draft until authentic mirrors and appropriate source-byte transport are verified. No rehosting/publication was performed.[0,5]inclusive despite fixed stored windows, and does not protect discontinuities through preprocessing. A scientifically safe epoched representation requires separate work; source metadata also claimed seven channels despite returning the common two-ear pair.nemar_id = "EXEMPT"is not ported.This PR is intentionally draft and must not merge with missing mirror/scientific evidence. No paper experiments rerun; findings above also affect the source-branch loaders.
Simplification (2026-09-29, head
159623a41)Depends on #1200. Merge #1200 (
mne>=1.13, shared download/marker helpers, OpenNeuro mirror mixin) first. This branch merges it (git merge --no-ff, no rebase).Pass 4 (ponytail): reuse existing code, no nested functions (head
44cd3f4d2)058ae05e6, which now requiresmne>=1.13and dropsresolve_montage_name.colin27_1020directly.lambdawithMock, including the stand-inBCI2kReader. They now assert oncall_argsinstead of appending to a call list.moabb/datasets/*.py540 → 538;moabb/tests/*.py(net) 98 → 97.test_loader_utils.py,test_preprocessing.py,test_datasets.py,test_metadata.py,test_doi_validation.py) had 2522 passed and 0 failed. ruff 0.15.20 andgit diff --checkare clean.Pass 3: shared helpers, NEMAR skip, new montage names (head
689c03b4d)resolve_montage_name.Extraction failederror is unchanged and was re-probed.NEMAR_ID_EXEMPT(# no public NEMAR mirror yet; tracked in #1192):Shin2022,neuroTUMBCI. No ids were invented,NEMAR_ID_PENDINGis untouched, andtest_all_datasets_have_valid_nemar_idpasses locally.moabb/datasets/*.py538 → 540 (+0%);moabb/tests/*.py(net) 96 → 98 (+2%; includes the NEMAR-exempt lines).test_loader_utils.py): neurotumbci 84→85, shin2022 74→74. No touched file dropped by more than 2 pp.pytest <PR tests> test_loader_utils.py test_preprocessing.py test_datasets.py test_metadata.py test_doi_validation.py --cov=moabb/datasets(isolated MNE home, emptyMNE_DATA, no downloads;test_dataset_acceptandTestData::test_epochsdeselected): 0 failed. Also ruff 0.15.20 andgit diff --check.moabb/datasets/*.pymoabb/tests/*.py(net)PR tests collected (pass 2): 8 → 8. Coverage of touched dataset files (pass-1 before → now, offline suite): shin2022 71→74, neurotumbci 86→84.
Pass 2 — loaders and tests
.split(),data_pathas one comprehension_live_top_dirinlined, unreachable feedback-edge branches and duplicate SIMULATED check removed; explicitExtraction failederror keptNo LIVE recordings/No .daterrors; re-extraction rule.pytest <PR tests> test_datasets.py test_metadata.py test_doi_validation.py --cov=moabb/datasets(isolated MNE home, no downloads;test_dataset_accept/TestData::test_epochsdeselected); behaviour fingerprint before/after on fake source data (per-run data hash, channels/types, sfreq, annotations, events, montage) and class fingerprint (subjects, sessions, event_id, interval, code, DOI, METADATA hash, summary-CSV row, docstring DOIs) identical exceptDataset summaryrendered once instead of twice; ruff 0.15.20,git diff --check.Test_Datasets::test_all_datasets_have_valid_nemar_id[<new classes>]fails (nonemar_id, not inNEMAR_ID_PENDING) — NEMAR-ID decision still open.Pass 1 — test audit
test_mi_readers.py(8 tests, 96 LOC) against the junk patterns: every test maps to a distinct owner-boundary contract (BCI2000 Feedback edges + µV→V incl. first-sample onset and unterminated last block; LIVE-only zip extraction over a real archive; XDF mapping/timing/units; missing-stream error; per-classdata_pathguards). Nothing justified removal for ≤ 2 LOC each, so no trim was made. No test-only production seams.pytest <PR tests> moabb/tests/test_datasets.py moabb/tests/test_metadata.py moabb/tests/test_doi_validation.py --cov=moabb/datasets --cov-report=term-missing -p no:cacheprovider(isolated MNE home, no downloads;test_dataset_accept/TestData::test_epochsdeselected). Pre-existing on this branch, untouched:Test_Datasets::test_all_datasets_have_valid_nemar_id[<new classes>]fails (nonemar_id, not inNEMAR_ID_PENDING).