# just a quick example for now... # # consider running via: # # tcsh -x s10.surface.analysis |& tee output.s10.surface.analysis set subj = sb23.blk # todo: # # in spec, needed to set pial parent to SAME # need to create mid-surface for SurfSmooth command # just be sure we have the results directory to play in if ( ! -d $subj.results ) then echo missing results directory '$subj.results', exiting... exit endif cd $subj.results set runs = (`count -digits 2 1 9`) # map EPI data to the surface (start with the volreg output) foreach run ( $runs ) 3dVol2Surf \ -spec ../SUMA/sb23_lh_141_std.spec \ -sv ../SUMA/sb23_SurfVol_aligned+orig \ -surf_A smoothwm \ -surf_B pial \ -grid_parent pb02.$subj.r$run.volreg+orig \ -map_func ave \ -f_steps 20 \ -f_index nodes \ -out_niml sb02.$subj.r$run.v2s.niml.dset end # blur using SurfSmooth foreach run ( $runs ) SurfSmooth \ -met HEAT_07 \ -spec ../SUMA/sb23_lh_141_std.spec \ -surf_A midlayer \ -input sb02.$subj.r$run.v2s.niml.dset \ -blurmaster sb02.$subj.r$run.v2s.niml.dset \ -output sb03.$subj.r$run.blur.niml.dset \ -detrend_in \ -target_fwhm 5 end # scale the data, using 3dcalc # note that no mask is necessary, unless we want to omit low-signal areas foreach run ( $runs ) 3dTstat -prefix rm.mean_r$run.niml.dset sb03.$subj.r$run.blur.niml.dset 3dcalc -a sb03.$subj.r$run.blur.niml.dset \ -b rm.mean_r$run.niml.dset \ -expr 'min(200, a/b*100)' \ -prefix sb04.$subj.r$run.scale.niml.dset end # run the regression analysis 3dDeconvolve -input sb04.$subj.r??.scale.niml.dset \ -polort 2 \ -num_stimts 15 \ -stim_times 1 stimuli/blk_times.01.tneg.1D 'BLOCK(30,1)' \ -stim_label 1 tneg \ -stim_times 2 stimuli/blk_times.02.tpos.1D 'BLOCK(30,1)' \ -stim_label 2 tpos \ -stim_times 3 stimuli/blk_times.03.tneu.1D 'BLOCK(30,1)' \ -stim_label 3 tneu \ -stim_times 4 stimuli/blk_times.04.eneg.1D 'BLOCK(30,1)' \ -stim_label 4 eneg \ -stim_times 5 stimuli/blk_times.05.epos.1D 'BLOCK(30,1)' \ -stim_label 5 epos \ -stim_times 6 stimuli/blk_times.06.eneu.1D 'BLOCK(30,1)' \ -stim_label 6 eneu \ -stim_times 7 stimuli/blk_times.07.fneg.1D 'BLOCK(30,1)' \ -stim_label 7 fneg \ -stim_times 8 stimuli/blk_times.08.fpos.1D 'BLOCK(30,1)' \ -stim_label 8 fpos \ -stim_times 9 stimuli/blk_times.09.fneu.1D 'BLOCK(30,1)' \ -stim_label 9 fneu \ -stim_file 10 dfile.rall.1D'[0]' -stim_base 10 -stim_label 10 roll \ -stim_file 11 dfile.rall.1D'[1]' -stim_base 11 -stim_label 11 pitch \ -stim_file 12 dfile.rall.1D'[2]' -stim_base 12 -stim_label 12 yaw \ -stim_file 13 dfile.rall.1D'[3]' -stim_base 13 -stim_label 13 dS \ -stim_file 14 dfile.rall.1D'[4]' -stim_base 14 -stim_label 14 dL \ -stim_file 15 dfile.rall.1D'[5]' -stim_base 15 -stim_label 15 dP \ -gltsym 'SYM: +eneg -fneg' \ -glt_label 1 eneg_vs_fneg \ -gltsym 'SYM: 0.5*fneg 0.5*fpos -1.0*fneu' \ -glt_label 2 face_contrast \ -gltsym 'SYM: tpos epos fpos -tneg -eneg -fneg' \ -glt_label 3 pos_vs_neg \ -fout -tout -x1D sX.xmat.1D -xjpeg sX.jpg \ -fitts fitts.$subj.niml.dset \ -bucket stats.$subj.niml.dset