#!/usr/bin/perl
####################################################################
# measuregal.cgi
#
# Creates pages for angular size measurement of galaxies.
# Part of the Web-Hubble Lab project.
#
#
# Calling procedures: measuregal.cgi?GALAXY_NAME
# There must be a GALAXY_NAME.gif file in the
# data/ directory.
#
# measuregal.cgi?x=xval&y=yval
#
##########
#
# Luis Mendoza (mendoza@astro.washington.edu)
# Astronomy Department, University of Washington
# January 1999
#
# Modified 1 March 2005 by Ana Larson to point to new hubblelaw director
# files
####################################################################
require 'libs.pl';
# Directory where logfiles reside
#$log_dir="/host/mimas/net/www/labs/hubble/logs";
# Image scale, in $units per pixel
#
# POSS scale is 1.7 arc-seconds/pixel = 0.008242 mrad/pixel
$scale = "0.008242";
$units = "milliradians";
global_vars();
parse_form();
$galaxy = $FORM{"galaxy"};
$x1 = $FORM{'click1.x'};
$y1 = $FORM{'click1.y'};
$x2 = $FORM{'click2.x'};
$y2 = $FORM{'click2.y'};
if (!($galaxy)) {
####################################################################
#
# Set up galaxy size measurement here
#
$galaxy = $ENV{"QUERY_STRING"};
htmlhead("Galaxies: $galaxy");
print<