Get errts.file without 3dTproject?


I have always been quite confused about when the errts-file is generated.

When running a resting state scenario with afni-proc (no stim files) I always get the errts-tproject or errts.anaticor file. This is because the command

3dTproject -polort 0 -input pb01.$sub_id.r01.volreg+orig.HEAD  -censor motion_${sub_id}_censor.1D  -cenmode ZERO -ort X.nocensor.xmat.1D -prefix errts.${sub_id}.tproject

When running a task analysis you don’t get the errts.file automatically, even though it sometimes might be interesting to see what the time series of everything unexplained looks like. This even though the 3dDeconvolve command has the -errts and -fiits keywords.

So why does the following command not spit out the errts-file? I have to add the 3dTproject code segment after this code. This is relevant since I run a stand alone 3dDeconvolve command and I would like it to give me the errts file since the stimfiles are just motion.

3dDeconvolve -input pb01.${sub_id}.r*.volreg+orig.HEAD              \
    -censor motion_${sub_id}_censor.1D                        \
    -polort 1                                                          \
    -num_stimts 6                                                       \
    -stim_file 1 $real_time_analysis/${sub_id}.results/motion_demean.1D'[0]' -stim_base 1 -stim_label 1 roll_01  \
    -stim_file 6 $real_time_analysis/${sub_id}.results/motion_demean.1D'[5]' -stim_base 6 -stim_label 6 dP_01    \
    -fout -tout -x1D X.xmat.1D -xjpeg X.jpg                             \
    -x1D_uncensored X.nocensor.xmat.1D                                  \
    -fitts fitts.$sub_id                                                  \
    -errts errts.$sub_id                                                \
    -x1D_stop                                                           \
    -bucket stats.$sub_id


1 Like

Hi Robin,

That 3dDeconvolve command has the option -x1D_stop,
because we do not care to let it actually run the regression,
we just want it to build an X-matrix for use in 3dTproject.
Note that in this case, the errts datasets would be identical,
3dTproject is used simply because it is much faster, because
it does not need to worry about any partial statistics, say.

When running a task analysis, you should indeed get an
errts dataset, output by either 3dDeconvolve or 3dREMLfit
(or both).

Does that seem reasonable?

  • rick

Thanks Rick!

This makes so much sense! I guess what I have seen is that the generated procs look different between resting state and task based analysis since there usually are no regressors of interest in the resting state paradigm. Then generated a command 3dTproject on the X.mat instead of running 3dDeconvolve (i.e. -x1D_stop in 3dDeconvolve and running 3dTproject after). Does that sound about right?

This explains why the errts.file never got generated with I copied the 3dDeconvolve command from my resting state script!

Thank you :slight_smile:

That is right. In your case 3dTproject is doing the exact same
thing that 3dDeconvolve would, it is just faster.

But for the common resting-state case of using voxelwise
regressors (e.g. ANATICOR), that is beyond the abilities of
3dDeconvolve. So 3dD would still generate the regression
matrix for the fixed regressors, but then either 3dREMLfit
(task) or 3dTproject (resting state) would be used for
the final regression/projection. You are not currently in
this situation.

  • rick


Just a final follow up: If 3dTproject can handle more complicated regressors (e.g. ANATICOR) AND it’s faster than 3dDeconvolve, why is it not used instead of 3dD for e.g. a simple task analysis (no ANATICOR)? Can’t it produce the stats file?



That is right, 3dTproject does not produce any statistics
(that is much of why it is faster). It is simply used for
projecting out time series.

  • rick

This was very helptful :). Thanks! And have a happy midsummer!