Index: trunk/ippTasks/detrend.reject.pro
===================================================================
--- trunk/ippTasks/detrend.reject.pro	(revision 8691)
+++ trunk/ippTasks/detrend.reject.pro	(revision 9081)
@@ -13,8 +13,16 @@
 ## STATE DET_ID ITER TYPE
 
+queueinit DetrendRejectExp
+if ($?network == 0)
+  $network = 1
+end
+if ($?parallel == 0)
+  $parallel = 0
+end
+
 # select images ready for copy 
 # new entries are added to queue DetrendRejectExp
 # compare the new list with the ones already selected
-task	       dettool.assess.load
+task	       dettool.reject.load
   command      dettool -residdetrun -simple
   host         local
@@ -22,5 +30,8 @@
   periods      -poll 1
   periods      -exec 5
-  periods      -timeout 30
+  periods      -timeout 5
+
+  stdout dettool.reject.log
+  stderr dettool.reject.log
 
   # success
@@ -36,6 +47,6 @@
       $DET_ID   = $word:0
       $ITER     = $word:1
-      $TYPE     = $word:2
-      queuepush DetrendRejectExp -uniq -key 1:2 "NEW $DET_ID $ITER $TYPE"
+      $DET_TYPE = $word:2
+      queuepush DetrendRejectExp -uniq -key 1:2 "NEW $DET_ID $ITER $DET_TYPE"
     end
 
@@ -61,8 +72,8 @@
 
 # copy new images, sending job to desired host
-task	       dettool.resid.process
+task	       dettool.reject.process
   periods      -poll 0.5
   periods      -exec 1.0
-  periods      -timeout 5
+  periods      -timeout 30
 
   task.exec
@@ -84,17 +95,24 @@
     ## NOTE: the queue has the STATE prepended 
     list word -split $line
-    $DET_ID   = $word:1
-    $ITER     = $word:2
-    $TYPE     = $word:3
+    $DET_ID   = $word:0
+    $ITER     = $word:1
+    $DET_TYPE = $word:2
+
+    # I'd like to add CAMERA to the log file...
+    stdout isp.$DET_TYPE.$DET_ID.$ITER.log
+    stderr isp.$DET_TYPE.$DET_ID.$ITER.log
 
     # specify choice of remote host:
-    host anyhost
+    if ($parallel)
+      host anyhost
+    else
+      host local
+    end
 
     # create example job options as a demonstration
     options "$line"
-    # detrend_reject_exp.pl 1      0    bias
-    # detrend_reject_exp.pl DET_ID ITER TYPE
-    command detrend_reject_imfile.pl $DET_ID $ITER $TYPE
-  end
+    echo command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITER --det_type $DET_TYPE
+    command detrend_reject_exp.pl --det_id $DET_ID --iteration $ITER --det_type $DET_TYPE
+ end
 
   # success
@@ -110,5 +128,5 @@
   # operation times out?
   task.exit    timeout
-    queuepush DetrendRejectExp -replace -key 1:2 "FAIL $options:0"
+    queuepush DetrendRejectExp -replace -key 1:2 "TIMEOUT $options:0"
   end
 end
