IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39133


Ignore:
Timestamp:
Nov 13, 2015, 11:05:41 AM (11 years ago)
Author:
eugene
Message:

do not modify negative fluxes to be 1e20

File:
1 edited

Legend:

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

    r39123 r39133  
    553553        # cause problems for sql queries which work in mags as SQL cannot do
    554554        # something like (f < 0.0) ? -999 : -2.5*log10(f)
    555         # as a result, the negative fluxes here result in floating point errors
    556 
    557         # XXX EAM 20140724 : Is this still a problem?
    558         # XXX EAM 20150925 : do this after inst flux -> Jy conversion?
    559 
    560         sql = "UPDATE " + pspsTableName + " SET psfFlux = 1e20 WHERE psfFlux <= 0.0"
    561         try: self.scratchDb.execute(sql)
    562         except:
    563             self.logger.infoPair("failed sql",sql)
    564             raise
    565         sql = "UPDATE " + pspsTableName + " SET apFlux = 1e20 WHERE apFlux <= 0.0"
    566         try: self.scratchDb.execute(sql)
    567         except:
    568             self.logger.infoPair("failed sql",sql)
    569             raise
    570         sql = "UPDATE " + pspsTableName + " SET kronFlux = 1e20 WHERE kronFlux <= 0.0"
    571         try: self.scratchDb.execute(sql)
    572         except:
    573             self.logger.infoPair("failed sql",sql)
    574             raise
     555
     556        # users need to use something like mag = -2.5*log10(abs(f)) and save a flag value (f > 0 as posDetection)
     557
    575558        # we don't delete these anymore
    576559        results['NULLINSTFLUX'] = 0;
     560
    577561        return True
    578562
Note: See TracChangeset for help on using the changeset viewer.