Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 25767)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 25776)
@@ -195,4 +195,6 @@
     my $mjd_max = $row->{MJD_MAX};
     my $label   = $row->{LABEL};
+    my $x       = $row->{CENTER_X};
+    my $y       = $row->{CENTER_Y};
 
     my $option_mask= $row->{OPTION_MASK};
@@ -205,5 +207,5 @@
     
     if (!$skycenter and !$search_component) {
-        print STDERR "COMPONENT must be specified for pixel coordinate ROI\n" if $verbose;
+        print STDERR "COMPONENT must be specified for pixel coordinate ROI center\n" if $verbose;
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         $num_jobs++;
@@ -213,5 +215,5 @@
     $search_component = "" if $search_component eq "all";
 
-    if (($job_type eq "stamp") and ! validROI($row)) {
+    if ((($job_type eq "stamp") or ($req_type eq "bycoord")) and ! validROI($row)) {
         print STDERR "invalid ROI for row $rownum\n" if $verbose;
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
@@ -262,23 +264,22 @@
             next;
         }
-        print STDERR "lookup bycoord is not yet implemented" if $verbose;
-        insertFakeJobForRow($row, 1, $PSTAMP_NOT_IMPLEMENTED);
-        $num_jobs++;
-        next;
-    } else {
-        # Call PS::IPP::PStamp::Job locate_images subroutine to get the images for this
-        # request specification. An array reference is returned.
-        my ($x, $y);
-
-        $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $tess_id, $search_component,
+        if ($stage eq "stack") {
+            print STDERR "lookup bycoord is not yet implemented for stage stack" if $verbose;
+            insertFakeJobForRow($row, 1, $PSTAMP_NOT_IMPLEMENTED);
+            $num_jobs++;
+            next;
+        }
+    }
+    # Call PS::IPP::PStamp::Job locate_images subroutine to get the images for this
+    # request specification. An array reference is returned.
+    $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $tess_id, $search_component,
                 $inverse, $need_magic, $x, $y, $mjd_min, $mjd_max, $filter, $label, $verbose);
 
-        if (!$imageList or !@$imageList) {
-            print STDERR "no matching images found for row $rownum\n" if $verbose;
-            # note in this case queueJobs inserts the fake job for these rows
-        }
-        $row->{need_magic} = $need_magic;
-        push @rowList, $row;
-    }
+    if (!$imageList or !@$imageList) {
+        print STDERR "no matching images found for row $rownum\n" if $verbose;
+        # note in this case queueJobs inserts the fake job for these rows
+    }
+    $row->{need_magic} = $need_magic;
+    push @rowList, $row;
 }
 
