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  

|
Jim Eliassen
December 12, 2002 10:32AM
Hi Eric,

We typically cluster sub-briks in pairs, a coefficient and its associated t-statistic. The following script loops through a set of sub-briks stepping two sub-briks per loop. It uses the "brik_ct_plus" sub-brik, the odd one of the pair of sub-briks, to calculate the cluster and t-statistic cutoff, then applies this mask to the "brik_ct" sub-brik (the even numbered one of the pair that precedes the t-statistic). If you want to use an F-statistic sub-brik to threshold all other sub-briks you could move the cluster calculating step to a position outside and before the loop begins, then use that as a mask for all the sub-briks you want to mask. Just remember to step by the right increment for your data

-jim



#!/bin/csh -f

nice +20


@ brik_ct_max = 20 ## CHECK MAX NUMBER IN YOUR DATA##

#INITIALIZE THE COUNTER VARIABLES
@ brik_ct = 0 #PICK THE SUB-BRIK YOU WANT TO START WITH
@ brik_ct_plus = 0

while ($brik_ct < $brik_ct_max)

@ brik_ct_plus = $brik_ct + 1

#MASKS OUT NON-BRAIN
3dcalc -fscale \
-a "2factor+tlrc[${brik_ct_plus}]" \
-b ../coverage/12sub_coverage_mask+tlrc \
-expr "a*(b/b)" \
-prefix subbrick_${brik_ct_plus}_covmask

#USES OUTPUT OF PREVIOUS STEP
#T- OR F-VALUE CLIPPING AND CLUSTERING OF STATISTICAL SUB-BRIK
### CHECK FOR CORRECT T- OR F-VALUE###
3dmerge -1clip 2.901 \
-1clust 3 594 \
-prefix subbrick_${brik_ct_plus}_tclip \
subbrick_${brik_ct_plus}_covmask+tlrc

#T-/F-VALUE AND CLUSTER CLIPPED SUB-BRIK MASKS COEF. SUB-BRIK
3dcalc -fscale \
-a "2factor+tlrc[${brik_ct}]" \
-b subbrick_${brik_ct_plus}_tclip+tlrc \
-expr "a*(b/b)" \
-prefix subbrick_${brik_ct}_tclip

#STEP BY TWO TO BEGIN WITH NEXT T-STAT SUB-BRIK
@ brik_ct = $brik_ct + 2

end #while

#BUCKET FROM 0 to brik_ct_max - 1 IN COEF/T-STAT SUB-BRIK PAIRS
3dbucket -prefix clip_005_05_covtclip \
-fbuc subbrick_t${tp}_0_tclip+tlrc \
-fbuc subbrick_t${tp}_1_tclip+tlrc \
-fbuc subbrick_t${tp}_2_tclip+tlrc \
-fbuc subbrick_t${tp}_3_tclip+tlrc \
-fbuc subbrick_t${tp}_4_tclip+tlrc \
-fbuc subbrick_t${tp}_5_tclip+tlrc \
-fbuc subbrick_t${tp}_6_tclip+tlrc \
-fbuc subbrick_t${tp}_7_tclip+tlrc \
-fbuc subbrick_t${tp}_8_tclip+tlrc \
-fbuc subbrick_t${tp}_9_tclip+tlrc \
-fbuc subbrick_t${tp}_10_tclip+tlrc \
-fbuc subbrick_t${tp}_11_tclip+tlrc \
-fbuc subbrick_t${tp}_12_tclip+tlrc \
-fbuc subbrick_t${tp}_13_tclip+tlrc \
-fbuc subbrick_t${tp}_14_tclip+tlrc \
-fbuc subbrick_t${tp}_15_tclip+tlrc \
-fbuc subbrick_t${tp}_16_tclip+tlrc \
-fbuc subbrick_t${tp}_17_tclip+tlrc \
-fbuc subbrick_t${tp}_18_tclip+tlrc \
-fbuc subbrick_t${tp}_19_tclip+tlrc

rm subbrick_t${tp}_*
Subject Author Posted

clustering and merging bucket data sets

Eric December 11, 2002 03:47PM

Re: clustering and merging bucket data sets

Jim Eliassen December 12, 2002 10:32AM

Re: clustering and merging bucket data sets

Eric December 12, 2002 04:54PM

Re: clustering and merging bucket data sets

Jim Eliassen December 13, 2002 01:27PM