Repository navigation
Add NETBCI2026 longitudinal motor-imagery dataset (Networks for BCI) - #1188
Merged
bruAristimunha merged 21 commits intoOct 4, 2026
Merged
bruAristimunha merged 21 commits into
bruAristimunha merged 21 commits into
Conversation
Consolidate the two Corsi2026 run-loading tests onto one staging helper (_corsi2026_run) instead of two copies of the vhdr/events.tsv/bids_paths/ read_raw_brainvision setup, and run the off-rate resample regression once at the observed 249.9 Hz rate: the 1000 Hz variant took the same resample branch and asserted the same event-timing contract. corsi2026.py coverage unchanged (55%, offline suite); test_datasets.py additions 187 -> 178 lines; Corsi2026 tests collected 8 -> 7.
- 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.
…rsi2026 # 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
…rsi2026 # Conflicts: # docs/source/whats_new.rst
- resolve_montage_name("colin27_1005") -> "colin27_1005" (mne>=1.13)
- _subject_members: nested keep() -> plain loop, key lambda -> attrgetter
- tests: Mock instead of monkeypatched lambdas / SimpleNamespace lambdas
… audit) - hardware: the EEG was amplified by the MEGIN TRIUX MEG acquisition system (102 magnetometers, 204 gradiometers), not an Elekta Neuromag - docstring: EEG recorded at 1 kHz, released at 250 Hz; the six runs are the protocol's testing phase (five feedback-free training runs per session are described in the paper); task-rest recordings are not loaded Evidence: ~/Projects/moabb/.paper-audit/reports/netbci/Corsi2026/
Rule 1 (official proper name): the data paper presents the dataset by name - "We share the Networks for BCI (NETBCI) dataset" (Corsi et al., Sci Data 2026, doi:10.1038/s41597-026-08237-5) - so the class takes the official acronym plus the paper year. Module, code, cache folder (MNE-netbci2026-data), registry, api.rst, whats_new, summary CSV, NEMAR exemption list and tests follow; the name was never released, so no alias.
bruAristimunha
marked this pull request as ready for review
October 4, 2026 16:59
…25 row (keep audited value)
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
Add
NETBCI2026(Networks for BCI, formerlyCorsi2026in this PR): 19 participants × 4 longitudinal sessions × 6 feedback runs, 74 EEG channels, right-hand motor imagery versus rest, with a [0, 5] s epoch window.Validation
TestData.test_epochs, and licence/data-accesstest_dataset_accept; download/slow defaults remain disabled. The prior Lee2024 failure with the normal laptop configuration does not reproduce in this isolated gate.moabb-smoke-corsi2026-09282020: Kubernetes Complete, all 19 subjects / 456 runs processed. The tested paradigm produced uniform 74 × 641 arrays and 14,430 epochs (7,224 imagery / 7,206 rest).220874b9af5c57b1671853152330bae0(20:20 source snapshot). Subsequent local changes make BOM handling explicit and document truncation; final synthetic gates additionally cover 1000 Hz. The final committed loader has not been rerun over all real data.Scientific limits / remaining gate
Simplification (2026-09-29, head
5498ae8c2)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
e42a2548f)058ae05e6, which now requiresmne>=1.13and dropsresolve_montage_name.colin27_1005directly._subject_membersfilters with a plain loop, not a nestedkeep(), and sorts withoperator.attrgetter("header_offset").lambdas and theSimpleNamespacelambdas withMock. The reader test also asserts which file was read.download_and_extract_subject_zipcould handle.moabb/datasets/*.py476 → 477;moabb/tests/*.py(net) 117 → 120.test_loader_utils.py,test_preprocessing.py,test_datasets.py,test_metadata.py,test_doi_validation.py) had 2508 passed and 0 failed. ruff 0.15.20 andgit diff --checkare clean.Pass 3: shared helpers, NEMAR skip, new montage names (head
fbfad6b89)resolve_montage_name("colin27_1005"). The range reader is untouched (it is not a zip download).NEMAR_ID_EXEMPT).NEMAR_ID_PENDINGis untouched, andtest_all_datasets_have_valid_nemar_idpasses locally.moabb/datasets/*.py476 → 476 (+0%);moabb/tests/*.py(net) 117 → 117 (+0%; includes the NEMAR-exempt lines).test_loader_utils.py): corsi2026 54→54. 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): 7 → 6 (PR tests in
test_datasets.py). Coverage of touched dataset files (pass-1 before → now, offline suite): corsi2026 55→54 (missed lines 94→75; % dips only because statements were deleted).Pass 2 — loaders and tests
seek→ dict lookup,readintoreusesread_range_build_annotationsinlined; never-hit missing session/run fallbacks removed;_subject_memberstakes zip entries only (string branch was test-only)NEMAR_ID_PENDINGuntouched.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.Pass 1 — test audit
_corsi2026_run) instead of duplicating the vhdr/events.tsv/bids_paths/read_raw_brainvisionsetup.test_datasets.pyadditions 187 → 178 lines._subject_membersselection (49 GB archive; only owner of the EEG/MI-only rule), ZIP range reader CRC check (stored + deflated paths differ), staged-subject no-network, MD5 check, events-replace-markers regression.corsi2026.py55→55% (offline). Proof: same offline coverage command as Add four OpenNeuro motor-imagery datasets (Lee2022, Lioi2020_XP1, Lioi2020_XP2, Iwama2023) #1186 (2381 → 2380 passed, 0 failed).