There are cases where FSL won't output a motionRegressor_fd.txt
file.
From nipy/nipype#1427:
"it looks like fsl_motion_outliers
is not guaranteed to create an output text file. If the NIfTI image contains no timepoints above the threshold, fsl_motion_outliers will terminate with no output."
So, it seems like we can't rely on the file being generated. Probably a better logic is the following: if the metrics and FD and DVARS plots exist, but motionRegressor_fd.txt
does NOT exist, then that means it ran but did not save output.
Therefore, the subject is a low-motion subject (with respect to the threshold), and code should NOT crash.