Index: trunk/ippToPsps/jython/detectionbatch.py
===================================================================
--- trunk/ippToPsps/jython/detectionbatch.py	(revision 38837)
+++ trunk/ippToPsps/jython/detectionbatch.py	(revision 38839)
@@ -653,19 +653,7 @@
                     
                     ota = "XY%d%d" % (x, y)
-                    if ota not in self.imageIDs: continue
-                
-                    # I need better control over this..
-                    if False and self.config.test and not ((x == 0) and (y == 1)):
-                        print "skipping ota: " + ota
-                        continue
-                        
                     self.alterPspsTablesChip(ota, ota + ".hdr", x, y)
 
-        if self.config.camera == "simtest":
-            # try the test Chip
-            self.alterPspsTablesChip("Chip", "Chip.hdr", 0, 0)
-
-        # now run DVO code to get all IDs ( XXX deprecated, uses dvograbber)
-        # if not self.getIDsFromDVO(): return False
+        self.alterPspsTablesChip("Chip", "Chip.hdr", 0, 0)
 
         # dec is reserved in MySQL, so STILTS replaces if with dec_, which is not the name of 
@@ -693,11 +681,13 @@
 
                 ota = "XY%d%d" % (x, y)
-                if ota not in self.imageIDs: continue
-
                 extension = ota + "_psf"
+                if extension not in self.tablesLoaded: continue
+
                 self.scratchDb.createIndex(extension, "IPP_IDET")
 
-        # try the test Chip
-        self.scratchDb.createIndex("Chip_psf", "IPP_IDET")
+        extension = "Chip_psf"
+        if extension in self.tablesLoaded:
+            # try the test Chip
+            self.scratchDb.createIndex(extension, "IPP_IDET")
 
         self.logger.infoPair("created indexes on", "IPP tables")      
@@ -892,9 +882,6 @@
 
                 ota = "XY%d%d" % (x, y)
-                if ota not in self.imageIDs: continue
-
-                if False and self.config.test and not ((x == 0) and (y == 1)):
-                    print "skipping ota " + ota
-                    continue
+                extension = ota + "_psf"
+                if extension not in self.tablesLoaded: continue
 
                 if self.populatePspsTablesChip(ota, x, y, results, tables): otaCount = otaCount + 1
@@ -906,5 +893,6 @@
 
 
-        if "Chip" in self.imageIDs:
+        extension = "Chip_psf"
+        if extension in self.tablesLoaded:
             if self.populatePspsTablesChip("Chip", 0, 0, results, tables): otaCount = otaCount + 1
             if self.skipBatch: 
