IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 27, 2018, 3:31:55 PM (8 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/czw_branch/20170908
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20170908

  • branches/czw_branch/20170908/ippToPsps/jython/detectionbatch.py

    r39544 r40483  
    6060       meta = self.gpc1Db.getCameraStageMeta(self.id)
    6161       if not meta:
    62            self.logger.errorPair("Could not get", "camera metadata")
    63            raise
     62           self.logger.infoPair("Could not get camera metadata", "trying with no warp id")
     63           meta = self.gpc1Db.getCameraStageMetaNoWarpID(self.id)
     64           if not meta:
     65               self.logger.errorPair("Could not get camera metadata", "now what?")
     66               raise
     67       
    6468
    6569       # set a flag indicating that we have the new columns added in version 5 of the
     
    8084       self.chipID = meta[6];
    8185       self.warpID = meta[7];
    82 
     86       
     87       
    8388       if not self.analysisVer: self.analysisVer = -999
    8489
     
    815820        sqlLine.group("a.ra",           "b.ra")
    816821        sqlLine.group("a.dec",          "b.dec_")
    817         sqlLine.group("a.zp",           "b.zp")
     822        sqlLine.group("a.zp",           "b.zpPSF")
    818823        sqlLine.group("a.telluricExt",  "b.telluricExt")
    819824        sqlLine.group("a.airmass",      "b.airmass")
    820825        sqlLine.group("a.infoFlag3",    "b.flags")
    821826        sqlLine.group("a.expTime",      "b.expTime")
    822         sqlLine.group("a.psfFlux",      "a.psfFlux     * b.zpFactor")
    823         sqlLine.group("a.psfFluxErr",   "a.psfFluxErr  * b.zpFactor")
    824         sqlLine.group("a.apFlux",       "a.apFlux      * b.zpFactor")
    825         sqlLine.group("a.apFluxErr",    "a.apFluxErr   * b.zpFactor")
    826         sqlLine.group("a.kronFlux",     "a.kronFlux    * b.zpFactor")
    827         sqlLine.group("a.kronFluxErr",  "a.kronFluxErr * b.zpFactor")
    828         sqlLine.group("a.sky",          "a.sky         * b.zpFactor")
    829         sqlLine.group("a.skyErr",       "a.skyErr      * b.zpFactor")
     827        sqlLine.group("a.psfFlux",      "a.psfFlux     * b.zpFactorPSF")
     828        sqlLine.group("a.psfFluxErr",   "a.psfFluxErr  * b.zpFactorPSF")
     829        sqlLine.group("a.apFlux",       "a.apFlux      * b.zpFactorAPER")
     830        sqlLine.group("a.apFluxErr",    "a.apFluxErr   * b.zpFactorAPER")
     831        sqlLine.group("a.kronFlux",     "a.kronFlux    * b.zpFactorAPER")
     832        sqlLine.group("a.kronFluxErr",  "a.kronFluxErr * b.zpFactorAPER")
     833        sqlLine.group("a.sky",          "a.sky         * b.zpFactorAPER")
     834        sqlLine.group("a.skyErr",       "a.skyErr      * b.zpFactorAPER")
    830835
    831836        sql = sqlLine.makeEquals("WHERE a.ippDetectID = b.ippDetectID AND b.imageID = " + str(imageID))
    832837
    833         ## a.psfFlux      = a.psfFlux * 3630.78 * POW(10.0, -0.4*b.zp), \
     838        ## a.psfFlux      = a.psfFlux * 3630.78 * POW(10.0, -0.4*b.zpPSF), \
    834839
    835840        # instrumental flux vs Janskies:
    836         # b.ZP is defined to include the airmass term and zero point offset from relative calibration or ubercal
     841        # b.zpPSF is defined to include the airmass term and zero point offset from relative calibration or ubercal
    837842        # (see dvopsps/src/insert_detections_dvopsps_catalog.c:311
    838843        # mag_AB = -2.5*log(flux_DN/sec) + ZP
Note: See TracChangeset for help on using the changeset viewer.