#! /bin/csh -f # # flacproc-sess # # Original Author: Doug Greve # CVS Revision Info: # $Author: nicks $ # $Date: 2007/01/09 22:41:17 $ # $Revision: 1.22 $ # # Copyright (C) 2002-2007, # The General Hospital Corporation (Boston, MA). # All rights reserved. # # Distribution, usage and copying of this software is covered under the # terms found in the License Agreement file named 'COPYING' found in the # FreeSurfer source code root directory, and duplicated here: # https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferOpenSourceLicense # # General inquiries: freesurfer@nmr.mgh.harvard.edu # Bug reports: analysis-bugs@nmr.mgh.harvard.edu # set VERSION = '$Id: flacproc-sess,v 1.22 2007/01/09 22:41:17 nicks Exp $'; set cmdargs = ($argv); set flac = (); set analysis = (); set monly = 0; set nolog = 0; set PrintHelp = 0; set Synth = 0; set SynthAR1 = 0; set npca = 0; set npcathresh = 1; set svres = 0; set svres0 = 0; set svrvar0 = 1; set svar1 = 1; set do_rfx = 0; set do_ffx = 1; set do_fla = 1; set do_fit = 1; if($#argv == 0) goto usage_exit; set n = `echo $argv | grep -e -help | wc -l` if($n != 0) then set PrintHelp = 1; goto usage_exit; exit 1; endif set SessList = `getsesspath $argv`; if($status || $#SessList == 0) then getsesspath $argv exit 1; endif goto parse_args; parse_args_return: goto check_params; check_params_return: if(! $nolog) then set LF = log/flacproc-sess.$flac.log if(-e $LF) mv $LF $LF.bak else set LF = /dev/null endif date | tee -a $LF pwd | tee -a $LF echo $0 | tee -a $LF echo $cmdargs | tee -a $LF echo $VERSION | tee -a $LF hostname | tee -a $LF if(! $monly) set MLF = /tmp/flacproc-sess.$$.m rm -f $MLF #------------------------------------------------------------------# set StartTime = `date`; foreach sess ($SessList) set sessid = `basename $sess`; #--------------------------# tee -a $MLF > /dev/null <