#!/bin/csh
#
# compare the properties of stars in Mike Gutzwiller'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 GUTZ_RACOL=5
set GUTZ_DECCOL=6
set GUTZ_EQUINOX=2000
set GUTZ_MAGSTR="v=7"
set RICH_RACOL=2
set RICH_DECCOL=3
set RICH_EQUINOX=2000
set RICH_MAGSTR="v=6"


   set gfile=../gutz/s31t0493.946
   set rfile=../richmond/g1493946.ast

   $PHOTOM_MATCH $gfile $GUTZ_RACOL $GUTZ_DECCOL $GUTZ_EQUINOX $GUTZ_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
