ENH: add wavelet-based motion correction for fNIRS (motion_correct_wavelet)#13692
Draft
leonardozaggia wants to merge 7 commits intomne-tools:mainfrom
Draft
ENH: add wavelet-based motion correction for fNIRS (motion_correct_wavelet)#13692leonardozaggia wants to merge 7 commits intomne-tools:mainfrom
leonardozaggia wants to merge 7 commits intomne-tools:mainfrom
Conversation
|
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
1b34b44 to
7fe5731
Compare
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)
None (new feature).
What does this implement/fix?
Adds motion_correct_wavelet (alias wavelet) to mne.preprocessing.nirs for wavelet-based motion correction of fNIRS data.
The function pads each channel to a power of 2, normalises by the estimated noise level (MAD of first-level detail coefficients), applies a stationary wavelet transform (SWT), zeroes out detail coefficients that are IQR-based outliers, and reconstructs the corrected signal. Specialises in spike removal.
Based on Homer3 v1.80.2 hmrR_MotionCorrectWavelet (Huppert et al. 2009) and Molavi & Dumont 2012. Adds new dependency: PyWavelets
Additional information
- PCA: ENH: add PCA-based motion correction for fNIRS (motion_correct_pca) #13691
- Spline: ENH: add spline interpolation motion correction for fNIRS (motion_correct_spline) #13693
- Wavelet: this PR