Skip to content

FIX: Correct fNIRS interpolation with reordered picks#13856

Open
Kallemakela wants to merge 7 commits intomne-tools:mainfrom
Kallemakela:FIX-fnirs-interpolation-reordered-picks
Open

FIX: Correct fNIRS interpolation with reordered picks#13856
Kallemakela wants to merge 7 commits intomne-tools:mainfrom
Kallemakela:FIX-fnirs-interpolation-reordered-picks

Conversation

@Kallemakela
Copy link
Copy Markdown

@Kallemakela Kallemakela commented Apr 21, 2026

Reference issue (if any)

Fixes #13857.

What does this implement/fix?

Fixes an indexing bug in _interpolate_bads_nirs

Before this change, _interpolate_bads_nirs mixed up channel indices in the underlying raw object and a local distance matrix when fNIRS channels were reordered by _validate_nirs_info(). This resulted in interpolation based on wrong channels.

This fix maps raw object indices to local distance matrix indices when reading and writing data.

@Kallemakela Kallemakela marked this pull request as ready for review April 21, 2026 13:07
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.

BUG: fNIRS interpolation mixes reordered and raw channel indices

1 participant