Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

movement calculation bug #28

Open
cindyhfls opened this issue Sep 19, 2024 · 4 comments
Open

movement calculation bug #28

cindyhfls opened this issue Sep 19, 2024 · 4 comments
Assignees

Comments

@cindyhfls
Copy link

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
Copy link
Author

@madisoth

@LuciMoore
Copy link
Contributor

Point 3 above is now resolved with PR #29

@LuciMoore
Copy link
Contributor

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

@cindyhfls
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants