IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 24, 2013, 11:38:15 AM (13 years ago)
Author:
eugene
Message:

drop ImageMeta_ tables before reading headers, or they can be left behind, only set ccdID to non-zero if chipname is like XYnn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/detectionbatch.py

    r35034 r35044  
    231231        tableName = "ImageMeta_" + ota
    232232       
     233        # XXX we drop the table above so it is not left behind on failure
    233234        # drop then re-create table
    234         self.scratchDb.dropTable(tableName)
     235        # self.scratchDb.dropTable(tableName)
    235236        sql = "CREATE TABLE " + tableName + " LIKE ImageMeta"
    236237        try: self.scratchDb.execute(sql)
    237238        except: pass
     239        if (ota[0:2] == "XY"): ccdID = ota[2:4]
     240        else: ccdID = 0
    238241
    239242        # insert image metadata into table
     
    302305               ) VALUES ( \
    303306               " + str(self.expID) + " \
    304                ," + ota[2:4] + " \
     307               ," + str(ccdID) + " \
    305308               ," + str(self.bias) + " \
    306309               ," + str(self.biasScat) + " \
     
    602605    def alterPspsTablesChip(self, chipname, extname, x, y):
    603606
     607        # drop the ImageMeta_ table first, or we can leave an invalid table behind
     608        tableName = "ImageMeta_" + chipname
     609       
     610        # drop then re-create table
     611        self.scratchDb.dropTable(tableName)
     612
    604613        # load corresponding header into memory
    605614        header = self.fits.findAndReadHeader(extname)
     
    714723    '''
    715724    def populatePspsTablesChip(self, chipname, x, y, results, tables):
     725        # XXX EAM NOTE: drop tables (Detection_, SkinnyObject_, DetectionCalib_, Detection_) here so
     726        # they do not polute the db?
     727        # XXX or put an explicit drop at the end of the loop?
     728
    716729        #self.logger.infoTitle("Processing " + chipname)
    717730        # this is a bit crude: if the chip is not present, this test will fail and the chip
Note: See TracChangeset for help on using the changeset viewer.