#!/bin/csh # # get the average activation from the deconvolve script foreach ptid (`ls ../M?/*BRIKS/*haririEC_1all.buc_REML+tlrc.HEAD | awk -F"/|BRIKS" '{print $3}' `) foreach num (`seq 1 4`) set run = haririEC_${num}all.buc_REML cd /mnt/nfs2/users/alans/DOD/${ptid}BRIKS rm ${ptid}${run}_r+tlrc* rm ${ptid}${run}_Fz+tlrc* # convert r2 to r # point to MC05VC16_07262010haririEC_3all.buc_REML+tlrc # r = b = 4 # t = c = 3 # MT17_09032011haririEC_4all.buc_REML+tlrc. 3dcalc -fscale\ -a ${ptid}${run}+tlrc'[4]' \ -b ${ptid}${run}+tlrc'[3]' \ -expr "sqrt(a)*(b/abs(b))" \ -prefix ${ptid}${run}_r # convert r to fisher z tranform 3dcalc -fscale\ -a ${ptid}${run}_r+tlrc \ -expr "0.5*log((1+a)/(1-a))" \ -prefix ${ptid}${run}_Fz end end