IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 24, 2014, 10:12:36 AM (12 years ago)
Author:
heather
Message:

current version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/detectionbatch.py

    r36744 r37106  
    547547
    548548        self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.skychunk.dataRelease))
     549    '''
     550    Populates the SkinnyObject table for this OTA
     551    '''
     552    def populateSkinnyObjectTable(self, ota):
     553
     554        tableName = "SkinnyObject_" + ota
     555       
     556        # drop then re-create table
     557        self.scratchDb.dropTable(tableName)
     558        sql = "CREATE TABLE " + tableName + " LIKE SkinnyObject"
     559        try: self.scratchDb.execute(sql)
     560        except: pass
     561
     562        # insert all detections into table
     563        sql = "INSERT INTO " + tableName + " ( \
     564               objID \
     565               ,ippObjID \
     566               ,surveyID \
     567               ) \
     568               SELECT \
     569               objID \
     570               ,ippObjID \
     571               ,surveyID \
     572               FROM Detection_" + ota
     573        self.scratchDb.execute(sql)
     574
     575        self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.skychunk.dataRelease))
     576
     577
    549578
    550579    '''
     
    854883       
    855884        #self.logger.info("updated imagedata")
    856        
     885        self.populateSkinnyObjectTable(chipname)
     886        self.logger.info("updated skinnyobject")
     887 
    857888        self.populateDetectionCalibTable(chipname)
    858889        #self.logger.info("updated detectioncalibtable")
     
    865896        self.logger.info("export Detection")
    866897
    867        
     898        self.tablesToExport.append("SkinnyObject_" + chipname)
     899        self.logger.info("export Skinny")
     900
     901
    868902        tables.append("Detection_" + chipname)
    869903        self.logger.info("updated detectioncalibtable")
Note: See TracChangeset for help on using the changeset viewer.