IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38810


Ignore:
Timestamp:
Oct 7, 2015, 11:34:33 AM (11 years ago)
Author:
eugene
Message:

moments set to arcsec-based units instead of pixels; definitions of M3 and M4 moments fixed

File:
1 edited

Legend:

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

    r38807 r38810  
    194194        else: ccdID = 0
    195195
    196         psfFwhmMajor = self.getKeyFloat(header, "%.8f", 'FWHM_MAJ')
    197         psfFwhmMinor = self.getKeyFloat(header, "%.8f", 'FWHM_MIN')
     196        # XXX hard-wired platescale : 0.257
     197        pltscale = 0.257
     198        pltscale2 = pltscale * pltscale
     199
     200        psfFwhmMajor = pltscale * self.getKeyFloat(header, "%.8f", 'FWHM_MAJ')
     201        psfFwhmMinor = pltscale * self.getKeyFloat(header, "%.8f", 'FWHM_MIN')
    198202        psfFwhm = 0.5*(float(psfFwhmMajor) + float(psfFwhmMinor))
    199203
     
    204208        ast_cdy = self.getKeyFloat(header, "%.8f",'AST_CDY')
    205209        astroscat = sqrt(ast_cdx^2 + ast_cdy^2)
    206                        
    207210       
    208211        # insert image metadata into table
     
    222225        sqlLine.group("numAstroRef",      self.getKeyValue(header, 'NASTRO'))
    223226        sqlLine.group("numPhotoRef",      self.getKeyValue(header, 'NASTRO'))
    224         sqlLine.group("nAxis1",               self.getKeyInt(header, 0, 'NAXIS1'))
    225         sqlLine.group("nAxis2",               self.getKeyInt(header, 0, 'NAXIS2'))
     227        sqlLine.group("nAxis1",           self.getKeyInt(header, 0, 'NAXIS1'))
     228        sqlLine.group("nAxis2",           self.getKeyInt(header, 0, 'NAXIS2'))
    226229        sqlLine.group("psfModelID"        psfmodelID)
    227230        sqlLine.group("psfFwhm",          str(psfFwhm))
     
    229232        sqlLine.group("psfWidMinor",      psfFwhmMinor)
    230233        sqlLine.group("psfTheta",         self.getKeyFloat(header, "%.8f", 'ANGLE'))
    231         sqlLine.group("momentMajor",      self.getKeyFloat(header, "%.8f", 'IQ_FW1'))
    232         sqlLine.group("momentMinor",      self.getKeyFloat(header, "%.8f", 'IQ_FW2'))
    233         sqlLine.group("momentM2C",        self.getKeyFloat(header, "%.8f", 'IQ_M2C'))
    234         sqlLine.group("momentM2S",        self.getKeyFloat(header, "%.8f", 'IQ_M2S'))
    235         sqlLine.group("momentM3",         self.getKeyFloat(header, "%.8f", 'IQ_M3'))
    236         sqlLine.group("momentM4",         self.getKeyFloat(header, "%.8f", 'IQ_M4'))
     234        sqlLine.group("momentMajor",      pltscale * self.getKeyFloat(header, "%.8f", 'IQ_FW1'))
     235        sqlLine.group("momentMinor",      pltscale * self.getKeyFloat(header, "%.8f", 'IQ_FW2'))
     236        sqlLine.group("momentM2C",        pltscale2 * self.getKeyFloat(header, "%.8f", 'IQ_M2C'))
     237        sqlLine.group("momentM2S",        pltscale2 * self.getKeyFloat(header, "%.8f", 'IQ_M2S'))
     238        sqlLine.group("momentM3",         pltscale2 * self.getKeyFloat(header, "%.8f", 'IQ_M3'))
     239        sqlLine.group("momentM4",         pltscale2 * self.getKeyFloat(header, "%.8f", 'IQ_M4'))
    237240        sqlLine.group("apResid",          self.getKeyFloat(header, "%.8f", 'APMIFIT'))
    238241        sqlLine.group("dapResid",         self.getKeyFloat(header, "%.8f", 'DAPMIFIT'))
Note: See TracChangeset for help on using the changeset viewer.