IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33146


Ignore:
Timestamp:
Jan 25, 2012, 1:40:31 PM (14 years ago)
Author:
rhenders
Message:

change to the way we call method to get cmf; more fields populated, including unconvolved fluxes; change to way we encode stackDetectID

File:
1 edited

Legend:

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

    r32588 r33146  
    4646               batchID,
    4747               "ST",
    48                gpc1Db.getStackStageCmf(stackID))
     48               gpc1Db.getStackStageCmf(configDoc.find("dvo/gpc1Label").text, stackID))
    4949
    5050       if not self.everythingOK: return
     
    6060       self.filter = meta[0];
    6161       self.filter = self.filter[0:1]
     62       self.filterID = self.scratchDb.getFilterID(self.filter)
    6263       self.skycell = meta[1];
    6364
     
    442443        # TODO temporarily loading 1st convolved fluxes into unconvolved fields
    443444        self.logger.infoPair("Adding fluxes", "un-convolved")
    444         self.updateApFlxs("", "< 7.0")
     445        self.updateApFlxs("", "IS NULL")
    445446        self.logger.infoPair("Adding fluxes", "1st convolved")
    446447        self.updateApFlxs("c1", "< 7.0")
     
    458459        ,petR90=b.PETRO_RADIUS_90 \
    459460        ,petR90Err=b.PETRO_RADIUS_90_ERR \
     461        ,petCf=b.PETRO_FILL \
    460462        WHERE a.ippDetectID=b.IPP_IDET"
    461463        self.scratchDb.execute(sql)
     
    515517        rs.first()
    516518        nMissing = rs.getInt(1)
    517         self.logger.infoPair("Detections deleted from %s that are not in StackDetection" + table, "%5d" % nMissing)
    518519 
    519520        if nMissing < 1: return
     
    521522        sql = "DELETE FROM " + table + " WHERE ippDetectID NOT IN (SELECT ippDetectID FROM StackDetection)"
    522523        self.scratchDb.execute(sql)
     524        self.logger.infoPair("Detections not in StackDetection", "%d deleted from %s" % (nMissing, table))
    523525       
    524526
     
    620622        sql = "UPDATE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \
    621623               a.ippObjID = b.ippObjID, \
    622                a.stackDetectID = b.detectID, \
     624               a.stackDetectID = 10 * b.detectID + " + str(self.filterID) + ", \
    623625               a.objID = b.objID \
    624626               WHERE a.ippDetectID = b.ippDetectID \
Note: See TracChangeset for help on using the changeset viewer.