#!/bin/sh

if [ "$8" = "" ] ; then
  echo "Usage: resonance.sh a e inc node peri capm p q";
  exit 1
fi

LD_LIBRARY_PATH=.; export LD_LIBRARY_PATH

cp makein.src makein.in
echo "$1 $2 $3 $4 $5 $6" >> makein.in
./makein < makein.in > makein.out
./pltp.awk < makein.out

./swift_rmvs3_SECULAR_THEORY < swift_rmvs3.in > swift_rmvs3.out

./follow2 bin.dat follow2.out 1

./esigma.awk -2 1 $7 $8 follow2.out > esigma.out

#GNUPLOT=/usr/local/bin/gnuplot4
GNUPLOT=/usr/bin/gnuplot

$GNUPLOT ./esigma.plt
$GNUPLOT ./at.plt
$GNUPLOT ./et.plt
$GNUPLOT ./it.plt
$GNUPLOT ./varpit.plt
$GNUPLOT ./nodet.plt
$GNUPLOT ./sigmat.plt

exit


