Open main menu

Changes

cd ..
end
</source>
 
== Extract the spectra settings from Varian procpar file ==
Now we want to make a settings file we can read in relax.
 
<source lang="bash">
set FIDS=`cat fid_files.ls`
set OUT=$PWD/exp_parameters.txt
 
echo "# DIRN I deltadof2 dpwr2slock ncyc ss sfrq" > $OUT
foreach I (`seq 1 ${#FIDS}`)
set FID=${FIDS[$I]}; set DIRN=`dirname $FID`
cd $DIRN
set deltadof2=`awk '/^deltadof2 /{f=1;next}f{print $2;exit}' procpar`
set dpwr2slock=`awk '/^dpwr2slock /{f=1;next}f{print $2;exit}' procpar`
set ncyc=`awk '/^ncyc /{f=1;next}f{print $2;exit}' procpar`
set ss=`awk '/^ss /{f=1;next}f{print $2;exit}' procpar`
set sfrq=`awk '/^sfrq /{f=1;next}f{print $2;exit}' procpar`
echo "$DIRN $I $deltadof2 $dpwr2slock $ncyc $ss $sfrq" >> $OUT
cd ..
end
 
cat $OUT
</source>
Trusted, Bureaucrats
1,382

edits