Censor mismatch between piepline and motion-params.txt

1.8.4 docker cpac
Pipeline crashed with the below error indicating too many volumes were censored (298).
However, when I looked at *_motion-params.txt only 124 Movements_gt_threshold (124).

Is this a bug or am I misunderstanding the motion params text file?


RuntimeError: Command:
3dTproject -input /data/proj/app/pipeline/rs/outputs/working/cpac_112666-100_2_ses-1/nuisance_regression_defaultxGSRxcensor_244/_scan_func-1/nuisance_regression/funcf_calc_despike_tshift_resample_0_volreg_tcat_calc_maths.nii.gz -cenmode KILL -censor /data/proj/app/pipeline/rs/outputs/working/cpac_112666-100_2_ses-1/nuisance_regression_defaultxGSRxcensor_244/_scan_func-1/find_offending_time_points/censors.tsv -mask /data/proj/app/pipeline/rs/outputs/working/cpac_112666-100_2_ses-1/_scan_func-1/func_get_brain_mask_AFNI_126/funcf_calc_despike_tshift_resample_0_volreg_tcat_mask.nii.gz -ort /data/proj/app/pipeline/rs/outputs/working/cpac_112666-100_2_ses-1/nuisance_regressors_defaultxGSRxcensor_217/_scan_func-1/build_nuisance_regressors/nuisance_regressors.1D -polort 2 -prefix residuals.nii.gz
Standard output:

Standard error:
++ 3dTproject: AFNI version=AFNI_22.1.13 (Jun  6 2022) [64-bit]
++ Authored by: Cox the Algebraic (Linear)
++ input time points = 300 ; censored = 298 ; remaining = 2
e[7m** FATAL ERROR:e[0m only 2 points left after censoring -- cannot continue (need at least 9)
** Program compile date = Jun  6 2022
Return code: 1

I just want to know why the number exceeding threshold is not the same as the number censored.

The answer is that Movements_gt_threshold is defined in the code:
('Movements_gt_threshold', np.sum(abs_relative(rms) > 0.1)),

which is not frame wise displacement. It looks like frames kept or excluded by censoring needs to be summarized in some out put somewhere, but doesn’t seem to be.

Perhaps the mismatch is due to me choosing to use Powers et al FD not Jenkins.

Hi Joshua,

What threshold value are you using for Power FD? Have you seen this happen for multiple subjects? We will try to replicate it and get back to you shortly.

Thank you.

I figured out what was happening. I chose Powers method for frame-wide displacement and correctly, that is what gets censored. However, the reported number of frames excluded in the motion parameters file (e.g. sub-113091-100_ses-1_task-func-1_desc-1_motion-params.txt) reflects the number that would be censored by the Jenkinson method.

my threshold was 0.25

Hi Joshua,

Got it. Do you mind sending the config file that you used for your run? We will test run it and look into it.