batch command to obtain statpar


We want to convert statistical sub-bricks (t-stat) with different number of degrees of freedom using 3dcalc -expr ‘fitt_t2z(a,z)’. Is there any command to obtain the statpar parameter in a batch? I could not find the obvious option:

3dinfo -statpar filename+tlrc :slight_smile:

thank you in advance,


3dAttribute BRICK_STATAUX filename+tlrc’[your-t-stat-sub-brick]’

The 4th (and last) number is the degrees of freedom for the t-statistic.

See more here:

Just to add to Gang’s reply, I will note that the compementary programs p2dsetstat and dsetstat2p can be useful in these kinds of back-and-forth from stats and pvalues:

(Actually, I just expanded the range of dsetstat2p’s calculations, too.)


… and, as another followup, we have updated the AFNI docs to have similar information from Gang’s page here:
…which might be useful.