Commit 55ebb4cc authored by Meryem Ayse Yucel's avatar Meryem Ayse Yucel
Browse files

Update hmrR_MotionCorrectSplineSG.m

Help of the function is modified to include the proper citation and more details on the parameters.
parent d70ace5b
Loading
Loading
Loading
Loading
+8 −7
Original line number Original line Diff line number Diff line
@@ -5,10 +5,12 @@
% SplineSG_Motion_Correction
% SplineSG_Motion_Correction
%
%
% DESCRIPTION:
% DESCRIPTION:
% Perform a cubic spline correction of the motion artifacts identified in
% The function first identifies the baseline shifts and spikes in the signal. The baseline shifts are corrected using
% tIncCh. The algorithm follows the procedure describe by
% a spline interpolation method. The remaining spikes are corrected by Savitzky-Golay filtering, which is a digital smoothing filter
% Scholkmann et al., Physiol. Meas. 31, 649-662 (2010). Set p = -1 to skip
% that substitutes each value of the signal series with a new value obtained by applying a cubic fitting to a subset of adjacent data points.
% this function.
% The length of the subset is defined by the parameter FrameSize_sec.
% The method is described in the following paper.
% Citation: Jahani et al., Neurophotonics, 2018; doi: 10.1117/1.NPh.5.1.015003. 
% 
% 
% INPUTS:
% INPUTS:
% data_d:        SNIRF object containing time course data
% data_d:        SNIRF object containing time course data
@@ -16,7 +18,7 @@
% p:             Parameter p used in the spline interpolation. The value
% p:             Parameter p used in the spline interpolation. The value
%                recommended in the literature is 0.99. Use -1 if you want to skip this
%                recommended in the literature is 0.99. Use -1 if you want to skip this
%                motion correction.
%                motion correction.
% FrameSize_sec:
% FrameSize_sec: The step lenght in seconds that a least-squares minimization will be applied using a cubic Savitzky-Golay filter.  
% turnon:        Optional argument to enable/disable this function in a processing stream chain
% turnon:        Optional argument to enable/disable this function in a processing stream chain
%
%
% OUTPUTS:
% OUTPUTS:
@@ -36,7 +38,6 @@
%
%
% LOG:
% LOG:
% Sahar Jahani, October 2017
% Sahar Jahani, October 2017
% Added turn on/off option Meryem Nov 2017


function data_d = hmrR_MotionCorrectSplineSG(data_d, mlActAuto, p, FrameSize_sec, turnon)
function data_d = hmrR_MotionCorrectSplineSG(data_d, mlActAuto, p, FrameSize_sec, turnon)