IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38826 for trunk


Ignore:
Timestamp:
Oct 9, 2015, 2:24:24 PM (11 years ago)
Author:
watersc1
Message:

Added detectionThreshold change from completMag, although the zeropoint is probably not correct.

File:
1 edited

Legend:

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

    r38816 r38826  
    238238        photoCalID = str(self.scratchDb.getPhotoCalID(stackID))
    239239
     240        # Convert detectionThreshold to appropriate magnitudes
     241        detectionThreshold = self.getKeyFloat(header, "%.8f", 'DETEFF.MAGREF')
     242        expTime = self.getKeyFloat(header, "%.8f", 'EXPTIME')
     243        zp      = self.getKeyFloat(header, "%.8f", 'FPA.ZP')
     244        # CZW check?
     245        detectionThreshold = detectionThreshold + zp - 2.5 * math.log10(expTime)
     246       
     247       
    240248        # mysql is sensitive to values which are ambiugously float.  eg
    241249        # a warning is raised if we try to insert '25.' into a float field.
     
    258266        sqlLine.group("photoCalID",    photoCalID)
    259267        sqlLine.group("analysisVer",   str(self.analysisVer))
    260         sqlLine.group("completMag",       self.getKeyFloat(header, "%.8f", 'FLIMIT'))
     268        sqlLine.group("detectionThreshold",       detectionThreshold)
    261269        sqlLine.group("expTime",       self.getKeyFloat(header, "%.5f", 'EXPTIME')) 
    262270        sqlLine.group("psfModelID",    psfmodelID)           
Note: See TracChangeset for help on using the changeset viewer.