Index: trunk/ippToPsps/jython/detectionbatch.py
===================================================================
--- trunk/ippToPsps/jython/detectionbatch.py	(revision 38956)
+++ trunk/ippToPsps/jython/detectionbatch.py	(revision 38958)
@@ -46,14 +46,14 @@
 
        super(DetectionBatch, self).__init__(
-               logger,
-               config,
-               skychunk,
-               gpc1Db,
-               ippToPspsDb,
-               scratchDb,
-               camID,
-               batchID,
-               "P2", 
-               gpc1Db.getCameraStageSmf(camID,skychunk.P2_smf_version))
+           logger,
+           config,
+           skychunk,
+           gpc1Db,
+           ippToPspsDb,
+           scratchDb,
+           camID,
+           batchID,
+           "P2", 
+           gpc1Db.getCameraStageSmf(camID,skychunk.P2_smf_version))
 
        # get camera meta data
@@ -109,17 +109,13 @@
            self.logger.errorPair("Could not get", "FILTERID")
            raise
-       
+           
        # MJD-OBS is the exposure start, EXTIME / 172800 = (EXPTIME sec / 84600 sec/day) / 2
        self.obsTime = float(self.header['MJD-OBS']) + (float(self.header['EXPTIME']) / 172800.0)
-    
+       
        ## MEH md5sum options test 
-       self.md5sum = None
        self.md5sum = self.fits.getMd5sum()
-       #self.md5sum = self.fits.getMd5sumShell()
-       #self.md5sum = self.fits.getMd5sumFile()
-  
+       
        # set up some defauts
        self.totalNumPhotoRef = 0
-
 
        self.filter = self.header['FILTERID'][0:1]
@@ -198,4 +194,5 @@
         self.scratchDb.updateFilterID("FrameMeta", self.filter)
         self.scratchDb.updateAllRows("FrameMeta", "processingVersion", str(self.skychunk.processingVersion))
+        return True
 
     '''
@@ -344,15 +341,23 @@
         self.scratchDb.execute(sql)
 
+        print "---- inserted ImageMeta into mysql"
+
         self.scratchDb.updateRecalStats(tableName, header['IMAGEID'], str(pltscale));
         self.scratchDb.updateFilterID(tableName, self.filter)
         self.scratchDb.updateAllRows(tableName, "processingVersion", str(self.skychunk.processingVersion))
 
+        print "---- updated things"
+
         if 'NASTRO' in header: self.totalNumPhotoRef = self.totalNumPhotoRef + int(header['NASTRO'])
         self.scratchDb.replaceNullsInThisColumn(tableName, "polyOrder", "0")
 
+        print "---- completed ImageMeta"
+        return True
+
     '''
     Populates the ImageDetEffMeta table for this OTA
     '''
     def populateImageDetEffMetaTablePart1(self, ota, header):
+        print "---- *** populate ImageDetEffMetaTablePart1"
         ippTableName = ota + "_deteff"
         tableName = "ImageDetEffMeta_" + ota
@@ -384,4 +389,5 @@
 
         # for loop
+        return True
 
     '''
@@ -389,8 +395,10 @@
     '''
     def populateImageDetEffMetaTablePart2(self, ota):
+        print "---- *** populate ImageDetEffMetaTablePart2"
+
         ippTableName = ota + "_deteff"
         tableName = "ImageDetEffMeta_" + ota
 
-              # ok, this is a bit tricky - Ideally I just want this all in one table, however, the way the table is layed out is 90 degrees from how I want it.
+        # ok, this is a bit tricky - Ideally I just want this all in one table, however, the way the table is layed out is 90 degrees from how I want it.
         # the steps out of this mess are as follows:
         # give an index to XYxy_deteff (already done, called table_index)
@@ -424,4 +432,5 @@
                           self.logger.errorPair('failed sql: ', sql)
                           raise
+        return True
                
 
@@ -552,4 +561,5 @@
         # we don't delete these anymore
         results['NULLINSTFLUX'] = 0;
+        return True
 
     '''
@@ -580,4 +590,6 @@
 
         self.scratchDb.updateAllRows(tableName, "processingVersion", str(self.skychunk.processingVersion))
+        return True
+
     '''
     Populates the SkinnyObject table for this OTA
@@ -607,4 +619,5 @@
 
         self.scratchDb.updateAllRows(tableName, "processingVersion", str(self.skychunk.processingVersion))
+        return True
 
     '''
@@ -641,4 +654,5 @@
             
         # populate ImageMeta
+        # XXX EAM 20151024 : 
         if not self.populateImageMetaTable(chipname, header):
             self.logger.infoPair("skipping chip: ", chipname)
@@ -647,4 +661,5 @@
         self.updateImageID("ImageMeta_" + chipname, x, y) 
 
+        # XXX EAM 20151024 : problem is here?
         self.populateImageDetEffMetaTablePart1(chipname, header)
         self.updateImageID("ImageDetEffMeta_" + chipname, x, y)
@@ -693,5 +708,4 @@
         return True
 
-
     '''
     Applies indexes to the IPP tables
@@ -722,4 +736,6 @@
 
         self.logger.infoPair("created indexes on", "IPP tables")      
+        return True
+
 
     '''
@@ -771,4 +787,5 @@
 
         self.scratchDb.execute(sql)
+        return True
 
     '''
@@ -786,4 +803,5 @@
             self.logger.errorPair('failed sql',sql)
             raise
+        return True
         
     '''
@@ -1004,4 +1022,5 @@
 
         print "duplicates found: ", str(Nduplicates)
+        return True
 
     '''
@@ -1012,4 +1031,5 @@
         sql = "UPDATE " + tableName + " SET imageID = %d%d%d" % (self.expID, x, y) 
         self.scratchDb.execute(sql)
+        return True
 
     '''
@@ -1022,5 +1042,5 @@
             if table.name == "FrameMeta": self.scratchDb.reportNulls(table.name, showPartials)
             else: self.scratchDb.reportNulls(table.name + "_XY33", showPartials)
-
+        return True
 
     '''
