Skip to content

Fix Hinss2021 sampling rate and trial alignment (#663) - #1270

Merged
bruAristimunha merged 2 commits into
NeuroTechX:developfrom
bruAristimunha:fix/braindecode-loader-663
Oct 14, 2026
Merged

bruAristimunha merged 2 commits into
NeuroTechX:developfrom
bruAristimunha:fix/braindecode-loader-663

Conversation

@bruAristimunha

Copy link
Copy Markdown
Collaborator

Fix Hinss2021 sampling rate and trial alignment (#663)

The released EEGLAB files hold 2 s epochs at 250 Hz, but the loader built
the concatenated recording at a hard-coded 500 Hz, halving every time span
and doubling every frequency: each '2 s' trial covered two released epochs.
Each event also sat one sample after its epoch's start, so the last trial of
every session ran past the end and was dropped by MOABB and braindecode.

Read the sampling rate from the files, pad one leading sample so events mark
the first sample of each epoch, and use interval [0, 2 - 1/250] so a trial
is exactly one released epoch. Synthetic regression test included.

Closes #663

The released EEGLAB files hold 2 s epochs at 250 Hz, but the loader built
the concatenated recording at a hard-coded 500 Hz, halving every time span
and doubling every frequency: each '2 s' trial covered two released epochs.
Each event also sat one sample after its epoch's start, so the last trial of
every session ran past the end and was dropped by MOABB and braindecode.

Read the sampling rate from the files, pad one leading sample so events mark
the first sample of each epoch, and use interval [0, 2 - 1/250] so a trial
is exactly one released epoch. Synthetic regression test included.
@bruAristimunha
bruAristimunha force-pushed the fix/braindecode-loader-663 branch from 1fc076a to 110288e Compare October 14, 2026 14:14
@bruAristimunha
bruAristimunha merged commit 1f02551 into NeuroTechX:develop Oct 14, 2026
10 of 12 checks passed
bruAristimunha added a commit that referenced this pull request Oct 14, 2026
* Review follow-ups for the merged w42 PRs (#1257-#1270)

- benchmark(): pass datasets=None without include/exclude so the default run filters quietly (#862); list reasons in 'No datasets left'
- link check: scheduled run stays strict on 5xx
- PhysioNet S3 mirror: skip after the first failure in the process (#1245); test that data_dl routes through it
- metadata-aware cv_class: reject an ignored groups argument; document the CrossSession one-subject view (#1104)
- Zhou2020: a file that does not match the channel layout raises instead of being skipped (#1120)
- Rozado2015: accept common microvolt spellings (#1070)
- Lioi2020_XP2: read-only subject mapping; clearer missing-key error (#1098)
- process() Notes: saving finished subjects is best effort with n_jobs > 1 (#419)
- Hinss2021 test: no module-level MNE log level

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Braindecode and Moabb dataset

1 participant