set echo = 1 ; breaksw breaksw end end while ( $#argv != 0 ) while ( 0 != 0 ) goto parse_args_return ; goto parse_args_return foreach grp ( $grpdefs ) foreach grp ( ) goto check_params ; goto check_params if ( $#SessList == 0 ) then if ( 1 == 0 ) then if ( $#SearchPathList == 0 ) then if ( 0 == 0 ) then set SearchPathList = "." ; set SearchPathList = . endif endif goto check_params_return ; goto check_params_return set UniqueList = ( ) ; set UniqueList = ( ) foreach d ( $SearchPathList ) foreach d ( . ) if ( ! -e $d ) then if ( ! -e . ) then set IsUnique = 1 ; set IsUnique = 1 foreach u ( $UniqueList ) foreach u ( ) if ( $IsUnique ) set UniqueList = ( $UniqueList $d ) ; if ( 1 ) set UniqueList = ( . ) set UniqueList = ( . ) end end set SearchPathList = ( $UniqueList ) ; set SearchPathList = ( . ) set errs = 0 ; set errs = 0 set SessPath = ( ) ; set SessPath = ( ) foreach sess ( $SessList ) foreach sess ( sub-201_post-task ) set tmp = ( ) ; set tmp = ( ) foreach d ( $SearchPathList ) foreach d ( . ) set stst = $d/$sess set stst = ./sub-201_post-task if ( -d $stst ) then if ( -d ./sub-201_post-task ) then if ( ! -r $stst ) then if ( ! -r ./sub-201_post-task ) then pushd $stst > /dev/null ; pushd ./sub-201_post-task set tmp = ( $tmp `$PWDCMD` ) ; set tmp = ( `$PWDCMD` ) pwd popd > /dev/null ; popd endif endif end end set nfound = ( $#tmp ) ; set nfound = ( 1 ) if ( $nfound == 0 ) then if ( 1 == 0 ) then if ( $nfound > 1 ) then if ( 1 > 1 ) then set SessPath = ( $SessPath $tmp ) ; set SessPath = ( /sub-201_post-task ) end end set UniqueList = ( ) ; set UniqueList = ( ) foreach s ( $SessPath ) foreach s ( /sub-201_post-task ) set IsUnique = 1 ; set IsUnique = 1 foreach u ( $UniqueList ) foreach u ( ) if ( ! $IsUnique && ! $AllowRedundant ) then if ( ! 1 && ! 0 ) then set UniqueList = ( $UniqueList $s ) ; set UniqueList = ( /sub-201_post-task ) endif endif end end echo $SessPath echo /sub-201_post-task exit $errs ; exit 0 set echo = 1 ; breaksw breaksw end end while ( $#argv != 0 ) while ( 0 != 0 ) goto parse_args_return ; goto parse_args_return goto check_params ; goto check_params if ( $#SessList == 0 ) then if ( 1 == 0 ) then if ( $#roicfg == 0 ) then if ( 1 == 0 ) then set roiname = `cat $roicfg | awk '{if($1 == "roiname") print $2}'` set roiname = `cat $roicfg | awk '{if($1 == "roiname") print $2}'` awk {if($1 == "roiname") print $2} cat rh.V1 set label = `cat $roicfg | awk '{if($1 == "label") print $2}'` set label = `cat $roicfg | awk '{if($1 == "label") print $2}'` awk {if($1 == "label") print $2} cat rh.V1 set annot = `cat $roicfg | awk '{if($1 == "annot") print $2}'` set annot = `cat $roicfg | awk '{if($1 == "annot") print $2}'` awk {if($1 == "annot") print $2} cat rh.V1 if ( $#annot ) then if ( 0 ) then set segvol = `cat $roicfg | awk '{if($1 == "seg") print $2}'` set segvol = `cat $roicfg | awk '{if($1 == "seg") print $2}'` awk {if($1 == "seg") print $2} cat rh.V1 if ( $#segvol ) then if ( 0 ) then set fillthresh = `cat $roicfg | awk '{if($1 == "fillthresh") print $2}'` set fillthresh = `cat $roicfg | awk '{if($1 == "fillthresh") print $2}'` awk {if($1 == "fillthresh") print $2} cat rh.V1 set analysis = `cat $roicfg | awk '{if($1 == "analysis") print $2}'` set analysis = `cat $roicfg | awk '{if($1 == "analysis") print $2}'` awk {if($1 == "analysis") print $2} cat rh.V1 set contrast = `cat $roicfg | awk '{if($1 == "contrast") print $2}'` set contrast = `cat $roicfg | awk '{if($1 == "contrast") print $2}'` awk {if($1 == "contrast") print $2} cat rh.V1 set sign = `cat $roicfg | awk '{if($1 == "sign") print $2}'` set sign = `cat $roicfg | awk '{if($1 == "sign") print $2}'` awk {if($1 == "sign") print $2} cat rh.V1 set thresh = `cat $roicfg | awk '{if($1 == "thresh") print $2}'` set thresh = `cat $roicfg | awk '{if($1 == "thresh") print $2}'` awk {if($1 == "thresh") print $2} cat rh.V1 set pct = `cat $roicfg | awk '{if($1 == "pct") print $2}'` set pct = `cat $roicfg | awk '{if($1 == "pct") print $2}'` awk {if($1 == "pct") print $2} cat rh.V1 set map = `cat $roicfg | awk '{if($1 == "map") print $2}'` set map = `cat $roicfg | awk '{if($1 == "map") print $2}'` awk {if($1 == "map") print $2} cat rh.V1 set frame = `cat $roicfg | awk '{if($1 == "frame") print $2}'` set frame = `cat $roicfg | awk '{if($1 == "frame") print $2}'` awk {if($1 == "frame") print $2} cat rh.V1 if ( ! -d $analysis ) then if ( ! -d task ) then goto check_params_return ; goto check_params_return set fsd = `getana -a $analysis -t fsd` set fsd = `getana -a $analysis -t fsd` getana -a task -t fsd set IsNative = `getana -a $analysis -t IsNative` set IsNative = `getana -a $analysis -t IsNative` getana -a task -t IsNative set IsMNI305 = `getana -a $analysis -t IsMNI305` set IsMNI305 = `getana -a $analysis -t IsMNI305` getana -a task -t IsMNI305 set IsSurface = `getana -a $analysis -t IsSurface` set IsSurface = `getana -a $analysis -t IsSurface` getana -a task -t IsSurface if ( $IsSurface ) then if ( 1 ) then set hemi = `getana -a $analysis -t hemi` set hemi = `getana -a $analysis -t hemi` getana -a task -t hemi set anasubject = `getana -a $analysis -t subject` set anasubject = `getana -a $analysis -t subject` getana -a task -t subject endif endif set RegDOF = `getana -a $analysis -t RegDOF` set RegDOF = `getana -a $analysis -t RegDOF` getana -a task -t RegDOF set cvol = ( ) ; set cvol = ( ) set labelfile = ( ) ; set labelfile = ( ) set segfile = ( ) ; set segfile = ( ) set annotfile = ( ) ; set annotfile = ( ) @ nthsess = 0 ; @ nthsess = 0 foreach sess ( $SessList ) foreach sess ( /sub-201_post-task ) @ nthsess = $nthsess + 1 ; @ nthsess = 0 + 1 set sessbase = `basename $sess` ; set sessbase = `basename $sess` basename /sub-201_post-task set sessdir = `dirname $sess` ; set sessdir = `dirname $sess` dirname /sub-201_post-task echo "-------------------------------------------" echo ------------------------------------------- ------------------------------------------- echo "$sess " echo /sub-201_post-task /sub-201_post-task date date Tue 06 Feb 2024 03:36:11 PM CET set subject = `cat $sess/subjectname` set subject = `cat $sess/subjectname` cat /sub-201_post-task/subjectname set anadir = $sess/$fsd/$analysis set anadir = /sub-201_post-task/bold/task if ( ! -e $anadir ) then if ( ! -e /sub-201_post-task/bold/task ) then set ext = `stem2fmt $anadir/meanfunc` set ext = `stem2fmt $anadir/meanfunc` stem2fmt /sub-201_post-task/bold/task/meanfunc if ( $#label ) then if ( 1 ) then set labelfile = $SUBJECTS_DIR/$subject/label/$label set labelfile = //sub-201_ses-post.long.sub-201_main/label/rh.V1 if ( ! -e $labelfile ) then if ( ! -e //sub-201_ses-post.long.sub-201_main/label/rh.V1 ) then set labelfile0 = $labelfile set labelfile0 = //sub-201_ses-post.long.sub-201_main/label/rh.V1 set labelfile = $SUBJECTS_DIR/$subject/label/$label.label set labelfile = //sub-201_ses-post.long.sub-201_main/label/rh.V1.label if ( ! -e $labelfile ) then if ( ! -e //sub-201_ses-post.long.sub-201_main/label/rh.V1.label ) then endif endif endif endif if ( $#segvol ) then if ( 0 ) then if ( $#annot ) then if ( 0 ) then if ( $#contrast ) then if ( 0 ) then set roivol = $anadir/$roiname.$ext set roivol = /sub-201_post-task/bold/task/rh.V1.ERROR: could not determine format for /sub-201_post-task/bold/task/meanfunc set: Variable name must begin with a letter.