Index: trunk/ippTasks/detrend.process.pro
===================================================================
--- trunk/ippTasks/detrend.process.pro	(revision 9104)
+++ trunk/ippTasks/detrend.process.pro	(revision 9338)
@@ -11,5 +11,5 @@
 ## these tasks use the queue DetrendProcessImfiles
 ## the DetrendProcessImfiles queue contains:
-## STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI 
+## STATE DET_ID TYPE EXP_TAG CLASS CLASS_ID URI 
 
 queueinit DetrendProcessImfiles
@@ -26,5 +26,5 @@
 # compare the new list with the ones already selected
 task	       dettool.process.load
-  command      dettool -raw -simple
+  command      dettool -toprocess -simple
   host         local
 
@@ -49,10 +49,10 @@
       list word -split $line
       $DET_ID   = $word:0
-      $TYPE     = $word:1
-      $EXP_KEY  = $word:2
+      $DET_TYPE = $word:1
+      $EXP_TAG  = $word:2
       $CLASS    = $word:3
       $CLASS_ID = $word:4
       $URI      = $word:5
-      queuepush DetrendProcessImfiles -uniq -key 1:3:5 "NEW $DET_ID $TYPE $EXP_KEY $CLASS $CLASS_ID $URI"
+      queuepush DetrendProcessImfiles -uniq -key 1:3:5 "NEW $DET_ID $DET_TYPE $EXP_TAG $CLASS $CLASS_ID $URI"
     end
 
@@ -93,16 +93,17 @@
 
     ## the DetrendProcessImfiles queue contains:
-    # STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI 
+    # STATE DET_ID TYPE EXP_TAG CLASS CLASS_ID URI 
     ## NOTE: the queue has the STATE prepended 
     list word -split $line
     $DET_ID   = $word:0
-    $TYPE     = $word:1
-    $EXP_KEY  = $word:2
+    $DET_TYPE = $word:1
+    $EXP_TAG  = $word:2
     $CLASS    = $word:3
     $CLASS_ID = $word:4
     $URI      = $word:5
 
-    stdout $EXP_KEY.detproc.$CLASS_ID.log
-    stderr $EXP_KEY.detproc.$CLASS_ID.log
+    $LOG_DIR = `dirname $URI`
+    stdout $WORKDIR/$LOG_DIR/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log
+    stderr $WORKDIR/$LOG_DIR/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log
 
     # specify choice of remote host:
@@ -115,10 +116,11 @@
     # create example job options as a demonstration
     options "$line"
-    echo command detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_KEY --class $CLASS --class_id $CLASS_ID --det_type bias --input_uri $URI
-    command detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_KEY --class $CLASS --class_id $CLASS_ID --det_type bias --input_uri $URI
+    echo command detrend_process_imfile.pl --det_id $DET_ID --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --det_type $DET_TYPE --input_uri $URI
+    command detrend_process_imfile.pl --det_id $DET_ID --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --det_type $DET_TYPE --input_uri $URI
   end
 
   # success
   task.exit 0
+    echo "success detrend_process_imfile.pl $options:0"
     queuepush DetrendProcessImfiles -replace -key 1:3:5 "DONE $options:0"
   end
@@ -126,4 +128,5 @@
   # default exit status
   task.exit    default
+    echo "failure detrend_process_imfile.pl $options:0"
     queuepush DetrendProcessImfiles -replace -key 1:3:5 "FAIL $options:0"
   end
@@ -131,4 +134,5 @@
   # operation times out?
   task.exit    timeout
+    echo "timeout detrend_process_imfile.pl $options:0"
     queuepush DetrendProcessImfiles -replace -key 1:3:5 "TIMEOUT $options:0"
   end
@@ -139,5 +143,5 @@
 # compare the new list with the ones already selected
 task	       dettool.processexp.load
-  command      dettool -toprocessdexp -simple
+  command      dettool -toprocessedexp -simple
   host         local
 
@@ -162,7 +166,8 @@
       list word -split $line
       $DET_ID   = $word:0
-      $TYPE     = $word:1
-      $EXP_KEY  = $word:2
-      queuepush DetrendProcessExposures -uniq -key 1:3 "NEW $DET_ID $TYPE $EXP_KEY"
+      $ITER     = $word:1
+      $DET_TYPE = $word:2
+      $EXP_TAG  = $word:3
+      queuepush DetrendProcessExposures -uniq -key 1:2:4 "NEW $DET_ID $ITER $DET_TYPE $EXP_TAG"
     end
 
@@ -200,16 +205,17 @@
 
     strpop line state
-    queuepush DetrendProcessExposures -replace -key 1:3:5 "RUN $line"
-
-    ## the DetrendProcessExposures queue contains:
-    # STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI 
-    ## NOTE: the queue has the STATE prepended 
+    queuepush DetrendProcessExposures -replace -key 1:2:4 "RUN $line"
+
+
     list word -split $line
     $DET_ID   = $word:0
-    $TYPE     = $word:1
-    $EXP_KEY  = $word:2
-
-    stdout $EXP_KEY.detproc.$CLASS_ID.log
-    stderr $EXP_KEY.detproc.$CLASS_ID.log
+    $ITER     = $word:1
+    $DET_TYPE = $word:2
+    $EXP_TAG  = $word:3
+
+    # XXX need the classID in dettool -toprocessedexp -simple output
+    $CLASS_ID = isp
+    stdout $EXP_TAG.detproc.$DET_ID.log
+    stderr $EXP_TAG.detproc.$DET_ID.log
 
     # specify choice of remote host:
@@ -222,21 +228,21 @@
     # create example job options as a demonstration
     options "$line"
-    echo command detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_KEY --det_type bias
-    command detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_KEY --det_type bias
+    echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG
+    command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG
   end
 
   # success
   task.exit 0
-    queuepush DetrendProcessExposures -replace -key 1:3:5 "DONE $options:0"
+    queuepush DetrendProcessExposures -replace -key 1:2:4 "DONE $options:0"
   end
 
   # default exit status
   task.exit    default
-    queuepush DetrendProcessExposures -replace -key 1:3:5 "FAIL $options:0"
-  end
-
-  # operation times out?
-  task.exit    timeout
-    queuepush DetrendProcessExposures -replace -key 1:3:5 "TIMEOUT $options:0"
-  end
-end
+    queuepush DetrendProcessExposures -replace -key 1:2:4 "FAIL $options:0"
+  end
+
+  # operation times out?
+  task.exit    timeout
+    queuepush DetrendProcessExposures -replace -key 1:2:4 "TIMEOUT $options:0"
+  end
+end
