#!/bin/csh
#
# call "man_astrom.csh" repeatedly for all the .pht files in the directory.
# Note that the difference between adjacent PHT files is about 3.8 degrees
#
# usage: astrom.csh file ra dec 
#
set DELTA=3.8
set ASTROM_SCRIPT=~/scr/tass/astrom.dir/man_astrom.csh
set LOG=astromall.log
set TMP=astromall.$$

if ($#argv != 3) then
  echo "usage: astrom.csh file ra dec"
  exit 1
endif

/bin/rm -rf $LOG

set file=$1
set ra=$2
set dec=$3

  
  $ASTROM_SCRIPT $file 2 3 4 $ra $dec >> $LOG
  if ($status != 0) then
    echo "astrom.csh: failed for file $file"
    exit 1
  endif


/bin/rm -rf $TMP

exit 0
