#!/usr/bin/perl
#
#

$infile = "solve_maxi4_v.img";


open(INFILE, $infile) || die("can't open file $infile");
while (<INFILE>) {
  $line = $_;
  @words = split(/\s+/, $line);
  $image_index = $words[0];
  $jd = $words[3];
  $trunc_jd = $jd - 2458000.0;
  $em = $words[4];

  # skip all entries before this time
  if ($trunc_jd < 710.64) {
    next;
  }

  $crit_em = -2207.931 + 3.125*($trunc_jd);
  if ($em > $crit_em) {
    # this image has too large an em value -- we'll discard it
    printf " badim=%-4d ", $image_index;
  }

}
printf "\n";

exit 0;
