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/stackbatch.py

    r36744 r37106  
    1 #!/usr/bin/env jython
     1q#!/usr/bin/env jython
    22
    33import os.path
     
    215215       self.scratchDb.dropTable("StackObject")
    216216       self.logger.infoPair("dropping table:","StackModelFit")
    217               
     217       self.scratchDb.dropTable("SkinnyObject")
    218218       self.scratchDb.dropTable("StackModelFit")
    219219       self.logger.infoPair("dropping table:","StackApFlx")
     
    785785        self.logger.infoPair("Deleting", "entries with StackObject.objID = 0")
    786786        # response = raw_input("deleted objID is 0 ")
    787        
     787    '''
     788    Populates the SkinnyObject table
     789    '''
     790    def populateSkinnyObject(self):
     791
     792        self.logger.infoPair("Procesing table", "SkinnyObject")
     793
     794        sql = "INSERT INTO SkinnyObject (\
     795               objID \
     796               ,ippObjID \
     797               ,projectionCellID \
     798               ) \
     799               SELECT \
     800               DISTINCT objID \
     801               ,ippObjID \
     802               ,projectionCellID \
     803               FROM StackDetection"
     804        self.scratchDb.execute(sql)
     805
     806        self.scratchDb.updateAllRows("SkinnyObject", "surveyID", str(self.surveyID))
     807        self.scratchDb.updateAllRows("SkinnyObject", "dataRelease", str(self.skychunk.dataRelease))
     808         
    788809
    789810    '''
     
    13071328
    13081329        ##if self.totalDetections < 1:
     1330        #self.logger.infoPair("populating","SkinnyObject")
     1331        self.populateSkinnyObject()
    13091332
    13101333            ##self.logger.error("No detections to publish")
     
    13141337        self.tablesToExport.append("StackModelFit")
    13151338        self.tablesToExport.append("StackApFlx")
    1316 
     1339        self.tablesToExport.append("SkinnyObject")
    13171340        self.logger.infoPair("finishing","populatePspsTables");
    13181341        return True
Note: See TracChangeset for help on using the changeset viewer.