#!/bin/csh if ($#argv < 2) then echo Extract XZ plane from 3D or 4D hypercomplex FID: echo " 3D Usage: " $0 inTemplate outName "[yLoc]" echo " 4D Usage: " $0 inTemplate outName "[yLoc] [aLoc]" echo " 3D Example: " $0 fid/test%03d.fid xz.fid echo " 4D Example: " $0 fid/test%02d%03d.fid xz.fid echo "" echo "Values for yLoc or aLoc are usually 1 or 2," echo "for first real and first imaginary point." exit 1 endif # # Convert %d template format to %f float format required by Macro: set yLoc = 1 set aLoc = 1 set inName = \ (`echo $1 | sed -e '/%02d/s/%02d/%02.0f/g' | sed -e '/%03d/s/%03d/%03.0f/g' | sed -e '/%04d/s/%04d/%04.0f/g' | sed -e '/%05d/s/%05d/%05.0f/g'`) set outName = $2 if ($#argv > 2) then set yLoc = $3 endif if ($#argv > 3) then set aLoc = $4 endif M $NMRTXT/xz4d.M -str inName $inName outName $outName -var xzYLoc $yLoc xzALoc $aLoc -quit