Index: branches/eam_branches/ipp-20130419/pstamp/scripts/psmkreq
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/psmkreq	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/psmkreq	(revision 35545)
@@ -1,7 +1,8 @@
 #!/bin/env perl
 ###
-### pstamprequest
+### psmkreq
 ###
-###     Program to make a postage stamp request table for a set of coordinates
+###     Program to make a postage stamp request table for a set of coordinates using supplied command
+###     line options and defaults
 ###
 
Index: branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_checkdependent.pl
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_checkdependent.pl	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_checkdependent.pl	(revision 35545)
@@ -344,4 +344,5 @@
 }
 
+if (0) {
     my $tess_id = $metadata->{tess_id};
     if ($tess_id eq 'RINGS.V0') {
@@ -349,4 +350,5 @@
         return $PSTAMP_GONE
     }
+}
     if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or
          ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) {
Index: branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_insert_request.pl
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_insert_request.pl	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_insert_request.pl	(revision 35545)
@@ -128,6 +128,7 @@
         run(command => $command, verbose => $verbose);
     unless ($success) {
+	my $status = $error_code >> 8;
         print STDERR @$stderr_buf;
-        die("Unable to perform pstamptool -getwebrequestnum: $error_code");
+        die("Unable to perform $command: $error_code : $status");
     }
     my $webreq_num = ${$stdout_buf}[0];
Index: branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_job_run.pl	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_job_run.pl	(revision 35545)
@@ -151,4 +151,5 @@
         } elsif ($params->{cmf}) {
             $argString .= " -write_cmf";
+            $fileArgs  .= " -sources $params->{cmf}";
             push @file_list, $params->{cmf};
         } else {
Index: branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_request_file
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_request_file	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_request_file	(revision 35545)
@@ -18,4 +18,5 @@
      $output,			# Name of output table
      $req_name, 
+     $email, 
      $help
      );
@@ -25,5 +26,6 @@
 	   'output|o=s'   => \$output,
 	   'req_name|r=s' => \$req_name,
-           'help|h'         => \$help,
+	   'email=s'      => \$email,
+           'help|h'       => \$help,
 ) or pod2usage( 2 );
 
@@ -66,4 +68,6 @@
 ];
 
+my $email_column_num = 3;
+
 # Specification of columns to write
 my $columns = [ 
@@ -165,4 +169,8 @@
     $req_name = $header->[0]->{value};
 }
+if ($email) {
+    $header->[$email_column_num]->{value} = $email;
+}
+
 
 die "no request name defined" unless defined $req_name;
@@ -302,5 +310,5 @@
 
             $$r_extver = $vals[1];
-            if ($extver > 1) {
+            if ($$r_extver > 1) {
                 die "number of header columns in input $nvals does not equal expected number of header words $nhead"
                     if (@vals != @$header);
Index: branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_server_status
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_server_status	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_server_status	(revision 35545)
@@ -65,16 +65,19 @@
 
 
+    my $serverRunning = 0;
     my $command = "$pantasks_client < $pantasks_script";
     my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
-    unless ($success) {
+    if ($success) {
+        $serverRunning = 1;
+    } else {
         $error_code = (($error_code >> 8) or 1);
-        if ($error_code == 12) {
-            print "Postage Stamp Server is not running\n";
+        if ($error_code == 12 || $error_code == 13) {
+            print "Postage Stamp Server is not running\n<br>";
             #print "Postage Stamp Server will be down for maintenance it will back shortly.\n";
-            exit 0;
+#            exit 0;
         } else {
-            warn("$command failed. exit status: $error_code");
-            exit $error_code;
+            warn("\nError: $command failed. exit status: $error_code\n");
+#            exit $error_code;
         }
     }
@@ -119,10 +122,10 @@
         } else {
             print STDERR "Controller state not found";
-            exit 1;
+#            exit 1;
         }
         print "$br$br\n";
-    } else {
+    } elsif ($serverRunning) {
         print STDERR "Scheduler state not found";
-        exit 1;
+#        exit 1;
     }
 
@@ -148,6 +151,6 @@
             print "Task pstamp.job.run not found.<br />\n";
         }
-    } else {
-        print "Task pstamp.request.run not found.\n";
+    } elsif ($serverRunning) {
+        print "Task pstamp.request.run not found.<br >\n";
     }
 }
Index: branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_webrequest.pl
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_webrequest.pl	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/pstamp_webrequest.pl	(revision 35545)
@@ -71,9 +71,10 @@
 }
 
-# make a request file
+# make a request file in a sub directory of the current directory
 my $cur_dir = getcwd();
 
 #print STDERR "cur_dir is $cur_dir\n";
 
+# put file in directory for the current date
 my $datestr = strftime "%Y/%m/%d", gmtime;
 my $datedir = "$cur_dir/webreq/$datestr";
Index: branches/eam_branches/ipp-20130419/pstamp/scripts/pstampparse.pl
===================================================================
--- branches/eam_branches/ipp-20130419/pstamp/scripts/pstampparse.pl	(revision 35436)
+++ branches/eam_branches/ipp-20130419/pstamp/scripts/pstampparse.pl	(revision 35545)
@@ -360,5 +360,6 @@
 
     my $wholefile = 0;
-    if (!$skycenter && $row->{CENTER_X} == 0 && $row->{CENTER_Y} == 0) {
+    if (($row->{WIDTH} == 0 && $row->{HEIGHT} == 0) ||
+       (!$skycenter && $row->{CENTER_X} == 0 && $row->{CENTER_Y} == 0)) {
         # Secret code for returning the whole file
         $wholefile = 1;
@@ -628,23 +629,32 @@
     my $h = $row->{HEIGHT};
     my $coord_mask = $row->{COORD_MASK};
+
     my $wholeFile = 0; 
-    if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) {
-        # Center of 0, 0 in pixel coordinates is interpreted to mean
-        # return the entire file
-        if ($x == 0 && $y == 0) {
-            $roi_string = "-wholefile";
-            $wholeFile = 1;
+    # For historical reasons there are two ways to specify that the entire file be returned 
+    # rather than a postage stamp ...
+    if ($w == 0 and $h == 0) {
+        # ... The right way: width and height both zero ...
+        $wholeFile = 1;
+    } else {
+        if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) {
+            if ($x == 0 && $y == 0) {
+                # ... and pixel coordinate center of 0, 0
+                # I made this one up without thinking through the API clearly.
+                # allowing width and height to do it works much better
+                $wholeFile = 1;
+            } else {
+                $roi_string = "-pixcenter $x $y";
+            }
         } else {
-            $roi_string = "-pixcenter $x $y";
-        }
+            $roi_string = "-skycenter $x $y";
+        }
+    }
+
+    if ($wholeFile) {
+        $roi_string = "-wholefile";
+    } elsif ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
+            $roi_string .= " -pixrange $w $h";
     } else {
-        $roi_string = "-skycenter $x $y";
-    }
-    if (!$wholeFile) {
-        if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
-            $roi_string .= " -pixrange $w $h";
-        } else {
             $roi_string .= " -arcrange $w $h";
-        }
     }
 
@@ -1005,5 +1015,5 @@
     my $command = "$pstamptool -getdependent -stage $stage -stage_id $stage_id -imagedb $imagedb -component $component -outdir $outdir";
     $command .= " -need_magic" if $need_magic;
-    $command .= ' -hold' if $action eq 'PREVIEW';
+#    $command .= ' -hold' if $action eq 'PREVIEW';
 
     if ($label) {
