Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 27899)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 27914)
@@ -224,5 +224,5 @@
     my $rownum   = $row->{ROWNUM};
     if (!validID($rownum)) {
-        print STDERR "$rownum is not a valid ROWNUM\n"  if $verbose;
+        print STDERR "$rownum is not a valid ROWNUM\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
@@ -230,5 +230,5 @@
     my $job_type = $row->{JOB_TYPE};
     if (($job_type ne "stamp") and ($job_type ne "get_image")) {
-        print STDERR "$job_type is not a valid JOB_TYPE\n"  if $verbose;
+        print STDERR "$job_type is not a valid JOB_TYPE\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
@@ -238,13 +238,24 @@
     if (($req_type ne "byid") and ($req_type ne "bycoord") and ($req_type ne "byexp") and
         ($req_type ne "byskycell") and ($req_type ne "bydiff")) {
-        print STDERR "$req_type is not a valid REQ_TYPE\n"  if $verbose;
+        print STDERR "$req_type is not a valid REQ_TYPE\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
     }
+    if ($job_type eq 'get_image') {
+        unless ($req_type eq 'byid' or $req_type eq 'byexp') {
+            print STDERR "REQ_TYPE must be 'byid' or 'byexp' for JOB_TYPE 'get_image'\n";
+            insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
+            return 0;
+        }
+    }
 
 
     my $component = $row->{COMPONENT};
     if (!defined $component or (lc($component) eq "null") or (lc($component) eq "all")) {
-        $row->{COMPONENT} = $component = "";
+        if ($job_type eq 'get_image') {
+            $row->{COMPONENT} = 'all';
+        } else {
+            $row->{COMPONENT} = $component = "";
+        }
     }
     $row->{TESS_ID} = "" if !defined $row->{TESS_ID};
@@ -259,5 +270,5 @@
     my $mjd_min = $row->{MJD_MIN};
     if (defined($mjd_min) and !validNumber($mjd_min)) {
-        print STDERR "$mjd_min is not a valid MJD_MIN\n"  if $verbose;
+        print STDERR "$mjd_min is not a valid MJD_MIN\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
@@ -265,5 +276,5 @@
     my $mjd_max = $row->{MJD_MAX};
     if (defined($mjd_max) and !validNumber($mjd_max)) {
-        print STDERR "$mjd_max is not a valid MJD_MAX\n"  if $verbose;
+        print STDERR "$mjd_max is not a valid MJD_MAX\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
@@ -289,5 +300,5 @@
 
     if (!$skycenter and !$component) {
-        print STDERR "COMPONENT must be specified for pixel coordinate ROI center\n" if $verbose;
+        print STDERR "COMPONENT must be specified for pixel coordinate ROI center\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
@@ -296,5 +307,5 @@
     my $stage = $row->{IMG_TYPE};
     if (!check_image_type($stage)) {
-        print STDERR "invalid IMG_TYPE for row $rownum\n" if $verbose;
+        print STDERR "invalid IMG_TYPE for row $rownum\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
@@ -302,5 +313,5 @@
 
     if ((($job_type eq "stamp") or ($req_type eq "bycoord")) and ! validROI($row)) {
-        print STDERR "invalid ROI for row $rownum\n" if $verbose;
+        print STDERR "invalid ROI for row $rownum\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
         return 0;
@@ -308,5 +319,5 @@
 
     if (($req_type eq "byexp") and ($stage eq "stack")) {
-        print STDERR "byexp not implemented for stack stage. row: $rownum\n" if $verbose;
+        print STDERR "byexp not implemented for stack stage. row: $rownum\n";
         insertFakeJobForRow($row, 1, $PSTAMP_NOT_IMPLEMENTED);
         return 0;
@@ -320,5 +331,5 @@
     if ($req_type eq "bycoord") {
         if (!$skycenter) {
-            print STDERR "center must be specified in sky coordintes for bycoord" if $verbose;
+            print STDERR "center must be specified in sky coordintes for bycoord";
             insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
             return 0;
@@ -328,5 +339,5 @@
     if (($req_type eq "byid") or ($req_type eq "bydiff")) {
         if (!validID($row->{ID})) {
-            print STDERR "ID must be a positive integer for req_type $req_type\n" if $verbose;
+            print STDERR "ID must be a positive integer for req_type $req_type\n";
             insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
             return 0
@@ -350,5 +361,5 @@
     my $proj_hash = resolve_project($ipprc, $project, $dbname, $dbserver);
     if (!$proj_hash) {
-        print STDERR "project $project not found\n"  if $verbose;
+        print STDERR "project $project not found\n" ;
         foreach $row (@$rowList) {
             insertFakeJobForRow($row, 1, $PSTAMP_UNKNOWN_PRODUCT);
@@ -714,5 +725,5 @@
                     # cause the image to be re-made
                     # set up to queue an update run
-                    queue_update_run(\$newState, \$fault, \$dep_id, $image->{image_db}, 
+                    queue_update_run(\$newState, \$fault, \$dep_id, $image->{imagedb}, 
                         $run_state, $stage, $image->{stage_id}, $image->{component}, $need_magic);
                 }
