AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
October 04, 2007 09:42AM
If you want to average a bunch of one-brick datasets, you can use 3dMean, OR you can use 3dTstat in the following tricky way:

3dTstat -mean "fred+orig ethel+orig lucy+orig ricky+orig"

A little-advertised feature of AFNI dataset names is that a dataset name with a space in it means "do an internal 3dTcat on these collections of datasets" -- so the result of the above command is a voxel-wise average of these 4 one-brick datasets. Of course, you could use Daniel's new -nzmean instead of -mean, to get the results you desire.

This auto-catenation feature should work in just about every program.

Note 1:
If the dataset name contains a "[count ...]" construct for complex sub-brick selection, then the "space = catenate" rule doesn't apply. There is no way to auto-catenate datasets with such complex sub-brick selections. Ordinary sub-brick selection works though, as in

3dTstat -nzmean 'a+orig[3..9] b+orig[7..21]'

which would average in "time" the nonzero values amongst the 22 input sub-bricks presented to the program.

Note 2:
The shell does not directly expand wildcards inside quotes, so if you want to wildcard the filenames, you have to be tricky. For example (in tcsh):

set fredlist = ( `ls fred*+orig.HEAD` )
3dTstat -mean "$fredlist"

should work.

Note 3:
Fully understanding this post is another step on the road to qualifying for Jedi AFNI Master status. Or on the road to complete psychosis, whichever comes first.

Subject Author Posted

voxels with 0.0 for 3dMean/3dcalc

Lee Friedman October 03, 2007 10:33AM

Re: voxels with 0.0 for 3dMean/3dcalc

rick reynolds October 03, 2007 10:50AM

Re: voxels with 0.0 for 3dMean/3dcalc

Lee Friedman October 03, 2007 11:15AM

Re: voxels with 0.0 for 3dMean/3dcalc

Daniel Glen October 03, 2007 05:47PM

Re: voxels with 0.0 for 3dMean/3dcalc

Lee Friedman October 03, 2007 07:20PM

Re: auto-catenation of datasets

bob cox October 04, 2007 09:42AM

getting philosophical

Lee Friedman October 04, 2007 10:54AM

Re: getting philosophical

Tom Johnstone October 04, 2007 11:35AM

Re: getting philosophical

Jatin October 07, 2007 11:55AM