Skip to content

Add Luciw2014, the WAY-EEG-GAL grasp-and-lift dataset - #1396

Merged
bruAristimunha merged 7 commits into
NeuroTechX:developfrom
ptlnextdoor:fix/oss-moabb-luciw2014
Nov 30, 2026
Merged

bruAristimunha merged 7 commits into
NeuroTechX:developfrom
ptlnextdoor:fix/oss-moabb-luciw2014

Conversation

@ptlnextdoor

Copy link
Copy Markdown
Contributor

Adds Luciw2014, the WAY-EEG-GAL grasp-and-lift dataset (Luciw, Jarocka and Edin, 2014), requested in #942 (also listed in #913). I asked the class-design question in #942 (comment) and did not get an answer, so this PR uses the default design below and names the alternatives.

Data. figshare, https://doi.org/10.6084/m9.figshare.988376, license CC-BY-4.0 (one P<n>.zip of about 840 MB per participant). Paper: https://doi.org/10.1038/sdata.2014.47. 12 participants, 32 EEG channels at 500 Hz, executed right-hand grasp-and-lift. Not on NEMAR, so the class is added to NEMAR_ID_EXEMPT in test_datasets.py.

Design chosen: movement vs rest, "imagery" paradigm (the same choice Schirrmeister2017 makes for executed movement).

  • right_hand event at hand-movement onset (tHandStart), 1 s window (interval=[0, 1]). It covers reach, grasp and the load phase.
  • rest event 1 s before the LED cue, kept only when the hand was not moving in that second.
  • Nine series per participant are exposed as runs 0weight ... 8weight (suffix is the series type) of one session. The tenth series (HS_P<n>_ST) has no event table in the deposit and is skipped.
  • Object weight and surface (and the previous lift's) are attached as annotation extras.

Alternatives (each is a small change in _series_to_raw; tell me if you prefer one):

  1. Weight classes (165/330/660 g) or surface classes (silk/suede/sandpaper) instead of movement vs rest.
  2. Event-phase classes from the other AllLifts times (touch, load phase, lift-off, replace, release; the Kaggle grasp-and-lift events), possibly with a continuous-decoding paradigm rather than epochs.
  3. Different window length or a separate rest anchor.

Timing note. P.AllLifts times are relative to a window that starts LEDOn (2 s) before the cue, so events sit at StartTime - LEDOn + t. This matches the recorded LED channel and the grip-force rise to within a few ms. The authors' WEEG_GetEventsInHS.m uses StartTime + t, which is 2 s late against both signals.

Tested.

  • pytest moabb/tests/test_luciw2014.py (synthetic HS/AllLifts files, no download): runs, event times, unit scaling, object extras, epochs through MotorImagery.
  • Related checks in test_metadata.py (catalogue count 207 to 208), test_doi_validation.py (two DOIs added to doi_cache.json), test_datasets.py (NEMAR and summary-CSV tests): pass.
  • Real download of participant 1 only: MotorImagery(fmin=8, fmax=32).get_data(Luciw2014(), [1]) gives X of shape (570, 32, 501), 294 right_hand and 276 rest trials, 9 runs. I did not download participants 2 to 12. summary_imagery.csv totals (6,809 trials, 283.71 per participant) come from the full prototype run on the event tables, not from this check.
  • pre-commit hooks pass on the diff.

AI disclosure: this PR was prepared with AI assistance (Claude, Anthropic).

Copilot AI balanced review requested due to automatic review settings November 30, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@bruAristimunha

Copy link
Copy Markdown
Collaborator

Maintainer review (code-review pass): conventions and CI look complete, and the synthetic tests are strong. Two items block merge:

  1. Real-data verification for subjects 2–12. Only participant 1 was download-verified; the figshare IDs and zip layout for subjects 2–12 are never exercised (tests monkeypatch data_path). Please add download evidence for at least one more subject (e.g. P6, different ID block) or a figshare file listing covering subjects 2–12.
  2. Paradigm/class design sign-off. The right_hand-vs-rest imagery choice (with weight/surface and event-phase alternatives) has been pending a maintainer decision since [Dataset] Add Luciw2014 Grasp-and-Lift Motor Execution dataset #942. This needs an explicit decision before merge.

Minor (non-blocking): extra() uses _WEIGHTS_G[int(CurW)] which can KeyError on missing/corrupt CurW while PrevW/PrevS use tolerant .get; _get_single_subject_data IndexErrors if an S1–S9 series has zero AllLifts rows.

Happy to merge once (1) and (2) are resolved — thank you for the dataset contribution.

@bruAristimunha bruAristimunha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer decision: classify Luciw2014 under the general cognitive paradigm (CognitiveTask), applied in e3cd199 (paradigm="cognitive", summary/API moved to the cognitive lists, tests updated to CognitiveTask — 2 passed, metadata tests 2 passed). Verified all 12 figshare file IDs resolve to P1.zip…P12.zip. Approving; auto-merge will land it when CI passes.

@bruAristimunha
bruAristimunha enabled auto-merge (squash) November 30, 2026 16:37
@bruAristimunha

Copy link
Copy Markdown
Collaborator

Review fixes pushed (maintainer, per request): empty-series now raises a clear ValueError naming the series; current-trial weight/surface codes use the same tolerant lookup as previous-trial codes; data_path verifies all expected files exist after extraction; METADATA montage aligned to colin27_1005. Added regression tests (empty series, NaN codes) — Luciw + metadata tests pass locally (6/6). Also completed real-data verification for subject 6 (figshare 3209486, different ID block): 9 runs, 32 channels at 500 Hz, 294 right_hand lifts and 265 rest events, matching the documented design.

@bruAristimunha
bruAristimunha merged commit fa8b06a into NeuroTechX:develop Nov 30, 2026
15 checks passed
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.

3 participants