Changeset 35452 for trunk/ippToPsps/jython/stackbatch.py
- Timestamp:
- Apr 28, 2013, 2:57:07 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/stackbatch.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/stackbatch.py
r35417 r35452 482 482 ,X_PSF_SIG \ 483 483 ,Y_PSF_SIG \ 484 ,P OW(10.0, (-0.4*PSF_INST_MAG))/ " + str(self.expTime) + " \485 , ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + ")) / 1.085736)\484 ,PSF_INST_FLUX / " + str(self.expTime) + " \ 485 ,PSF_INST_FLUX_SIG / " + str(self.expTime) + " \ 486 486 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " + str(self.expTime) + " \ 487 487 ,SKY / " + str(self.expTime) + " \ … … 504 504 ,MOMENTS_R1 \ 505 505 ,MOMENTS_RH \ 506 , POW(10.0, -0.4*AP_MAG)/ " + str(self.expTime) + " \506 ,AP_FLUX / " + str(self.expTime) + " \ 507 507 ,NULL \ 508 508 ,KRON_FLUX / " + str(self.expTime) + " \ … … 515 515 FROM SkyChip_psf" 516 516 517 # these were used above (left over from before PSF_INST_FLUX, PSF_INST_FLUX_SIG were available? 518 # ,POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + " 519 # ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + ")) / 1.085736) 520 # ,POW(10.0, -0.4*AP_MAG) / " + str(self.expTime) + " 521 517 522 # print "sql: ", sql 518 523 # response = raw_input("ready to insert stack det ") … … 526 531 self.logger.infoPair("Deleting", "entries with StackDetection.objID = 0") 527 532 533 # XXX EAM : this seems quite inefficient : these commands use updates to set 534 # fields which are constant across all rows. Why not just include these in 535 # the original insert above? 536 528 537 self.scratchDb.updateAllRows("StackDetection", "surveyID", str(self.surveyID)) 529 538 … … 560 569 # response = raw_input("add primary key? ") 561 570 562 if self.stackType == "DEEP_STACK": 571 ### XXX this should not be a DEEP_STACK only case... 572 if false and self.stackType == "DEEP_STACK": 563 573 564 574 #if deep stack and instFlux = null and err not null … … 572 582 # response = raw_input("add psf flux ") 573 583 584 # NOTE : Flux limits : in the current PSPS schema, negative fluxes 585 # cause problems for sql queries which work in mags as SQL cannot do 586 # something like (f < 0.0) ? -999 : -2.5*log10(f) 587 # as a result, the negative fluxes here result in floating point errors 588 sql = "UPDATE StackDetection SET psfFlux = 1e20 WHERE psfFlux <= 0.0" 589 self.scratchDb.execute(sql) 590 591 sql = "UPDATE StackDetection SET apFlux = 1e20 WHERE apFlux <= 0.0" 592 self.scratchDb.execute(sql) 593 594 sql = "UPDATE StackDetection SET kronFlux = 1e20 WHERE kronFlux <= 0.0" 595 self.scratchDb.execute(sql) 596 574 597 #leave null instflux in 575 598 #self.scratchDb.reportAndDeleteRowsWithNULLS("StackDetection", "instFlux")
Note:
See TracChangeset
for help on using the changeset viewer.
