Skip to content

Kueper2024: release v2 (14 subjects), executed-movement protocol, rest class, correct trials only - #1334

Open
bruAristimunha wants to merge 3 commits into
NeuroTechX:developfrom
bruAristimunha:fix/kueper2024-execution-v2
Open

bruAristimunha wants to merge 3 commits into
NeuroTechX:developfrom
bruAristimunha:fix/kueper2024-execution-v2

Conversation

@bruAristimunha

@bruAristimunha bruAristimunha commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1333.

Thanks @nkueper for the careful report. This PR addresses all three points. A few interpretation choices are flagged below; your review on those would be very welcome.

1. Executed movements and the trial protocol

  • The docstring and metadata now describe executed (not imagined), self-initiated, self-paced reaching. Each trial is a rest of at least 5 s with the hands on the switches, then the movement onset at 0 s, then self-paced execution until the hands are back at rest.
  • The dataset is marked as movement execution (detected_paradigm="motor_execution", tag Movement Execution). The loader-level paradigm="imagery" tag stays for now: MOABB's MotorImagery paradigms only select datasets with that tag, and other movement-execution datasets (e.g. Schirrmeister2017) use the same convention. A dedicated execution paradigm is a broader change (Make the paradigms more broadly #1056).

2. Version 2 of the release (Zenodo 17940098)

  • The loader now downloads v2. I compared the two ZIPs entry by entry: all 148 EEG/marker files of the 8 v1 subjects are byte-identical (CRC32), and only the metadata texts changed. Subjects 1–8 therefore keep their numbering and data.
  • Subjects 9–14 are the second study (codes ending in D), unilateral only.
  • Second-study onset: these recordings have no motion-tracking marker (S100), so their movement onset is the release of the right hand switch (S22). Across 1,918 correct first-study trials, S22 follows the motion-tracking onset by a median of 54 ms (IQR 14–96 ms). → @nkueper: is the hand-switch release the onset you would use for the second study?

3. Correct trials only, and a rest class

  • Correct trials only: the loader previously kept every S100/S101, including error trials (S3, rest shorter than 5 s) and additional trials (S27). It now keeps an onset only if the end-of-correct-trial marker S128 follows it before the next onset. In the first study this gives exactly 40 per set.
  • rest class: a rest event is placed 3 s before each correct onset whose preceding rest (hands on the switches, S23/S25) lasted at least 5 s. With the default interval (−2, 1) s, a rest epoch covers −5 to −2 s before the movement onset. Without it, subjects 9–14 have a single class and cannot be evaluated; with it, all 14 subjects work with unilateral vs rest. → @nkueper: does this window match how you define rest? The S99 mid-rest markers are absent from most second-study recordings, so they could not be used.
  • Second-study counts: subjects 9–14 get 116–119 movements rather than 120. In 15 of their 18 recordings, S128 is also sent when the hands are first placed on the switches, before any movement. The set then reaches its 40 S128s one movement early, so the last movement has none. The loader follows the release's correct-trial markers strictly.

Loaded totals (the new marker logic applied to the real markers of all 67 recordings): 1,662 unilateral, 959 bilateral, 2,542 rest.

Also fixed

  • data_path only checked that the dataset folder existed. A cache from v1, or one seeded from the NEMAR deposit (which holds subjects 1–8), would have returned no runs for subjects 9–14 without any error. It now checks each subject's own files and downloads what is missing (existing files are not rewritten).

Tests

  • Updated the marker test; new tests for dropping error/additional trials, rest placement and the short-rest exclusion, the second-study hand-switch onset, and the per-subject download on a partial cache.
  • test_archive_a, the metadata, summary and dataset test files all pass locally; ruff is clean.
  • A full real-data run on the v2 release (all 14 subjects, through MotorImagery, plus the default NEMAR→Zenodo path for subjects 1 and 9) is running; I'll post its result before merging.

Issue NeuroTechX#1333 (dataset author Niklas Kueper): the movements are executed,
not imagined; each trial is a rest of at least 5 s, the movement onset at
0 s, then self-paced execution; version 2 of the release adds six
subjects.

- Download version 2 (Zenodo 17940098). The EEG and marker files of the
  eight version-1 subjects are byte-identical (CRC32), so subjects 1-8
  are unchanged; subjects 9-14 are the second study, unilateral only.
- The second study has no motion-tracking marker: use the release of the
  right hand switch (S22), which follows the motion-tracking onset by a
  median of 54 ms (IQR 14-96 ms) over 1,918 first-study trials.
- Keep only correct trials: an onset followed by the end-of-correct-trial
  marker S128 before the next onset. Error (S3) and additional (S27)
  trials were kept before. 40 per set in the first study.
- Add a rest class 3 s before each correct onset whose preceding rest
  (hands on the switches) lasted at least 5 s: with the default interval
  a rest epoch covers 5 to 2 s before the movement onset. Lets all 14
  subjects be evaluated with unilateral vs rest.
- data_path checks the subject's own files, not the dataset folder: a
  version-1 or NEMAR-seeded cache (subjects 1-8) would otherwise load
  subjects 9-14 empty.
- Metadata: 14 subjects (6 male, 8 female, all right-handed, from the
  release's files), executed movement (detected_paradigm
  motor_execution), protocol as described by the authors, Kartik Chari
  added, data URL to version 2. Summary row updated.

Counts from the new marker logic on the real markers of all 87
recordings: 1,662 unilateral, 959 bilateral, 2,542 rest.
@bruAristimunha

Copy link
Copy Markdown
Collaborator Author

Real-data check on the full v2 release (Voyager job): all 14 subjects load with 1,662 unilateral, 959 bilateral and 2,542 rest events, and 4,204 unilateral-vs-rest epochs go through MotorImagery (median channel SD 8.1 µV after 1–40 Hz). With the default provider, subject 1 loads from the NEMAR deposit and subject 9 triggers the Zenodo v2 download, as intended. Correction to the description: there are 67 recordings, not 87. Also fixed the CI failure: the v2 Zenodo DOI was missing from doi_cache.json.

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.

moabb.datasets.Kueper2024: Issues in the dataset description

1 participant