Hi, I reviewed your code. So, the following things are not clear to me-
Description says
# and saves the result, the mean for each subject, and the case-list to a .mat file.
But mean_subject_motion has not been used anywhere. Ln 96 and Ln 176 saves the motion estimate, but mean over all the gradients is neither calculated nor saved. So, to be consistent with description, I am not sure if you want to remove the mean_subject_motion function.
May be args.single_subject_ isn't defined anywhere (Ln 171)
1 - np.mean is called in the directory routine, because it was simpler to organize that way. So right now mean_subject_motion is intentionally unused.
2 - fixed!
Hi, I reviewed your code. So, the following things are not clear to me-
# and saves the result, the mean for each subject, and the case-list to a .mat file.
But
mean_subject_motion
has not been used anywhere. Ln 96 and Ln 176 saves the motion estimate, but mean over all the gradients is neither calculated nor saved. So, to be consistent with description, I am not sure if you want to remove themean_subject_motion
function.args.single_subject_
isn't defined anywhere (Ln 171)Other than that, everything seems fine to me.