Index: /trunk/ippToPsps/jython/detectionbatch.py
===================================================================
--- /trunk/ippToPsps/jython/detectionbatch.py	(revision 40272)
+++ /trunk/ippToPsps/jython/detectionbatch.py	(revision 40273)
@@ -86,6 +86,4 @@
        
        
-
-
        if not self.analysisVer: self.analysisVer = -999
 
@@ -822,24 +820,24 @@
         sqlLine.group("a.ra",           "b.ra")
         sqlLine.group("a.dec",          "b.dec_")
-        sqlLine.group("a.zp",           "b.zp")
+        sqlLine.group("a.zp",           "b.zpPSF")
         sqlLine.group("a.telluricExt",  "b.telluricExt")
         sqlLine.group("a.airmass",      "b.airmass")
         sqlLine.group("a.infoFlag3",    "b.flags")
         sqlLine.group("a.expTime",      "b.expTime")
-        sqlLine.group("a.psfFlux",      "a.psfFlux     * b.zpFactor")
-        sqlLine.group("a.psfFluxErr",   "a.psfFluxErr  * b.zpFactor")
-        sqlLine.group("a.apFlux",       "a.apFlux      * b.zpFactor")
-        sqlLine.group("a.apFluxErr",    "a.apFluxErr   * b.zpFactor")
-        sqlLine.group("a.kronFlux",     "a.kronFlux    * b.zpFactor")
-        sqlLine.group("a.kronFluxErr",  "a.kronFluxErr * b.zpFactor")
-        sqlLine.group("a.sky",          "a.sky         * b.zpFactor")
-        sqlLine.group("a.skyErr",       "a.skyErr      * b.zpFactor")
+        sqlLine.group("a.psfFlux",      "a.psfFlux     * b.zpFactorPSF")
+        sqlLine.group("a.psfFluxErr",   "a.psfFluxErr  * b.zpFactorPSF")
+        sqlLine.group("a.apFlux",       "a.apFlux      * b.zpFactorAPER")
+        sqlLine.group("a.apFluxErr",    "a.apFluxErr   * b.zpFactorAPER")
+        sqlLine.group("a.kronFlux",     "a.kronFlux    * b.zpFactorAPER")
+        sqlLine.group("a.kronFluxErr",  "a.kronFluxErr * b.zpFactorAPER")
+        sqlLine.group("a.sky",          "a.sky         * b.zpFactorAPER")
+        sqlLine.group("a.skyErr",       "a.skyErr      * b.zpFactorAPER")
 
         sql = sqlLine.makeEquals("WHERE a.ippDetectID = b.ippDetectID AND b.imageID = " + str(imageID))
 
-        ## a.psfFlux      = a.psfFlux * 3630.78 * POW(10.0, -0.4*b.zp), \
+        ## a.psfFlux      = a.psfFlux * 3630.78 * POW(10.0, -0.4*b.zpPSF), \
 
         # instrumental flux vs Janskies:
-        # b.ZP is defined to include the airmass term and zero point offset from relative calibration or ubercal
+        # b.zpPSF is defined to include the airmass term and zero point offset from relative calibration or ubercal
         # (see dvopsps/src/insert_detections_dvopsps_catalog.c:311
         # mag_AB = -2.5*log(flux_DN/sec) + ZP
