#!/bin/csh if (`flagLoc $argv -help`) then echo '2D PCA Linear Prediction:' echo ' -inDir inDir [ft] Input Directory.' echo ' -outDir outDir [pcalp] Output Directory.' echo 'Input Specification; Output File Names Will be the Same:' echo ' -in inList [(cd $inDir; ls test*.ft3)]' echo ' -ndim dimCount [3]' echo 'Linear Prediction and PCA Parameters:' echo ' -xLP lpModeX [-fb] X-Axis LP Mode.' echo ' -ordX lpOrdX [16] X-Axis LP Order.' echo ' -xX1 lpx1 [2] X-Axis LP Data X1.' echo ' -yLP lpModeY [-fb] Y-Axis LP Mode.' echo ' -yX1 lpx1 [2] Y-Axis LP Data X1.' echo ' -ordY lpOrdY [16] Y-Axis LP Order.' echo ' -nc nc [16] Number of Principal Components to Use.' echo ' -extra nx [0] Number of Extra Principal Components to Use.' echo ' -thresh thresh [0.0] Threshold for Auto Mode.' echo 'Window Function (End Parameter list with --):' echo ' -xApod apodX [SP -hdr --] Final Window Function for X-Axis.' echo ' -yApod apodY [SP -hdr --] Final Window Function for Y-Axis.' echo 'Zero Fill Arguments (End Parameter list with --):' echo ' -xZF zfX [-auto --] Zero Fill for X-Axis.' echo ' -yZF zfY [-auto --] Zero Fill for Y-Axis.' echo 'Baseline Correction Function (End Parameter list with --):' echo ' -xBase baseX [NULL --] Baseline Function for X-Axis.' echo ' -yBase baseY [NULL --] Baseline Function for Y-Axis.' exit 0 endif # #----------------------------------------------------------------------------- set nc = (`getArgD $argv -nc 16`) set ordX = (`getArgD $argv -ordX 16`) set ordY = (`getArgD $argv -ordY 16`) set xX1 = (`getArgD $argv -xX1 2`) set yX1 = (`getArgD $argv -yX1 2`) set ndim = (`getArgD $argv -ndim 3`) set thresh = (`getArgD $argv -thresh 0.0`) set extra = (`getArgD $argv -extra 0`) set xZF = (`getListArgD2 $argv -xZF -- -auto`) set yZF = (`getListArgD2 $argv -yZF -- -auto`) set xBase = (`getListArgD2 $argv -xBase -- NULL`) set yBase = (`getListArgD2 $argv -yBase -- NULL`) set xApod = (`getListArgD2 $argv -xApod -- SP -hdr`) set yApod = (`getListArgD2 $argv -yApod -- SP -hdr`) set inDir = (`getArgD $argv -inDir ft`) set outDir = (`getArgD $argv -outDir pcalp`) set xPSMode = (`getArgD $argv -xPS Auto`) set yPSMode = (`getArgD $argv -yPS Auto`) set xLP = "-fb" set yLP = "-fb" set xPS = Auto set yPS = Auto if (`string csame $xPSMode None`) then set xPS = NULL endif if (`string csame $xPSMode Auto`) then set xPS = "PS,hdr" endif if (`string csame $yPSMode None`) then set yPS = NULL endif if (`string csame $yPSMode Auto`) then set yPS = "PS,hdr" endif set loc = (`flagLoc $argv -xLP`) if ($loc) then @ loc++ set xLP = $argv[$loc] endif set loc = (`flagLoc $argv -yLP`) if ($loc) then @ loc++ set yLP = $argv[$loc] endif set loc = (`flagLoc $argv -in`) if ($loc) then set inList = (`getListArgD $argv -in -- None`) else set inList = (`cd $inDir; ls test*.ft3`) endif # #----------------------------------------------------------------------------- foreach rootName ($inList) set inName = $inDir/$rootName set outName = $outDir/$rootName if (!(-e $inName)) then echo Error Finding Input File $inName exit 1 endif pcaNMR -nc $nc -extra $extra -in $inName -score score.dat -load load.dat \ -thresh $thresh -maxres -avg -verb echo $outName if ($ordX != 0) then nmrPipe -in score.dat \ | nmrPipe -fn HT -auto \ | nmrPipe -fn `expandArg0 $xPS` -inv -nocheckArgs \ | nmrPipe -fn FT -inv \ | nmrPipe -fn ZF -inv \ | nmrPipe -fn SP -inv -hdr \ | nmrPipe -fn LP $xLP -ord $ordX -x1 $xX1 \ | nmrPipe -fn $xApod \ | nmrPipe -fn ZF $xZF \ | nmrPipe -fn FT \ | nmrPipe -fn `expandArg0 $xPS` -di -nocheckArgs \ | nmrPipe -fn $xBase \ -out score.lp.dat -ov else cp score.dat score.lp.dat endif if ($ordY != 0) then nmrPipe -in load.dat \ | nmrPipe -fn HT -auto \ | nmrPipe -fn `expandArg0 $yPS` -inv -nocheckArgs \ | nmrPipe -fn FT -inv \ | nmrPipe -fn ZF -inv \ | nmrPipe -fn SP -inv -hdr \ | nmrPipe -fn LP $yLP -ord $ordY -x1 $yX1 \ | nmrPipe -fn $yApod \ | nmrPipe -fn ZF $yZF \ | nmrPipe -fn FT \ | nmrPipe -fn `expandArg0 $yPS` -di \ | nmrPipe -fn $yBase \ -out load.lp.dat -ov else cp load.dat load.lp.dat endif nmrRecon -score score.lp.dat -load load.lp.dat -out $outName -ndim $ndim end /bin/rm -rf score.dat load.dat score.lp.dat load.lp.dat