IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40011 for trunk


Ignore:
Timestamp:
Apr 11, 2017, 3:01:23 PM (9 years ago)
Author:
heather
Message:

changes to make forcedwards correctly (not dropping things)

Location:
trunk/ippToPsps/jython
Files:
4 edited

Legend:

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

    r39764 r40011  
    698698        # P2 and DF need to use a full GPC1 exposure radius:
    699699        myBorder = self.skychunk.BORDER_GPC1
    700 
     700        self.logger.infoPair("batch type", myBatchType)
    701701        # ST and FW need to use just a skycell
    702702        if myBatchType == "ST" :
     
    704704        if myBatchType == "FW" :
    705705            myBorder = self.skychunk.BORDER_SKYCELL
     706
    706707
    707708        dR_border = myBorder / math.cos(math.radians(boxDim['DEC']))
  • trunk/ippToPsps/jython/forcedwarpbatch.py

    r39566 r40011  
    424424        # self.selectDvoObjIDs()
    425425        self.logger.infoPair("inserting dvo info: find imageID", "from externID")
    426         imageID = self.scratchDb.getImageIDFromExternID(self.warpSkyFileID[num])
     426        imageID = self.scratchDb.getImageIDFromExternIDandPhotcodeRange(self.warpSkyFileID[num],12000,12500)
     427        self.logger.infoPair("I don't like this", "it is hardwired to gpc1")
    427428        self.logger.infoPair("updating", pspsTableName)
    428429
     
    663664            if not self.populateForcedWarpMeta(num):
    664665                self.logger.infoPair ("failure for ForcedWarpMeta, skipping ", str(num))
    665                 continue
     666                #continue
     667                raise
    666668            self.tablesToExport.append(myTable)
    667669           
     
    670672            if not self.populateForcedWarpMeasurement(num):
    671673                self.logger.infoPair ("skippping ForcedWarpMeasurement", str(num))
    672                 continue
     674                #continue
     675                raise
    673676            self.tablesToExport.append(myTable)
    674677
  • trunk/ippToPsps/jython/gpc1db.py

    r39764 r40011  
    225225               SELECT DISTINCT exp_id,class_id \
    226226               FROM addRun join \
     227               addProcessedExp using(add_id) join \
    227228               fullForceInput on (fullForceInput.ff_id = addRun.stage_id and \
    228229               fullForceInput.warp_id = addRun.stage_extra1) \
     
    233234               JOIN camRun USING(cam_id)  \
    234235               JOIN chipRun USING(chip_id) \
    235                WHERE add_id = " + str(forcedWarpID) + ") AS a"
     236               WHERE addProcessedExp.fault = 0 and add_id = " + str(forcedWarpID) + ") AS a"
    236237
    237238        try:
     
    261262              JOIN addRun ON(fullForceInput.ff_id = addRun.stage_id \
    262263              AND fullForceInput.warp_id = addRun.stage_extra1) \
     264              JOIN addProcessedExp using (add_id) \
    263265              JOIN minidvodbRun USING(minidvodb_name) \
    264266              JOIN minidvodbProcessed USING(minidvodb_id)\
     
    277279              AND addRun.stage = 'fullforce' \
    278280              AND addRun.state = 'full'\
     281              AND addProcessedExp.fault = 0 \
    279282              AND stage_id = " + str(stageID)
    280283
  • trunk/ippToPsps/jython/scratchdb.py

    r39544 r40011  
    186186             
    187187        return imageID
     188
     189    '''
     190    Gets imageID from extern ID and photcoderange (needed for FW, possibly for others)
     191    '''
     192    def getImageIDFromExternIDandPhotcodeRange(self, externID, r1, r2):
     193               
     194        imageID = -1
     195               
     196        sql1 = "SELECT IMAGE_ID FROM " + self.dvoImagesTable + " WHERE EXTERN_ID = %s" % (externID)
     197        range = " AND PHOTCODE >= " + str(r1) +" AND PHOTCODE <=" + str(r2)
     198        sql = sql1 + range
     199
     200        self.logger.info(sql)
     201        try:
     202            rs = self.executeQuery(sql)   
     203            rs.first()
     204            imageID = rs.getInt(1)
     205        except:
     206            self.logger.errorPair("Unable to get imageID from dvo using", sql)
     207             
     208        return imageID
     209
     210
     211
     212
    188213
    189214    '''
Note: See TracChangeset for help on using the changeset viewer.