#!/usr/bin/perl
#

# If you have multiple sets of images taken through different filters,
#     set this line to be the name of the filter you will analyze now
$filter = "V";
# This pattern must match the list of files you'll analyze now
@files = glob("m51-long*.pht");
# The results of this matching will go into a file with this name
$match_output_file = "multi_output" . $filter . ".dat";


#############################################################################
############# You shouldn't have to edit below this line ####################

$filter_lc = lc($filter);
$filter_uc = uc($filter);

$cmd  = "/old_spiff/home/richmond/tass/ensemble/multipht ";
$cmd .= " x=1 y=2 mag=7 err=8 ";
#$cmd .= " template=NQ_Gem_b_2-010.pht ";
$cmd .= " outfile=multi_" . $filter_lc . ".out ";
$cmd .= " matchrad=3 ";
$cmd .= " auto ";
foreach $file (@files) {
  $cmd .= " $file ";
}
$cmd .= " > $match_output_file ";

printf "cmd is ..$cmd.. \n";

exec($cmd);
#printf "ret is ..$ret.. \n";


exit 0;
