#!/bin/csh
#
# compare the properties of stars in Glenn Gombert's star lists with
#   those from Michael Richmond's star lists.
#
#

set PHOTOM_MATCH=~/scr/match/photom_match
set CATALOG=~/scr/misc/landolt.ast
set CAT_RACOL=2
set CAT_DECCOL=3
set CAT_EQUINOX=2000
set CAT_MAGSTR="i=8"
set OTHER_RACOL=2
set OTHER_DECCOL=3
set OTHER_EQUINOX=2000
set OTHER_MAGSTR="v=4"
set RICH_RACOL=2
set RICH_DECCOL=3
set RICH_EQUINOX=2000
set RICH_MAGSTR="v=6"


   set gfile=./r1493946.cal
   set rfile=../richmond/g1493946.ast

  $PHOTOM_MATCH $gfile $OTHER_RACOL $OTHER_DECCOL $OTHER_EQUINOX $OTHER_MAGSTR \
                $rfile $RICH_RACOL $RICH_DECCOL $RICH_EQUINOX $RICH_MAGSTR \
                 > comp.out

   echo "here comes results for mag <= 9"
   egrep -v '#' comp.out | awk '{ if ($7 <= 9) { print $8 } }' | stats
   echo "here comes results for 9 < mag <= 11"
   egrep -v '#' comp.out | awk '{ if (($7 > 9) && ($7 <= 11)) { print $8 } }' | stats
   echo "here comes results for mag > 11"
   egrep -v '#' comp.out | awk '{ if ($7 > 11) { print $8 } }' | stats

exit 0
