#!/bin/tcsh # # 3ddeconvolution script # if ($#argv <3) then echo "Usage: 3dDecSeed subjID [run name] [dir] " exit 1 endif set ptid = $1 set run = $2 set tdir = $3 cp ${run}wav ${tdir} cd ${tdir} foreach r (1 2 3 4) set rn1 = `expr $r - 1` rm ${ptid}${run}_${r}all.buc*.* rm ${ptid}${run}_${r}_error*.* 3dDeconvolve \ -input ${ptid}${run}_alDBPM+tlrc \ -censor ${ptid}${run}TS_${r}_fullCensor.1D \ -polort 4 \ -num_stimts 7 \ -stim_file 1 ${ptid}${run}TS.1D'['${rn1}']' -stim_label 1 TS_$r \ -stim_file 2 ${ptid}${run}_tsh_vr_motion.1D'[0]' -stim_label 2 movRoll \ -stim_file 3 ${ptid}${run}_tsh_vr_motion.1D'[1]' -stim_label 3 movPitch \ -stim_file 4 ${ptid}${run}_tsh_vr_motion.1D'[2]' -stim_label 4 movYaw \ -stim_file 5 ${ptid}${run}_tsh_vr_motion.1D'[3]' -stim_label 5 movX \ -stim_file 6 ${ptid}${run}_tsh_vr_motion.1D'[4]' -stim_label 6 movY \ -stim_file 7 ${ptid}${run}_tsh_vr_motion.1D'[5]' -stim_label 7 movZ \ -errts ${ptid}${run}_${r}_error_ts \ -rout -bout -tout -nofull_first \ -bucket ${ptid}${run}_${r}all.buc # StDev of error_ts (noise) 3dTstat -prefix ${ptid}${run}_${r}_err_ts_stdev -stdev -datum short ${ptid}${run}_${r}_error_ts+tlrc # add noise to bucket, 3dd will calculate signal-to-noise 3dbucket -glueto ${ptid}${run}_${r}all.buc+tlrc \ -fbuc ${ptid}${run}_${r}_err_ts_stdev+tlrc rm ${ptid}${run}_${r}_err_ts_stdev+tlrc* rm ${ptid}${run}_${r}_error_ts+tlrc* chmod a+x ${ptid}${run}_${r}all.REML_cmd ./${ptid}${run}_${r}all.REML_cmd end