ENH: add spline interpolation motion correction for fNIRS (motion_correct_spline)#13693
Draft
leonardozaggia wants to merge 8 commits intomne-tools:mainfrom
Draft
ENH: add spline interpolation motion correction for fNIRS (motion_correct_spline)#13693leonardozaggia wants to merge 8 commits intomne-tools:mainfrom
leonardozaggia wants to merge 8 commits intomne-tools:mainfrom
Conversation
4a44b05 to
f9fd66f
Compare
This was referenced Feb 25, 2026
Member
|
@leonardozaggia I wonder if these should live in https://github.com/mne-tools/mne-nirs/tree/main/mne_nirs/preprocessing instead... we can iterate and release faster over in |
Author
Author
|
But of course, I am open to cancel my PR and submit a new one to the dedicated |
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.
Reference issue (if any)
Nonne (new feature)
What does this implement/fix?
Adds motion_correct_spline (alias spline) to mne.preprocessing.nirs for spline interpolation-based motion correction of fNIRS data.
For each detected motion-artifact segment the signal is detrended with a smoothing spline, then consecutive segments are baseline-shifted so they connect smoothly. Accepts a per-channel artifact mask tIncCh; when None, only spline detrending is applied with no baseline shifting.
Based on Homer3 v1.80.2 hmrR_tInc_baselineshift_Ch_Nirs (Huppert et al. 2009).
Additional information
- PCA: ENH: add PCA-based motion correction for fNIRS (motion_correct_pca) #13691
- Spline: this PR
- Wavelet: ENH: add wavelet-based motion correction for fNIRS (motion_correct_wavelet) #13692