Index: trunk/ippTasks/phase0.pro
===================================================================
--- trunk/ippTasks/phase0.pro	(revision 9104)
+++ trunk/ippTasks/phase0.pro	(revision 9305)
@@ -1,8 +1,7 @@
-
 ## this file contains the tasks for running the phase 0 stage
 
 ## these tasks use the queue Phase0Imfiles
 ## the Phase0Imfiles queue contains:
-## STATE EXP_KEY CLASS CLASS_ID URI-FITS
+## STATE EXP_TAG CLASS CLASS_ID URI-FITS
 ## queue keys are counted from 0
 
@@ -41,5 +40,10 @@
     for i 0 $Nqueue
       queuepop stdout -var line
-      queuepush Phase0Imfiles -uniq -key 1 "NEW $line"
+      list word -split $line
+      $EXP_TAG  = $word:0
+      $CLASS    = $word:1
+      $CLASS_ID = $word:2
+      $URI      = $word:3
+      queuepush Phase0Imfiles -uniq -key 1 "NEW $EXP_TAG $CLASS $CLASS_ID $URI"
     end
 
@@ -80,6 +84,10 @@
 
     ## the Phase0Imfiles queue contains (line has popped STATE)
-    ## STATE EXP_KEY CLASS CLASS_ID URI-FITS
+    ## STATE EXP_TAG CLASS CLASS_ID URI-FITS
     list word -split $line
+    $EXP_TAG  = $word:0
+    $CLASS    = $word:1
+    $CLASS_ID = $word:2
+    $URI      = $word:3
 
     # specify choice of remote host:(need to choose based on chips)
@@ -91,11 +99,11 @@
 
     # do something better with this output target
-    stdout $word:0.$word:2.log
-    stderr $word:0.$word:2.log
+    stdout $EXP_TAG.$CLASS_ID.log
+    stderr $EXP_TAG.$CLASS_ID.log
 
     # create the command line
     options "$line"
-    echo command phase0imfile.pl --exp_id $word:0 --class_id $word:2 --uri $word:3
-    command phase0imfile.pl --exp_id $word:0 --class_id $word:2 --uri $word:3
+    echo command phase0_imfile.pl --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --uri $URI
+    command phase0_imfile.pl --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --uri $URI
   end
 
@@ -121,5 +129,5 @@
 ## these tasks use the queue Phase0Exposures
 ## the Phase0Exposures queue contains:
-## STATE EXP_KEY CAMERA TELESCOPE TYPE NCLASS
+## STATE EXP_TAG CAMERA TELESCOPE TYPE NCLASS
 
 # select images ready for phase0 analysis
@@ -146,5 +154,12 @@
     for i 0 $Nqueue
       queuepop stdout -var line
-      queuepush Phase0Exposures -uniq -key 1 "NEW $line"
+      list word -split $line
+      $EXP_TAG   = $word:0
+      # $EXP_ID    = $word:1
+      # $CAMERA    = $word:2
+      # $TELESCOPE = $word:3
+      # $TYPE      = $word:4
+      # $IMFILES   = $word:5
+      queuepush Phase0Exposures -uniq -key 1 "NEW $EXP_TAG"
     end
 
@@ -185,10 +200,11 @@
 
     ## the Phase0Exposures queue contains:
-    ## STATE EXP_KEY CAMERA TELESCOPE TYPE NCLASS
+    ## STATE EXP_TAG CAMERA TELESCOPE TYPE NCLASS
     list word -split $line
+    $EXP_TAG   = $word:0
 
     # do something better with this output target
-    stdout $word:0.log
-    stderr $word:0.log
+    stdout $EXP_TAG.log
+    stderr $EXP_TAG.log
 
     # specify choice of remote host:(need to choose based on chips)
@@ -201,6 +217,6 @@
     # create the command line
     options "$line"
-    echo command phase0exp.pl $word:0
-    command phase0exp.pl $word:0
+    echo command phase0_exp.pl --exp_tag $EXP_TAG
+    command phase0_exp.pl --exp_tag $EXP_TAG
   end
 
