Average TSNR value?

I recently ran afni_proc.py, and I noticed that the out.ss_review.txt file no longer includes a line that reports TSNR average for some reason (??). However, the TSNR+tlrc BRIK and HEAD files were still generated. Is there a way to calculate that average from the TSNR maps myself?

Do you have a mask block in the afni_proc.py command?

What does the AP command look like?

  • rick

Yes, I have a mask block. Here’s the command- please let me know if you need more information:

afni_proc.py -subj_id $subj
-script proc.$subj -scr_overwrite
-out_dir ${data_dir}/${subj}.${group_id}.preprocessed
-blocks despike tshift align tlrc volreg blur mask regress
-copy_anat $data_dir/struct_ns+orig
-anat_has_skull no
-tcat_remove_first_trs 0
-dsets $data_dir/rest_before+orig.HEAD
-align_opts_aea -giant_move
-volreg_align_to MIN_OUTLIER
-blur_size 2.0
-regress_censor_motion 0.3
-regress_bandpass 0.01 0.1
-regress_apply_mot_types demean deriv
-jobs 8
-regress_run_clustsim no

Would it be possible for you to send me a tgz package with a few files in it:

  1. proc.$subj
  2. @ss_review_basic
  3. out.ss_review_uvars.json
  4. out.ss_review.FT.txt

Click on my name to get my email address.


  • rick

Thanks a lot for these files. It quickly clarified how this info was being passed along, and now I see that you must be using a version of AFNI data between last February 25 and 28. There was a 3 day period where this would happen, and then it was fixed.

Sorry about that.

Is it possible to update? Of course, that is a big step just for a little piece of information that you can get either way. If you do not want to update, there are options for how to get that value. Maybe either directly or via the @ss_review_basic script.

a. In the @ss_review_basic script, there is a block of code following a comment “# get TSNR average”. You can essentially run that for every subject. To make it easy, forget the subject ID and use wildcards:

3dmaskave -quiet -mask full_mask*+tlrc.HEAD TSNR.*+tlrc.HEAD

b. Alternatively, you could edit the @ss_review_basic script itself, to finish its job. At the top of the script there is a line that sets the mask_dset variable:

set mask_dset = full_mask.SUBJECT+tlrc # subject name replaced

Just add “.HEAD” to the name:

set mask_dset = full_mask.SUBJECT+tlrc.HEAD

Either of those should work. Please let me know if you have any questions about this.

  • rick