- Timestamp:
- Jun 19, 2012, 5:24:19 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippToPsps/jython/stackbatch.py (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ippToPsps/jython/stackbatch.py
r33415 r34041 50 50 useFullTables) 51 51 52 if not self.everythingOK: return53 54 52 self.stackType = "DEEP_STACK" # TODO 55 53 … … 57 55 meta = self.gpc1Db.getStackStageMeta(self.id) 58 56 if not meta: 59 self. everythingOK = False60 r eturn57 self.logger.errorPair("Could not get stack", "metadata") 58 raise 61 59 62 60 self.filter = meta[0]; … … 80 78 self.analysisVer = meta[2]; 81 79 82 self.expTime = gpc1Db.getStackExpTime(self.id) 83 84 self.logger.debug("Got exp time of %d" % self.expTime) 80 #self.expTime = gpc1Db.getStackExpTime(self.id) 81 self.expTime = self.header['EXPTIME'] 85 82 86 83 # delete PSPS tables … … 284 281 " + str(self.id) + " \ 285 282 ," + self.skycell + " \ 286 ," + str(self.scratchDb.getPhotoCalID(self.header[' SOURCEID'], self.header['IMAGEID'])) + " \283 ," + str(self.scratchDb.getPhotoCalID(self.header['IMAGEID'])) + " \ 287 284 ," + self.header['FPA.ZP'] + " \ 288 ," + s tr(self.expTime)+ " \285 ," + self.expTime + " \ 289 286 ,'" + self.safeDictionaryAccess(self.header, 'PSFMODEL') + "' \ 290 287 ,'" + self.safeDictionaryAccess(self.header, 'FWHM_MAJ') + "' \ … … 367 364 ,X_PSF_SIG \ 368 365 ,Y_PSF_SIG \ 369 ,POW(10.0, (-0.4*PSF_INST_MAG)) / " +str(self.expTime)+" \370 ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " +str(self.expTime)+")) / 1.085736) \371 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " +str(self.expTime)+" \366 ,POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + " \ 367 ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + ")) / 1.085736) \ 368 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " + str(self.expTime) + " \ 372 369 ,SKY \ 373 370 ,SKY_SIGMA \ … … 390 387 ,AP_MAG \ 391 388 , NULL \ 392 ,KRON_FLUX \393 ,KRON_FLUX_ERR \389 ,KRON_FLUX / " + str(self.expTime) + " \ 390 ,KRON_FLUX_ERR / " + str(self.expTime) + " \ 394 391 , NULL \ 395 392 , NULL \ … … 416 413 #if deep stack and instFlux = null and err not null 417 414 sql = "UPDATE StackDetection AS a, SkyChip_psf AS b \ 418 SET instFlux = 2*b.PSF_INST_FLUX_SIG \415 SET instFlux = 2*b.PSF_INST_FLUX_SIG / " + str(self.expTime) + " \ 419 416 WHERE instFlux IS NULL \ 420 417 AND a.ippDetectID = b.IPP_IDET \ … … 501 498 self.scratchDb.updateAllRows("StackModelFit", "surveyID", str(self.surveyID)) 502 499 self.scratchDb.updateFilterID("StackModelFit", self.filter) 503 self.scratchDb.updateAllRows("StackModelFit", "dataRelease", str(self. dataRelease))500 self.scratchDb.updateAllRows("StackModelFit", "dataRelease", str(self.config.dataRelease)) 504 501 self.scratchDb.updateAllRows("StackModelFit", "primaryF", "0") 505 502 self.scratchDb.updateAllRows("StackModelFit", "activeFlag", "0") … … 566 563 567 564 self.scratchDb.updateAllRows("SkinnyObject", "surveyID", str(self.surveyID)) 568 self.scratchDb.updateAllRows("SkinnyObject", "dataRelease", str(self. dataRelease))565 self.scratchDb.updateAllRows("SkinnyObject", "dataRelease", str(self.config.dataRelease)) 569 566 570 567 ''' … … 586 583 587 584 self.scratchDb.updateFilterID("ObjectCalColor", self.filter) 588 self.scratchDb.updateAllRows("ObjectCalColor", "dataRelease", str(self. dataRelease))585 self.scratchDb.updateAllRows("ObjectCalColor", "dataRelease", str(self.config.dataRelease)) 589 586 590 587 … … 620 617 def updateDvoIDs(self, table): 621 618 622 imageID = self.scratchDb.getImageIDFromExternID(self.header[' SOURCEID'], self.header['IMAGEID'])619 imageID = self.scratchDb.getImageIDFromExternID(self.header['IMAGEID']) 623 620 self.logger.debug("Updating table '" + table + "' with DVO IDs...") 624 621 sql = "UPDATE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \ … … 627 624 a.objID = b.objID \ 628 625 WHERE a.ippDetectID = b.ippDetectID \ 629 AND b.sourceID = " + self.header['SOURCEID'] + "\630 626 AND b.imageID = " + str(imageID) 631 627 self.scratchDb.execute(sql)
Note:
See TracChangeset
for help on using the changeset viewer.
