Index: trunk/ippTasks/detrend.reject.pro
===================================================================
--- trunk/ippTasks/detrend.reject.pro	(revision 12126)
+++ 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
 
