Repository navigation
Add MI archive datasets: Brodu2012, IMUMIA2026, Leeuwis2021, MartinezPeon2024 and PardoGarcia2026 - #1193
Merged
bruAristimunha merged 24 commits intoOct 4, 2026
Conversation
…>79.0%) Merge the four archive-B regression modules into test_archive_b_regression.py with a shared _capture_transport helper (the data_dl recorder was copied in two files). Drop test_pure_imagery_window_precedes_overt_execution (restated interval/event_id/constant dict and grepped docstring/metadata strings), the MNE filter-independence block of the Leeuwis test (exercised MNE, not moabb), and the redundant control-subject param of the PardoGarcia session test. Per-file coverage (before -> after): leeuwis2021 89->89, li2026 67->67, martinezpeon2024 77->77, openvibe 88->88, pardogarcia2026 74->74. Test LOC added vs develop: 254 -> 201; PR tests collected: 14 -> 12.
- 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.
…e-b-20260929 # Conflicts: # docs/source/whats_new.rst # moabb/datasets/preprocessing.py
…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
…e-b-20260929 # Conflicts: # docs/source/whats_new.rst
…overrides - download_and_extract_zip -> develop's download_and_extract_subject_zip behind the usual extracted-folder check (Li2026) - read_raw_brainvision_repaired -> mne.io.read_raw_brainvision(overrides=) (PardoGarcia2026) - edge_boundary_annotations -> mne.Annotations(onsets, 0.0, "EDGE boundary") (Leeuwis2021) - colin27_* montage names spelled directly (mne>=1.13) - Li2026: nested Curry sidecar parsers and sort key hoisted to module level - tests: Mock instead of monkeypatched lambdas and nested transport
…r audit) needs_real_data_check The author-deposited open-access copy of Brodu et al. (2012) (HAL inria-00632546, section 4.1.4 "OpenViBE / INRIA data (1 subject)") states: "This data set comprises EEG signals from a single subject for which 560 trials of motor imagery (280 trials per class) were recorded over a 2 week period." 14 records x 40 trials (20 per class) = 560, so the 14 records of "Dataset #1 - Motor Imagery of Hands" on openvibe.inria.fr are 14 recordings of ONE subject, not 14 subjects. Loader behaviour change: subjects=[1], one session, one run per record (14 runs, keys "0".."13"); data_path returns the 14 record files. n_subjects 14 -> 1, trials_per_class 20 -> 280, runs_per_session=14; summary CSV updated (1 subject, 280 trials/class, 14 runs, 560 total). The synthetic regression tests were updated (transport count 14; session/run layout). Also from the sources: reference "nose reference electrode" (paper) vs "recorded in common average mode and Nz can be used as a reference" (download page) - both documented; institution "INRIA ... Rennes-Bretagne Atlantique"; publication_year 2012 (paper; page: recorded 2008/03, uploaded 2010/03); licence wording "can be downloaded for free in the hope that they can help research". Evidence: ~/Projects/moabb/.paper-audit/reports/mi-archive-b/OpenViBE/report.md, ~/Projects/moabb/.paper-audit/OpenViBE/paper-10_1016_j_neucom_2011_10_010.txt, ~/Projects/moabb/.paper-audit/OpenViBE/repo/openvibe_inria_datasets/landing_page.txt
…per audit)
Sources: Zenodo record description, the companion Research Square preprint
on the same cohort (10.21203/rs.3.rs-6958817/v1) and the CASEIB 2023
proceedings paper (10.31428/10317/13645); both DOIs tracked in
related_paper_dois and added to doi_cache.json via test_dois_resolve.
- reference: "with A2 as reference" (preprint; CASEIB: "incluyendo el
mastoides ... como referencia"); cap "64-channel Ag/AgCl electrode cap
(Electro-Cap International)"; line_freq 50 Hz ("notch filtering (50 Hz)").
- institution: "Instituto Pluridisciplinar, Universidad Complutense de
Madrid" (recording site), Universidad Politecnica de Madrid, Hospital
Clinico San Carlos; the previously listed UNED appears in no source.
- docstring: paper-vs-release note - record says "7 right-handed healthy
controls" and "64-channel system" while the release holds eight control
recordings and 63 header channels; n_subjects stays 18 (release).
Evidence: ~/Projects/moabb/.paper-audit/reports/mi-archive-b/PardoGarcia2026/report.md
The Zenodo description reads "synchronized EEG and EMG data from 244 participants" and names the dataset "The IMU-MI_A dataset"; the module said 242 in three places (no source supports 242). n_subjects stays 5 (the public five-subject sample loaded by MOABB), now stated explicitly in the docstring. Evidence: ~/Projects/moabb/.paper-audit/reports/mi-archive-b/Li2026/report.md
…paper audit)
Source: the open-access (CC BY) J. Neural Eng. article, fetched from IOP.
- reference: "with P3 and P4 as reference locations, according to the
International 10-20 System".
- participants: "ten participants (seven males, aged 27.8 +- 2.78, range
24-32 years)".
- institution: TecNM - IT Nuevo Leon and Cinvestav Saltillo (affiliations);
country MX confirmed ("Guadalupe, Mexico", "Saltillo, Mexico").
- line_freq 60 Hz supported ("followed by a 60 Hz notch filter").
- docstring: full citation of the article as [2].
Evidence: ~/Projects/moabb/.paper-audit/reports/mi-archive-b/MartinezPeon2024/report.md
OpenViBE is the software platform/hosting project, not a dataset name: the download page lists the data only as "Dataset #1 - Motor Imagery of Hands" and the primary paper, "Exploring two novel features for EEG-based brain-computer interfaces: Multifractal cumulants and predictive complexity" (Nicolas Brodu, Fabien Lotte, Anatole Lecuyer; Neurocomputing 79, 2012, 10.1016/j.neucom.2011.10.010), refers to it as "OpenViBE / INRIA data" describing "a single subject for which 560 trials of motor imagery (280 trials per class) were recorded". Rule 2 gives FirstAuthorYear of the primary paper: Brodu2012. Renamed class, module, code, registry, api.rst, whats_new, summary CSV, tests and the NEMAR exemption list; the remaining "OpenViBE" mentions describe the software, mirror and repository. No deprecated alias (the name was never released).
The authors present IMU-MI_A as the dataset's name in the record prose: the Zenodo 20421767 description opens "The IMU-MI_A dataset is a unique large-scale motor imagery resource supporting cross-paradigm studies of temporal brain dynamics" and closes "IMU-MI_A provides a valuable resource for the BCI and neuroscience communities" (record title "A Human Motor Imagery EEG Dataset Covering Diverse Cognitive States and Neural Response Patterns", creators jianxiu li, changming wang, chao chen, 2026; no paper). Rule 1 gives the official name with hyphen/underscore removed plus the record year: IMUMIA2026. Renamed class, module, code, registry, api.rst, whats_new, summary CSV, tests and the NEMAR exemption list; no deprecated alias (the name was never released).
The Zenodo release (10.5281/zenodo.20421767) ships purely numeric per-task
.cdt file names (e.g. task1/0101001.cdt, task5/01020200.cdt), not the
Sub_NN.cdt layout the loader assumed. The 'Sub_(\\d+)' regex therefore
raised AttributeError('NoneType') on every real file and get_data()
failed before any Curry read.
Within each task directory every file has the same digit count and the
only varying field is the subject's ordinal position in the five-subject
sample, so a plain lexicographic sort reproduces the authors' order and
maps subject n (1..5) to the n-th file. The synthetic archive test is
updated to the real naming.
bruAristimunha
marked this pull request as ready for review
October 4, 2026 17:30
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 five existing dataset implementations from the MI expansion branches onto current develop (18e7d4c): Brodu2012 (was OpenViBE), IMUMIA2026 (was Li2026), Leeuwis2021, MartinezPeon2024, PardoGarcia2026. All five loader files are identical between
codex/mi58-corrected-20260801andbruaristimunha-fork/codex/mi-dataset-expansion; no conflicting scientific variant was silently chosen.Draft blockers — do not merge
Verification
All tests use explicit PYTHONPATH pointing to this worktree (verified moabb.file), isolated _MNE_FAKE_HOME_DIR, existing MNE_DATA and MOABB_DOWNLOAD_PROVIDER=auto. No signal downloads.
Draft only; no merge or all-green CI claim.
Simplification (2026-09-29, head
ef9c8a702)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
e214e4ee2)058ae05e6, which now requiresmne>=1.13and drops the pass-3 helpers that re-implemented existing code.download_and_extract_subject_zip, behind the same extracted-folder check its ten develop callers use. The archive now extracts intoMNE-li2026-data/, not next to the cached archive.mne.io.read_raw_brainvision(..., overrides={"data_fname": ..., "marker_fname": ...}), which replaces the header-rewritingread_raw_brainvision_repaired.mne.Annotations(onsets, 0.0, "EDGE boundary")directly.colin27_1005/colin27_1020directly.parameter,labels) and itssorted(key=lambda ...)are now module-level private functions.data_dlrecorder and every monkeypatchedlambdawithMock, and read the call flags fromcall_args_list.moabb/datasets/*.py1289 → 1287;moabb/tests/*.py(net) 211 → 225. The test file grew because of theMockcall-argument assertions and the newoverridescheck.data_dlcalls, where Li2026's one call now carries an explicitfname=None. It covers fake CSV/TXT/CSV.bz2/Curry archives through the real loaders, and pybv BrainVision files including one header with a staleMarkerFile.test_loader_utils.py,test_preprocessing.py,test_datasets.py,test_metadata.py,test_doi_validation.py) ran 2555 passed and 0 failed. ruff 0.15.20 andgit diff --checkare clean.Pass 3: shared helpers, NEMAR skip, new montage names (head
47bde2c9b)download_and_extract_zip. Withforce_update=Trueit now also re-extracts; before, it only re-downloaded._read_brainvisionis replaced byread_raw_brainvision_repaired(lenient mode). Its header-repair test moved to refactor(datasets): require mne>=1.13, spell colin27 montages, share loader code #1200.edge_boundary_annotations.preprocessing.pychange is now owned by refactor(datasets): require mne>=1.13, spell colin27 montages, share loader code #1200.resolve_montage_name._load_rawchannel/cue standardisation, Li2026 per-task cue labels). The moved code had been lowering these files' coverage.NEMAR_ID_EXEMPT(# no public NEMAR mirror yet; tracked in #1193):Leeuwis2021,Li2026,MartinezPeon2024,OpenViBE,PardoGarcia2026. No ids were invented,NEMAR_ID_PENDINGis untouched, andtest_all_datasets_have_valid_nemar_idpasses locally.moabb/datasets/*.py1329 → 1289 (-3%);moabb/tests/*.py(net) 200 → 211 (+6%; includes the NEMAR-exempt lines).test_loader_utils.py): leeuwis2021 95→95, li2026 70→81, martinezpeon2024 92→92, openvibe 92→92, pardogarcia2026 83→100. 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): 12 → 13. Coverage of touched dataset files (pass-1 before → now, offline suite): leeuwis2021 89→95, li2026 67→70, martinezpeon2024 77→92, openvibe 88→92, pardogarcia2026 74→83, preprocessing 40→40.
Pass 2 — loaders and tests
SUBJECTSderived from the file-id table keys (55-line list removed); MartinezPeon file-id table one line per subject (ids unchanged), runtimeassertin_read_rundropped (next lineset_montage(on_missing='raise')already fails loudly)Ref_Nose→Nzrename simplified (+1 two-case test for both header spellings), montagetry/exceptdropped; Pardo single-use download helper inlinedpytest <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_li2026_regression.py,test_openvibe_regression.py,test_pardogarcia2026_regression.pymerged intotest_archive_b_regression.py; the copieddl.data_dlrecorder is now one helper (_capture_transport).test_pure_imagery_window_precedes_overt_execution(restatedinterval/event_id/rename table and grepped docstring strings — owned bytest_datasets.pysummary/metadata checks); the Leeuwis whole-raw-vs-per-crop filter comparison (verified MNE's EDGE handling, not moabb — the EDGE-survives-SetRawAnnotations, first/last cue and 2×1250-sample assertions stay);test_pardo_missing_post_is_not_duplicated[11](same single-session path as patient 2);preload/verbosecall-shape asserts in the fake reader.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).