Correct fNIRS motion with a shift-invariant db2 wavelet transform
Source:R/motion-wavelet.R
waveletMotionCorrect.RdOutlying detail coefficients are removed using a per-block IQR rule and the signal is reconstructed at its original length.
Usage
waveletMotionCorrect(
x,
assay_name = "OD",
output_assay = paste0(assay_name, "_wavelet"),
iqr = 1.5,
wavelet = "db2",
min_level = 4L
)Examples
od <- intensityToOD(PhysioNIRS:::.nirs_demo_object())
corrected <- waveletMotionCorrect(od)
SummarizedExperiment::assayNames(corrected)
#> [1] "raw" "OD" "OD_wavelet"