- Timestamp:
- Apr 11, 2017, 3:01:23 PM (9 years ago)
- Location:
- trunk/ippToPsps/jython
- Files:
-
- 4 edited
-
dvo.py (modified) (2 diffs)
-
forcedwarpbatch.py (modified) (3 diffs)
-
gpc1db.py (modified) (4 diffs)
-
scratchdb.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/dvo.py
r39764 r40011 698 698 # P2 and DF need to use a full GPC1 exposure radius: 699 699 myBorder = self.skychunk.BORDER_GPC1 700 700 self.logger.infoPair("batch type", myBatchType) 701 701 # ST and FW need to use just a skycell 702 702 if myBatchType == "ST" : … … 704 704 if myBatchType == "FW" : 705 705 myBorder = self.skychunk.BORDER_SKYCELL 706 706 707 707 708 dR_border = myBorder / math.cos(math.radians(boxDim['DEC'])) -
trunk/ippToPsps/jython/forcedwarpbatch.py
r39566 r40011 424 424 # self.selectDvoObjIDs() 425 425 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") 427 428 self.logger.infoPair("updating", pspsTableName) 428 429 … … 663 664 if not self.populateForcedWarpMeta(num): 664 665 self.logger.infoPair ("failure for ForcedWarpMeta, skipping ", str(num)) 665 continue 666 #continue 667 raise 666 668 self.tablesToExport.append(myTable) 667 669 … … 670 672 if not self.populateForcedWarpMeasurement(num): 671 673 self.logger.infoPair ("skippping ForcedWarpMeasurement", str(num)) 672 continue 674 #continue 675 raise 673 676 self.tablesToExport.append(myTable) 674 677 -
trunk/ippToPsps/jython/gpc1db.py
r39764 r40011 225 225 SELECT DISTINCT exp_id,class_id \ 226 226 FROM addRun join \ 227 addProcessedExp using(add_id) join \ 227 228 fullForceInput on (fullForceInput.ff_id = addRun.stage_id and \ 228 229 fullForceInput.warp_id = addRun.stage_extra1) \ … … 233 234 JOIN camRun USING(cam_id) \ 234 235 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" 236 237 237 238 try: … … 261 262 JOIN addRun ON(fullForceInput.ff_id = addRun.stage_id \ 262 263 AND fullForceInput.warp_id = addRun.stage_extra1) \ 264 JOIN addProcessedExp using (add_id) \ 263 265 JOIN minidvodbRun USING(minidvodb_name) \ 264 266 JOIN minidvodbProcessed USING(minidvodb_id)\ … … 277 279 AND addRun.stage = 'fullforce' \ 278 280 AND addRun.state = 'full'\ 281 AND addProcessedExp.fault = 0 \ 279 282 AND stage_id = " + str(stageID) 280 283 -
trunk/ippToPsps/jython/scratchdb.py
r39544 r40011 186 186 187 187 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 188 213 189 214 '''
Note:
See TracChangeset
for help on using the changeset viewer.
