ENH: add spline interpolation motion correction for fNIRS (motion_correct_spline)#13693
ENH: add spline interpolation motion correction for fNIRS (motion_correct_spline)#13693leonardozaggia wants to merge 8 commits intomne-tools:mainfrom
Conversation
4a44b05 to
f9fd66f
Compare
|
@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 |
|
But of course, I am open to cancel my PR and submit a new one to the dedicated |
|
@scott-huberty @drammock any thoughts on where this should live? I'm inclined to add any new fNIRS algorithms to mne-nirs... |
yeah, I think so too, unless the method is also valuable for other modalities |
I agree that it makes most sense for newly added fNIRS specific utilities to live in mne-nirs! |
|
Great then, I will move the work to Just a quick question, do you think it would make sense to port the already existing nirs specific modules here in |
Yeah I think that it would be a super nice idea to have all the functionality in one place! I'll let @larsoner provide a more definitive answer, but I guess we could follow the Or we can keep |
yes but not yet. We have plans in the works for creating a proper plug-in architecture for MNE. When MNE-NIRS becomes a plugin would be the right time to migrate the functionality. |
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