Index: trunk/ippToPsps/jython/detectionbatch.py
===================================================================
--- trunk/ippToPsps/jython/detectionbatch.py	(revision 38840)
+++ trunk/ippToPsps/jython/detectionbatch.py	(revision 38841)
@@ -680,14 +680,14 @@
                 if x==7 and y==7: continue
 
-                ota = "XY%d%d" % (x, y)
-                extension = ota + "_psf"
-                if extension not in self.tablesLoaded: continue
-
-                self.scratchDb.createIndex(extension, "IPP_IDET")
-
-        extension = "Chip_psf"
-        if extension in self.tablesLoaded:
-            # try the test Chip
-            self.scratchDb.createIndex(extension, "IPP_IDET")
+                cmfTable = "XY%d%d.psf" % (x, y)
+                mysTable = "XY%d%d_psf" % (x, y)
+                if cmfTable not in self.tablesLoaded: continue
+
+                self.scratchDb.createIndex(mysTable, "IPP_IDET")
+
+        cmfTable = "XY%d%d.psf" % (x, y)
+        mysTable = "XY%d%d_psf" % (x, y)
+        if cmfTable in self.tablesLoaded: 
+            self.scratchDb.createIndex(mysTable, "IPP_IDET")
 
         self.logger.infoPair("created indexes on", "IPP tables")      
@@ -860,4 +860,9 @@
     def populatePspsTables(self):
 
+        print "********** ***************"
+        for table in self.tablesLoaded:
+            print "table: " + str(table)
+        print "--------------------------"
+
         # loop through all OTAs again to update with DVO IDs
         self.skipBatch = False
@@ -882,5 +887,5 @@
 
                 ota = "XY%d%d" % (x, y)
-                extension = ota + "_psf"
+                extension = ota + ".psf"
                 if extension not in self.tablesLoaded: continue
 
@@ -893,5 +898,5 @@
 
 
-        extension = "Chip_psf"
+        extension = "Chip.psf"
         if extension in self.tablesLoaded:
             if self.populatePspsTablesChip("Chip", 0, 0, results, tables): otaCount = otaCount + 1
Index: trunk/ippToPsps/jython/stackbatch.py
===================================================================
--- trunk/ippToPsps/jython/stackbatch.py	(revision 38840)
+++ trunk/ippToPsps/jython/stackbatch.py	(revision 38841)
@@ -549,5 +549,6 @@
                 continue
 
-            cmfTable = filter + "SkyChip_xsrc"
+            cmfTable = filter + "SkyChip.xsrc"
+            mysTable = filter + "SkyChip_xsrc"
             if not cmfTable in self.tablesLoaded:
                 self.logger.infoPair("no xsrc data for filter" , filter) 
@@ -630,10 +631,11 @@
             return True
 
-        cmfTable = filter + "SkyChip_xfit"
+        cmfTable = filter + "SkyChip.xfit"
+        mysTable = filter + "SkyChip_xfit"
         if not cmfTable in self.tablesLoaded:
             self.logger.infoPair("no xfit data for filter" , filter) 
             return True
 
-        if self.scratchDb.getRowCount(cmfTable) <=0 :
+        if self.scratchDb.getRowCount(mysTable) <=0 :
             self.logger.infoPair("no extended source information, trying to skip",filter)
             return True
@@ -644,5 +646,5 @@
         magtime = "%.5f" % (2.5*math.log10(float(header['EXPTIME'])))
 
-        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, " + cmfTable + " AS b SET")
+        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, " + mysTable + " AS b SET")
 
         sqlLine.group("a."+filter+"haveData",              "'1'")
@@ -798,10 +800,11 @@
             return True
 
-        cmfTable = filter + "SkyChip_xsrc"
+        cmfTable = filter + "SkyChip.xsrc"
+        mysTable = filter + "SkyChip_xsrc"
         if not cmfTable in self.tablesLoaded:
             self.logger.infoPair("no xsrc data for filter" , filter) 
             return True
 
-        if self.scratchDb.getRowCount(cmfTable) <=0 :
+        if self.scratchDb.getRowCount(mysTable) <=0 :
             self.logger.infoPair("no extended source information, trying to skip", filter)
             return True
@@ -817,5 +820,5 @@
 
         self.logger.infoPair("Adding", "petrosians for extended sources")
-        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, " + cmfTable + " AS b SET")
+        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, " + mysTable + " AS b SET")
 
         sqlLine.group("a."+filter+"haveData",         "'1'")
@@ -951,5 +954,6 @@
 
         # set the flux values from the cmf file
-        cmfTable = filter + "SkyChip_xrad"
+        cmfTable = filter + "SkyChip.xrad"
+        mysTable = filter + "SkyChip_xrad"
 
         # skip this table if it was not loaded from the cmf
@@ -959,5 +963,5 @@
 
         # we have variable numbers of these columns. find out which are in use
-        sql = "DESCRIBE " + cmfTable + " 'aper_fill_%'"
+        sql = "DESCRIBE " + mysTable + " 'aper_fill_%'"
         rs = self.scratchDb.executeQuery(sql)
         rs.first()
@@ -983,5 +987,5 @@
 
         # generate the sql to do the necessary ops on the columns    
-        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, " + cmfTable + " AS b SET ")
+        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, " + mysTable + " AS b SET ")
 
         sqlLine.group("a."+filter+"haveData", "'1'")
@@ -1116,15 +1120,19 @@
             self.logger.infoPair("Creating indexes on", "IPP tables")
 
-            cmfTable = filter + "SkyChip_psf"
-            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(cmfTable, "IPP_IDET")
-
-            cmfTable = filter + "SkyChip_xfit"
-            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(cmfTable, "IPP_IDET")
-
-            cmfTable = filter + "SkyChip_xrad"
-            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(cmfTable, "IPP_IDET")
-
-            cmfTable = filter + "SkyChip_xsrc"
-            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(cmfTable, "IPP_IDET")
+            cmfTable = filter + "SkyChip.psf"
+            mysTable = filter + "SkyChip_psf"
+            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(mysTable, "IPP_IDET")
+
+            cmfTable = filter + "SkyChip.xfit"
+            mysTable = filter + "SkyChip_xfit"
+            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(mysTable, "IPP_IDET")
+
+            cmfTable = filter + "SkyChip.xrad"
+            mysTable = filter + "SkyChip_xrad"
+            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(mysTable, "IPP_IDET")
+
+            cmfTable = filter + "SkyChip.xsrc"
+            mysTable = filter + "SkyChip_xsrc"
+            if cmfTable in self.tablesLoaded: self.scratchDb.createIndex(mysTable, "IPP_IDET")
 
         return True
