#!/bin/csh if ($#argv < 2) then echo Extract XA plane from 4D hypercomplex FID: echo " Usage: " $0 inTemplate outName "[yLoc] [zLoc]" echo " Example: " $0 fid/test%02d%03d.fid xa.fid exit 1 endif # # Convert %d format template to %f float format required by Macro: set yLoc = 1 set zLoc = 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 zLoc = $4 endif M $NMRTXT/xa4d.M -str inName $inName outName $outName -var xaYLoc $yLoc xaZLoc $zLoc -quit