Index: branches/eam_branches/ipp-20130509/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- branches/eam_branches/ipp-20130509/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 35565)
+++ branches/eam_branches/ipp-20130509/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 35747)
@@ -574,6 +574,6 @@
         $command .= " -dateobs_end $dateobs_end" if $dateobs_end;
     } elsif ($req_type ne "byid") {
-        $command .= " -mjd_min $mjd_min" if $mjd_min;
-        $command .= " -mjd_max $mjd_max" if $mjd_max;
+        $command .= " -mjd_obs_begin $mjd_min" if $mjd_min;
+        $command .= " -mjd_obs_end $mjd_max" if $mjd_max;
     }
 
@@ -1025,16 +1025,16 @@
     } else {
         $using_camtool = 1;
-        my $command = "$camtool -dbname $imagedb -processedexp -pstamp_order";
-           # NOTE: we are applying the data_group to the camera run.
-           # If we're looking for chip stage images there is no guarentee that 
-           # chipRun.data_group eq camRun.data_group. In practice this is almost
-           # always the case. If this turns out to be a problem we can defer
-           # the data_group test to when we look up the chipProcessedImfiles
-           if ($data_group) {
-               $command .= " -data_group $data_group";
-           } else {
-               $command .= $default_data_groups;
-           }
-           $command .= " -destreaked" if $need_magic;
+        $command = "$camtool -dbname $imagedb -processedexp -pstamp_order";
+        # NOTE: we are applying the data_group to the camera run.
+        # If we're looking for chip stage images there is no guarentee that 
+        # chipRun.data_group eq camRun.data_group. In practice this is almost
+        # always the case. If this turns out to be a problem we can defer
+        # the data_group test to when we look up the chipProcessedImfiles
+        if ($data_group) {
+            $command .= " -data_group $data_group";
+        } else {
+            $command .= $default_data_groups;
+        }
+        $command .= " -destreaked" if $need_magic;
     }
     $command .= " -ra $ra -decl $dec -radius $search_radius";
