#!/bin/tcsh -f if ("$1" == "-clean") then \rm -f DemoSubj_EccExpavir.DEL+orig* \rm -f v2s.??.DEL.niml.dset \rm -f v2s.??.TS.niml.dset \rm -f TS.??.DEL.niml.dset \rm -f DemoSubj_EccExpavir.DEL.log \rm -f TS.??.DEL.niml.dset.log goto END endif #Calculate some volume based stats if ( ! -f DemoSubj_EccExpavir.DEL+orig.HEAD) then 3ddelay -input DemoSubj_EccExpavir+orig \ -ideal_file Ref_10on20Off_GAM.1D \ -fs 0.5 -T 30 \ -prefix DemoSubj_EccExpavir.DEL else echo "DemoSubj_EccExpavir.DEL+orig.HEAD already on disk" endif #Set the hemisphere (usually we set a loop with "foreach hem (lh rh)" foreach hem (lh rh) #run the mapping command to map a statistical dataset # #NOTE: This is not the recommended approach since we will be #averaging over statistical parameters without normalizing them #at first. # if ( ! -f v2s.${hem}.DEL.niml.dset ) then 3dVol2Surf -spec ../SurfData/SUMA/std.DemoSubj_${hem}.spec \ -surf_A std.${hem}.smoothwm.asc \ -surf_B std.${hem}.pial.asc \ -sv DemoSubj_SurfVol_Alnd_Exp+orig \ -grid_parent DemoSubj_EccExpavir.DEL+orig \ -map_func ave \ -f_steps 10 \ -f_index nodes \ -out_niml v2s.${hem}.DEL.niml.dset #add FDR curve 3drefit -addFDR v2s.${hem}.DEL.niml.dset else echo "v2s.${hem}.DEL.niml.dset already on disk" endif #You can mask what is being masked on the fly with the cmask option. #For example, add the following to the previous command: # -cmask '-a DemoSubj_EccExpavir.DEL+orig[2] \ # -expr step(a-0.5)' \ #To create a full dataset, one with a value for every node making #up the surface, consider option -oob_value, and option -oom_value #if also using -cmask #The better approach is to map the time series onto the surface: if ( ! -f v2s.${hem}.TS.niml.dset) then setenv AFNI_NIML_TEXT_DATA NO 3dVol2Surf -spec ../SurfData/SUMA/std.DemoSubj_${hem}.spec \ -surf_A std.${hem}.smoothwm.asc \ -surf_B std.${hem}.pial.asc \ -sv DemoSubj_SurfVol_Alnd_Exp+orig \ -grid_parent DemoSubj_EccExpavir+orig \ -map_func ave \ -f_steps 10 \ -f_index nodes \ -out_niml v2s.${hem}.TS.niml.dset else echo "v2s.${hem}.TS.niml.dset already on disk" endif #Then calculate the stats on the surface if ( ! -f TS.${hem}.DEL.niml.dset) then 3ddelay -input v2s.${hem}.TS.niml.dset \ -ideal_file Ref_10on20Off_GAM.1D \ -fs 0.5 -T 30 \ -prefix TS.${hem}.DEL.niml.dset else echo "TS.${hem}.DEL.niml.dset already on disk" endif end END: