IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 18, 2015, 9:55:43 PM (11 years ago)
Author:
heather
Message:

SAS39 final tweaks (added infoFlag3)

File:
1 edited

Legend:

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

    r38397 r38602  
    413413        sqlLine.group("ippDetectID",     "IPP_IDET")                                               
    414414#        sqlLine.group("randomDetID",     "FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)")                       
    415         sqlLine.group("randomDetID",     "(RAND("+str(self.batchID)+")")                       
     415        sqlLine.group("randomDetID",     "RAND("+str(self.batchID)+")")                       
    416416        sqlLine.group("filterID",        str(self.filterID))                                       
    417417        sqlLine.group("surveyID",        str(self.surveyID))                                       
     
    672672    '''
    673673    def updateDvoIDs(self, table, externID):
    674 
     674        self.logger.info("getting imge id")
    675675        imageID = self.scratchDb.getImageIDFromExternID(externID)
    676         self.logger.debug("Updating table '" + table + "' with DVO IDs using imageID = %d" % imageID)
     676        self.logger.info("Updating table '" + table + "' with DVO IDs using imageID = %d" % imageID)
    677677
    678678        sql = "UPDATE IGNORE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \
     
    686686               a.telluricExt  = b.telluricExt, \
    687687               a.airmass      = b.airmass, \
    688                a.expTime      = b.expTime, \
    689                a.infoFlag2    = (b.flags << 13) | a.infoFlag2 \
     688               a.infoFlag3    = b.flags, \
     689               a.expTime      = b.expTime \
    690690               WHERE a.ippDetectID = b.ippDetectID \
    691691               AND b.imageID = " + str(imageID)
    692692
    693         try: self.scratchDb.execute(sql)
    694         except:
    695             self.logger.InfoPair("failed sql",sql)
     693        print sql
     694        try: self.scratchDb.execute(sql)
     695        except:
     696            self.logger.infoPair("failed sql",sql)
    696697            raise
    697698    '''
     
    740741        #detection has a primary index, so don't add, use this one
    741742        self.scratchDb.addRowCountColumnNoKey("Detection_"+chipname, "row")
     743        self.logger.info("added row")
    742744        self.updateDvoIDs("Detection_" + chipname, self.imageIDs[chipname])
    743         #self.logger.info("updated dvoids")
     745        self.logger.info("updated dvoids")
    744746        results['NULLOBJID'] = self.scratchDb.reportAndDeleteRowsWithNULLS("Detection_" + chipname, "objID")
    745         #self.logger.info("deleted nulls")
     747        self.logger.info("deleted nulls")
    746748
    747749        ota = x*10+y
Note: See TracChangeset for help on using the changeset viewer.