- Timestamp:
- Nov 8, 2011, 2:44:12 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110906
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippToPsps/jython/stackbatch.py (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110906
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20110906/ippToPsps/jython/stackbatch.py
r32192 r32630 19 19 ''' 20 20 StackBatch class 21 22 This class, a sub-class of Batch, processes single stack skycells in the form of IPP cmf files 23 21 24 ''' 22 25 class StackBatch(Batch): … … 31 34 gpc1Db, 32 35 ippToPspsDb, 33 stackID): 36 stackID, 37 batchID): 34 38 35 39 super(StackBatch, self).__init__( … … 40 44 ippToPspsDb, 41 45 stackID, 46 batchID, 42 47 "ST", 43 48 gpc1Db.getStackStageCmf(stackID)) … … 56 61 self.filter = self.filter[0:1] 57 62 self.skycell = meta[1]; 58 # TODO HACK fix this 63 64 # skycell is, eg "skycell.1133.081" 65 # we need 1133.081 for skycell, but store as an int, so instead store 1133081 66 # projection cell is just the 1133 bit 67 # this is how it should be done 68 #self.projectioncell = self.skycell[8:12] 69 #self.skycell = self.skycell[8:] 70 #self.skycell = self.skycell.replace(".", "") 71 #self.projectioncell = self.skycell[8:12] 72 73 # TODO this is the wrong way, but is consistent with SkyCell table in IN data 59 74 self.skycell = self.skycell[8:12] 60 # mangling e.g. 0683.043 into 0683043 for now until we have a schema change61 #self.skycell = self.skycell.replace(".", "") 75 self.projectioncell = self.skycell 76 62 77 self.analysisVer = meta[2]; 63 78 … … 81 96 self.scratchDb.dropTable("SkyChip_xsrc") 82 97 83 # create an output filename, which is { filterID}{skycellID}.FITS98 # create an output filename, which is {stackID}.FITS 84 99 self.outputFitsFile = "%08d.FITS" % self.id 85 100 self.outputFitsPath = "%s/%s" % (self.localOutPath, self.outputFitsFile) … … 94 109 if not self.useFullTables: 95 110 self.scratchDb.insertNewDvoExternID(self.header['SOURCEID'], self.header['IMAGEID']) 96 97 111 98 112 # dump stuff to log … … 100 114 self.logger.infoPair("Stack type", "%s" % self.stackType) 101 115 self.logger.infoPair("Skycell", "%s" % self.skycell) 116 self.logger.infoPair("Projectioncell", "%s" % self.projectioncell) 102 117 self.logger.infoPair("Filter", "%s" % self.filter) 103 104 105 118 106 119 ''' … … 251 264 ,expTime \ 252 265 ,psfModelID \ 266 ,psfFwhm_mean \ 267 ,psfFwhm_max \ 253 268 ,ctype1 \ 254 269 ,ctype2 \ … … 270 285 ," + str(self.expTime) + " \ 271 286 ,'" + self.safeDictionaryAccess(self.header, 'PSFMODEL') + "' \ 287 ,'" + self.safeDictionaryAccess(self.header, 'FWHM_MAJ') + "' \ 288 ,'" + self.safeDictionaryAccess(self.header, 'FW_MJ_UQ') + "' \ 272 289 ,'" + self.header['CTYPE1'] + "' \ 273 290 ,'" + self.header['CTYPE2'] + "' \ … … 301 318 ippDetectID \ 302 319 ,skyCellID \ 320 ,projectionCellID \ 303 321 ,obsTime \ 304 322 ,xPos \ … … 315 333 ,psfWidMinor \ 316 334 ,psfTheta \ 335 ,psfLikelihood \ 317 336 ,infoFlag \ 318 337 ,psfCf \ … … 339 358 IPP_IDET \ 340 359 ," + self.skycell + " \ 360 ," + self.projectioncell + " \ 341 361 ," + self.header['MJD-OBS'] + " \ 342 362 ,X_PSF \ … … 353 373 ,PSF_MINOR \ 354 374 ,PSF_THETA \ 375 ,psfLikelihood(EXT_NSIGMA) \ 355 376 ,FLAGS << 32 | FLAGS2 \ 356 377 ,PSF_QF \ … … 531 552 objID \ 532 553 ,ippObjID \ 554 ,projectionCellID \ 533 555 ) \ 534 556 SELECT \ 535 557 DISTINCT objID \ 536 558 ,ippObjID \ 559 ,projectionCellID \ 537 560 FROM StackDetection" 538 561 self.scratchDb.execute(sql) … … 573 596 self.scratchDb.createIndex("StackModelFit", "ippDetectID") 574 597 598 return True 599 575 600 ''' 576 601 Applies indexes to the IPP tables … … 583 608 self.scratchDb.createIndex("SkyChip_xrad", "IPP_IDET") 584 609 self.scratchDb.createIndex("SkyChip_xsrc", "IPP_IDET") 610 611 return True 585 612 586 613 '''
Note:
See TracChangeset
for help on using the changeset viewer.
