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?

Thanks

112666-100_2,func-1,0.102921,0.480883,124.000000,0.022086,0.132130,0.457000,0.638000,0.037800,0.395700,0.154000,0.815500,0.064100,0.426700,0.010196,0.153642,0.035054,0.400024,0.022078,0.225949,0.054500,0.265400,0.127800,0.491600,0.071300,0.278800,0.016357,0.088379,0.022945,0.210999,0.015999,0.119461
 
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.
Regards,
Teresa

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.

Teresa