Dear AFNI experts,

I am running stats in AFNI on gyrification index images calculated with Freesurfer. I would like to perform correction for multiple comparisons on the results of the t-test and I am having some problems with to determine the minimum surface size to threshold my results.

The command I am running is -save_script surf.sim.15_10iter -on_surface yes -uvar spec_file …/…/fsaverage_afni/SUMA/fsaverage_afni_lh.spec -uvar surf_vol …/…/fsaverage_afni/SUMA/fsaverage_afni_SurfVol+orig. -uvar blur 15.4 -uvar niter 10 -uvar results_dir ./clust_sim_15_10iter

The command correctly writes the script surf.sim.15_10iter, but when I run it I do not get the z.max.pvalue files necessary to determine the minimum surface size for the uncorrected p-value. It seems to me the somehow the command is not able to recognize the list of default p-values. These are the last lines of what I get in the terminal, even though not an error:

Writing FWHM progression history to smooth.noise.0.gii.1D.smrec …

#Final smoothing parameters via master:
#Niter Sigma OutputFWHM
285 0.5212 -1.000

165.60user 0.09system 2:45.85elapsed 99%CPU (0avgtext+0avgdata 214184maxresident)k
0inputs+17096outputs (0major+55824minor)pagefaults 0swaps
3dmaskave -mask all_1.gii -sigma smooth.noise.0.gii
awk {print $2}
++ 3dmaskave: AFNI version=AFNI_16.2.06 (Jul 25 2016) [64-bit]
+++ 163842 voxels survive the mask
3dcalc -a smooth.noise.0.gii -b t.stdev.1D -expr a/b -prefix smooth.white.0.gii
++ 3dcalc: AFNI version=AFNI_16.2.06 (Jul 25 2016) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./smooth.white.0.gii
@ iminus1 = 10 - 1
foreach index ( count -digits 1 0 $iminus1 )
count -digits 1 0 9
foreach pind ( count -digits 1 1 $#pthr_list )
count -digits 1 1 4
set pthr =
set zither =

/…/fsaverage_afni/SUMA/fsaverage_afni_lh.spec -surf_A smoothwm -input smooth.white.0.gii[0] 0 -sort_area -rmm -1 -athresh
need argument after -athresh
0.00user 0.00system 0:00.01elapsed 26%CPU (0avgtext+0avgdata 4228maxresident)k
0inputs+0outputs (0major+1174minor)pagefaults 0swaps

Any idea what is happening? This is the list of the files written in the folder:

-rw-r–r–. 1 30 Aug 11 13:50 dummy.TRs.10.1D
-rw-r–r–. 1 2.2M Aug 11 13:50 nodes.1D
-rw-r–r–. 1 855K Aug 11 13:50 empty.gii
-rw-r–r–. 1 855K Aug 11 13:50 all_1.gii
-rw-r–r–. 1 8.4M Aug 11 13:50 surf.noise.0.gii
-rw-r–r–. 1 7.6K Aug 11 13:53 smooth.noise.0.gii.1D.smrec
-rw-r–r–. 1 8.4M Aug 11 13:53 smooth.noise.0.gii
-rw-r–r–. 1 109 Aug 11 13:53
-rw-r–r–. 1 100 Aug 11 13:53 t.stdev.1D
-rw-r–r–. 1 8.4M Aug 11 13:53 smooth.white.0.gii
-rw-r–r–. 1 0 Aug 11 13:53 clust.out.0.0.

thank you very much for your help.


Hi Giovanni,

Your command is working for me. Please send me email with 2 files
(it is a bit much to post here): the actual surf.sim.15_10iter script, along
with the output of:

tcsh -x surf.sim.15_10iter |& tee

So mail me surf.sim.15_10iter and .
Clicking on my name should show the email address, I believe.


  • rick

Thanks for your help Rick. I have sent you an email with the files you requested.


Thanks Giovanni.

Your script it identical with one of my own, which is
working fine (but on my system and with my data).
But I see that your AFNI version might be 3 years
old. Is it?

Can you regenerate the output text? It just shows
that the result directory already exists. I guess you
can delete the old directory and re-run it.


  • rick

Hi Rick,
I tried to run the command with an updated version of AFNI and everything works fine.

Thank you very much for your help.


That is good news, thanks for the update!

  • rick