DCAN-Labs / dcan_bold_processing

functional connectivity preprocessing for resting state fMRI outputs of the dcan-fmri-pipelines
BSD 3-Clause "New" or "Revised" License
7 stars 7 forks source link

movement calculation bug #28

Open cindyhfls opened 1 month ago

cindyhfls commented 1 month ago

Hi I found some issues with the code to calculate movement:

1) The notch filter was applied multiple times instead of changing the "order" of the filter. Running the filter multiple times seem to affect neighboring frequencies. Also iirnotch() makes a 2nd order filter and the filtfilt() function already doubles the order of the filter because it applies the filter forward and backward. I believe the current code assumes that iirnotch makes a filter with order = 1? The iirnotch() filter will be removed for future release and is best for removing a single peak frequency rather than a band, maybe butter() for butterworth filter is more suitable for the bandstop filter?

2) The degree-to-arc-length conversion was done once in the filtered_movement_regressors.m and once in the calc_FD_HCP.m or make_friston_regressor.m. This effectively underestimates the FD and Friston regressors because the actual arc length was multiplied by a factor of 0.87 (50 mm x pi/180 assuming a head radius of 50 mm).

3) Head radius is a user-defined input in dcan_bold_processing.py but it was not fed in as an input to the MATLAB call of dcan_signal_processing.m. The default head radius of 50 mm was used in the calculation of FD and Friston regressors. This might overestimate the FD for small brains.

4) The CIFTI grayordinates were not bandstop filtered, so it would make more sense to use the raw movement parameters to calculate the Friston regressors instead of the bandstop filtered version for nuisance regression?

image image image

cindyhfls commented 1 month ago

@madisoth

LuciMoore commented 1 month ago

Point 3 above is now resolved with PR https://github.com/DCAN-Labs/dcan_bold_processing/pull/29

LuciMoore commented 1 month ago

@cindyhfls can you share your run command for dcan_bold_proc.py?

cindyhfls commented 3 weeks ago

I didn't change the dcan_bold_proc.py so it should be the same run command as before?