IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 10, 2015, 3:09:38 PM (11 years ago)
Author:
watersc1
Message:

DetEff/ detectionThreshold/ nInjected fixes.

File:
1 edited

Legend:

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

    r39094 r39097  
    372372        sqlLine = sqlUtility("INSERT INTO " + tableName + "(")
    373373
     374        nInjected = int(self.getKeyInt(header, 0, 'DETEFF.NUM'))
     375        detectionThreshold = self.getKeyFloat(header, "%.8f", 'DETEFF.MAGREF')
     376        expTime = self.getKeyFloat(header, "%.8f", 'EXPTIME')
     377        zp      = self.getKeyFloat(header, "%.8f", 'ZPT_OBS')
     378
     379        zpImage = self.scratchDb.getImageZeroPoint(self.imageIDs[ota])
     380
     381        # XXX zp correction should come from DVO
     382        detectionThreshold = detectionThreshold + zpImage + 2.5 * math.log10(expTime)
     383
     384
    374385        sqlLine.group("frameID",          str(self.expID))
    375         sqlLine.group("magref",           self.getKeyFloat(header,"%.8f","DETEFF.MAGREF"))
     386        sqlLine.group("magref",           detectionThreshold)
     387        sqlLine.group("nInjected",        nInjected)
    376388        sql = sqlLine.make(") VALUES ( ", ")")
    377389                     
     
    10631075        ## regex only works for -stilts import
    10641076        regex = ".*"
    1065    
     1077       
    10661078        ## for a quick test, just do the first chip:
    10671079        if self.config.test and self.config.camera == "gpc1":
Note: See TracChangeset for help on using the changeset viewer.