Index: trunk/ippTasks/camera.pro
===================================================================
--- trunk/ippTasks/camera.pro	(revision 12361)
+++ trunk/ippTasks/camera.pro	(revision 12368)
@@ -132,5 +132,9 @@
 
     # output log from filerule
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$EXP_ID
     $logfile = $outroot/cam.log
@@ -144,7 +148,7 @@
     # create the command line
     if ($VERBOSE > 1)
-      echo command camera_exp.pl --exp_id $EXP_ID --cam_id $CAM_ID --camera $CAMERA $ARGS
+      echo command camera_exp.pl --exp_id $EXP_ID --cam_id $CAM_ID --camera $CAMERA --workdir $outroot $ARGS
     end
-    command camera_exp.pl --exp_id $EXP_ID --cam_id $CAM_ID --camera $CAMERA $ARGS
+    command camera_exp.pl --exp_id $EXP_ID --cam_id $CAM_ID --camera $CAMERA --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/chip.pro
===================================================================
--- trunk/ippTasks/chip.pro	(revision 12361)
+++ trunk/ippTasks/chip.pro	(revision 12368)
@@ -135,5 +135,9 @@
 
     ## generate output log based on filerule
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$EXP_ID
     $logfile = $outroot/chip.$CLASS_ID.log
@@ -147,7 +151,7 @@
     # create the command line
     if ($VERBOSE > 1)
-      echo command chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA $ARGS
+      echo command chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA --workdir $outroot $ARGS
     end
-    command chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA $ARGS
+    command chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/detrend.norm.pro
===================================================================
--- trunk/ippTasks/detrend.norm.pro	(revision 12361)
+++ trunk/ippTasks/detrend.norm.pro	(revision 12368)
@@ -164,7 +164,9 @@
     end
 
-    # XXX add $WORKDIR/$LOG_DIR
-    # XXX use ipp_filename.pl to lookup output file names
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
     $logfile = $outroot/norm.$DET_ID.$ITERATION.log
@@ -178,7 +180,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE $ARGS
-    end
-    command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE $ARGS
+      echo command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --workdir $outroot $ARGS
+    end
+    command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --workdir $outroot $ARGS
   end
 
@@ -280,5 +282,9 @@
 
     # XXX use ipp_filename.pl to lookup output file names
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
     $logfile = $outroot/norm.$DET_ID.$ITERATION.$CLASS_ID.log
@@ -292,7 +298,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE $ARGS
-    end
-    command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE $ARGS
+      echo command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
+    end
+    command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
   end
 
@@ -391,5 +397,9 @@
 
     # XXX add $WORKDIR/$LOG_DIR
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
     $logfile = $outroot/norm.$DET_ID.$ITERATION.log
@@ -403,7 +413,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE $ARGS
-    end
-    command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE $ARGS
+      echo command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
+    end
+    command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/detrend.process.pro
===================================================================
--- trunk/ippTasks/detrend.process.pro	(revision 12361)
+++ trunk/ippTasks/detrend.process.pro	(revision 12368)
@@ -154,5 +154,9 @@
 
     ## output log filename
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$EXP_TAG
     $logfile = $outroot/detproc.$DET_ID.$CLASS_ID.log
@@ -166,7 +170,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS
-    end
-    command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS
+      echo command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA --workdir $outroot $ARGS
+    end
+    command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class_id $CLASS_ID --input_uri $URI --camera $CAMERA --workdir $outroot $ARGS
   end
 
@@ -267,5 +271,9 @@
 
     # XXX push this into the filerules?
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$EXP_TAG
     $logfile = $outroot/detproc.$DET_ID.$ITERATION.log
@@ -279,7 +287,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA $ARGS
-    end
-    command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA $ARGS
+      echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA --workdir $outroot $ARGS
+    end
+    command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/detrend.reject.pro
===================================================================
--- trunk/ippTasks/detrend.reject.pro	(revision 12361)
+++ trunk/ippTasks/detrend.reject.pro	(revision 12368)
@@ -133,6 +133,9 @@
     end
 
-    # I'd like to add CAMERA to the log file...
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
     $logfile = $outroot/reject.$DET_ID.$ITERATION.log
@@ -146,7 +149,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA $ARGS
+      echo command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA --workdir $outroot $ARGS
     end
-    command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA $ARGS
+    command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA --workdir $outroot $ARGS
  end
 
Index: trunk/ippTasks/detrend.resid.pro
===================================================================
--- trunk/ippTasks/detrend.resid.pro	(revision 12361)
+++ trunk/ippTasks/detrend.resid.pro	(revision 12368)
@@ -154,5 +154,9 @@
 
     # XXX use ipp_filename.pl to lookup output file names
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$EXP_TAG
     $logfile = $outroot/detresid.$DET_ID.$ITERATION.$CLASS_ID.log
@@ -166,7 +170,7 @@
     # create command
     if ($VERBOSE > 1)
-      echo command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE $ARGS
-    end
-    command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE $ARGS
+      echo command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --workdir $outroot $ARGS
+    end
+    command detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --workdir $outroot $ARGS
   end
 
@@ -268,5 +272,9 @@
 
     # XXX use ipp_filename.pl to lookup output file names
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$EXP_TAG
     $logfile = $outroot/detresid.$DET_ID.$ITERATION.log
@@ -280,7 +288,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA $ARGS
-    end
-    command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA $ARGS
+      echo command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --workdir $outroot $ARGS
+    end
+    command detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/detrend.stack.pro
===================================================================
--- trunk/ippTasks/detrend.stack.pro	(revision 12361)
+++ trunk/ippTasks/detrend.stack.pro	(revision 12368)
@@ -134,7 +134,9 @@
     end
 
-    # XXX add $WORKDIR/$LOG_DIR
-    # XXX use ipp_filename.pl to lookup output file names
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/$CAMERA.$DET_TYPE.$DET_ID
     $logfile = $outroot/detstack.$DET_ID.$ITERATION.$CLASS_ID.log
@@ -148,7 +150,7 @@
     # create the command line
     if ($VERBOSE > 1)
-      echo command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA $ARGS
+      echo command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --workdir $outroot $ARGS
     end
-    command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA $ARGS
+    command detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/diff.pro
===================================================================
--- trunk/ippTasks/diff.pro	(revision 12361)
+++ trunk/ippTasks/diff.pro	(revision 12368)
@@ -141,5 +141,9 @@
 
     ## generate output log based on filerule
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/diff$DIFF_ID
     $logfile = $outroot/skycell.log
@@ -153,7 +157,7 @@
     # create the command line
     if ($VERBOSE > 1)
-      echo command diff_skycell.pl --diff_id $DIFF_ID --workdir $WORKDIR $ARGS
+      echo command diff_skycell.pl --diff_id $DIFF_ID --workdir $outroot $ARGS
     end
-    command diff_skycell.pl --diff_id $DIFF_ID --workdir $WORKDIR $ARGS
+    command diff_skycell.pl --diff_id $DIFF_ID --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/stack.pro
===================================================================
--- trunk/ippTasks/stack.pro	(revision 12361)
+++ trunk/ippTasks/stack.pro	(revision 12368)
@@ -141,5 +141,9 @@
 
     ## generate output log based on filerule
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/stack$STACK_ID
     $logfile = $outroot/skycell.log
@@ -153,7 +157,7 @@
     # create the command line
     if ($VERBOSE > 1)
-      echo command stack_skycell.pl --stack_id $STACK_ID --workdir $WORKDIR $ARGS
+      echo command stack_skycell.pl --stack_id $STACK_ID --workdir $outroot $ARGS
     end
-    command stack_skycell.pl --stack_id $STACK_ID --workdir $WORKDIR $ARGS
+    command stack_skycell.pl --stack_id $STACK_ID --workdir $outroot $ARGS
   end
 
Index: trunk/ippTasks/warp.pro
===================================================================
--- trunk/ippTasks/warp.pro	(revision 12361)
+++ trunk/ippTasks/warp.pro	(revision 12368)
@@ -158,5 +158,9 @@
 
     ## generate output log based on filerule
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/warp$WARP_ID
     $logfile = $outroot/overlap.log
@@ -170,7 +174,7 @@
     # create the command line
     if ($VERBOSE > 1)
-      echo command warp_overlap.pl --warp_id $WARP_ID --camera $CAMERA --workdir $WORKDIR $ARGS
-    end
-    command warp_overlap.pl --warp_id $WARP_ID --camera $CAMERA --workdir $WORKDIR $ARGS
+      echo command warp_overlap.pl --warp_id $WARP_ID --camera $CAMERA --workdir $outroot $ARGS
+    end
+    command warp_overlap.pl --warp_id $WARP_ID --camera $CAMERA --workdir $outroot $ARGS
   end
 
@@ -272,5 +276,9 @@
 
     ## generate output log based on filerule
-    $outroot = `ipp_datapath.pl $WORKDIR`
+    if ($WORKDIR == NULL)
+      $outroot = `pwd`
+    else
+      $outroot = `ipp_datapath.pl $WORKDIR`
+    end
     $outroot = $outroot/warp$WARP_ID
     $logfile = $outroot/skycell.log
@@ -284,7 +292,7 @@
     # create the command line
     if ($VERBOSE > 1)
-      echo command warp_skycell.pl --warp_id $WARP_ID --skycell_id $SKYCELL_ID --tess_id $TESS_ID --camera $CAMERA --workdir $WORKDIR $ARGS
-    end
-    command warp_skycell.pl --warp_id $WARP_ID --skycell_id $SKYCELL_ID --tess_id $TESS_ID --camera $CAMERA --workdir $WORKDIR $ARGS
+      echo command warp_skycell.pl --warp_id $WARP_ID --skycell_id $SKYCELL_ID --tess_id $TESS_ID --camera $CAMERA --workdir $outroot $ARGS
+    end
+    command warp_skycell.pl --warp_id $WARP_ID --skycell_id $SKYCELL_ID --tess_id $TESS_ID --camera $CAMERA --workdir $outroot $ARGS
   end
 
