Index: trunk/ippMonitor/def/chipPendingExp.d
===================================================================
--- trunk/ippMonitor/def/chipPendingExp.d	(revision 18373)
+++ trunk/ippMonitor/def/chipPendingExp.d	(revision 18722)
@@ -5,5 +5,5 @@
 
 # limit this table to non-OBJECT types of images
-WHERE chipRun.state = 'run'
+WHERE chipRun.state = 'new'
 WHERE chipRun.exp_id = rawExp.exp_id
 
Index: trunk/ippMonitor/def/chipPendingImfile.d
===================================================================
--- trunk/ippMonitor/def/chipPendingImfile.d	(revision 18373)
+++ trunk/ippMonitor/def/chipPendingImfile.d	(revision 18722)
@@ -1,10 +1,15 @@
-TABLE chipRun, rawExp
+TABLE chipRun, rawExp, rawImfile
 TITLE Chip Pending Imfiles
-FILE  chipPendingExp.php
+FILE  chipPendingImfile.php
 MENU  ipp.science.dat
 
-# limit this table to non-OBJECT types of images
-WHERE chipRun.state = 'run'
+# XXX this query does not exclude imfiles already processed (unless the exp is done)
+# I need to join against chipProcessedImfile and exclude ones where chipProcessedImfile.class_id is not NULL
+
+# limit this table to OBJECT types of images
+WHERE chipRun.state = 'new'
 WHERE chipRun.exp_id = rawExp.exp_id
+WHERE rawImfile.exp_id = rawExp.exp_id
+
 
 ARGS  ARG1  exp_id=$chipRun.exp_id
@@ -16,4 +21,5 @@
 FIELD chipRun.exp_id,     	 5, %d,     Exp ID
 FIELD rawExp.exp_name,     	 5, %s,     Exp Name,    value,  rawImfile.php,  ARG1
+FIELD rawImfile.class_id,     	 5, %s,     Class ID
 FIELD chipRun.chip_id,    	 7, %d,     chip ID
 FIELD chipRun.state,    	 7, %s,     state
Index: trunk/ippMonitor/def/chipProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/chipProcessedExp.d	(revision 18373)
+++ trunk/ippMonitor/def/chipProcessedExp.d	(revision 18722)
@@ -5,5 +5,5 @@
 
 # limit this table to non-OBJECT types of images
-WHERE chipRun.state != 'run'
+WHERE chipRun.state != 'new'
 WHERE chipRun.exp_id = rawExp.exp_id
 
