Index: trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt
===================================================================
--- trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt	(revision 37672)
+++ trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt	(revision 37673)
@@ -1,2 +1,3 @@
+
 objID           + dvo = average.extID [calculated in addstar]
 uniquePspsP2id + ipptopsps : combination of batch_id, ota, and counter
@@ -35,5 +36,5 @@
 psfQfPerfect    + smf:PSF_QF_PERFECT
 psfChiSq        + smf:PSF_CHISQ
-psfLikelihood   + smf:psfLikelihood(EXT_NSIGMA)
+psfLikelihood   + smf:EXT_NSIGMA
 momentXX        + smf:MOMENTS_XX
 momentXY        + smf:MOMENTS_XY
Index: trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedMeanObject.txt
===================================================================
--- trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedMeanObject.txt	(revision 37672)
+++ trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedMeanObject.txt	(revision 37673)
@@ -1,5 +1,5 @@
 		 
 objID            = cpt.extID
-uniquePspsFOid  = ipptopsps
+uniquePspsFOid   = ipptopsps
 ippObjID         = cpt.objID | cpt.catID << 32
 nDetections      = sql sum of cps.NCODE (xnTotal)
@@ -8,19 +8,19 @@
 gStackID         = ipptopsps / gpc1 db
 gnTotal          = cps.NWARP
-gnIncPSFMag      = cps.nused_wrp
-gnIncKronMag     = cps.nused_kron_wrp 
-gnIncApMag       = cps.nused_ap_wrp
+gnIncPSFFlux     = cps.NUSED_WRP
+gnIncKronFlux    = cps.NUSED_KRON_WRP 
+gnIncApFlux      = cps.NUSED_AP_WRP
 gnIncR5          = cpy.NMEAS 
 gnIncR6          = cpy.NMEAS 
 ---------------- = 
-gPSFMag          = cps.MAG_PSF_WRP
-gPSFMagErr       = cps.MAG_PSF_WRP_ERR
-gPSFMagStd       = cps.MAG_PSF_WRP_STD
-gKronMag         = cps.MAG_KRON_WRP
-gKronMagErr      = cps.MAG_KRON_WRP_ERR
-gKronMagStd      = cps.MAG_KRON_WRP_STD
-gApMag           = cps.MAG_AP_WRP
-gApMagErr        = cps.MAG_AP_WRP_ERR
-gApMagStd        = cps.MAG_AP_WRP_STD
+gPSFFlux         = cps.FLUX_PSF_WRP
+gPSFFluxErr      = cps.FLUX_PSF_WRP_ERR
+gPSFFluxStd      = cps.FLUX_PSF_WRP_STD
+gKronFlux        = cps.FLUX_KRON_WRP
+gKronFluxErr     = cps.FLUX_KRON_WRP_ERR
+gKronFluxStd     = cps.FLUX_KRON_WRP_STD
+gApFlux          = cps.FLUX_AP_WRP
+gApFluxErr       = cps.FLUX_AP_WRP_ERR
+gApFluxStd       = cps.FLUX_AP_WRP_STD
 ---------------- = 
 gFmeanflxR5      = cpy.FLUX_AP_R5
@@ -61,8 +61,6 @@
 [NOTES:
 
- * PSF Mag, Kron Mag, Ap Mag stats are all 
+ * PSF Flux, Kron Flux, Ap Flux stats are all 
    calculated from values in the existing Measure table
-
-   XXX : no! we need to record fluxes, not mags
 
  * R5 & R6 ap flux values & lensing parameters need
Index: trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpExtended.txt
===================================================================
--- trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpExtended.txt	(revision 37672)
+++ trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpExtended.txt	(revision 37673)
@@ -1,8 +1,8 @@
 
-objID            = cpt.extID (???)
-uniquePspsFWid = ipptopsps 
+objID            = cpt.extID
+uniquePspsFWid   = ipptopsps 
 detectID         = cpm.extID (???)
-ippObjID         = cpx.obj_ID | cpx.cat_ID << 32
-ippDetectID      = cpx.det_ID (???)
+ippObjID         = cpt.obj_ID | cpx.cat_ID << 32
+ippDetectID      = cmf.IPP_IDET
 filterID         = ipptopsps / gpc1
 surveyID         = ipptopsps 
@@ -11,34 +11,34 @@
 skyCellID        = ipptopsps / gpc1
 dvoRegionID      = ipptopsps / gpc1
-obsTime          = smf
+obsTime          = cmf
 ---------------- = 
-lensObjSmearX11  = cpx.X11_SM_OBJ
-lensObjSmearX12  = cpx.X12_SM_OBJ
-lensObjSmearX22  = cpx.X22_SM_OBJ
-lensObjSmearE1   = cpx.E1_SM_OBJ
-lensObjSmearE2   = cpx.E2_SM_OBJ
-lensObjShearX11  = cpx.X11_SH_OBJ
-lensObjShearX12  = cpx.X12_SH_OBJ
-lensObjShearX22  = cpx.X22_SH_OBJ
-lensObjShearE1   = cpx.E1_SH_OBJ
-lensObjShearE2   = cpx.E2_SH_OBJ
-lensPSFSmearX11  = cpx.X11_SM_PSF
-lensPSFSmearX12  = cpx.X12_SM_PSF
-lensPSFSmearX22  = cpx.X22_SM_PSF
-lensPSFSmearE1   = cpx.E1_SM_PSF
-lensPSFSmearE2   = cpx.E2_SM_PSF
-lensPSFShearX11  = cpx.X11_SH_PSF
-lensPSFShearX12  = cpx.X12_SH_PSF
-lensPSFShearX22  = cpx.X22_SH_PSF
-lensPSFShearE1   = cpx.E1_SH_PSF
-lensPSFShearE2   = cpx.E2_SH_PSF
+lensObjSmearX11  = cmf.X11_SM_OBJ
+lensObjSmearX12  = cmf.X12_SM_OBJ
+lensObjSmearX22  = cmf.X22_SM_OBJ
+lensObjSmearE1   = cmf.E1_SM_OBJ
+lensObjSmearE2   = cmf.E2_SM_OBJ
+lensObjShearX11  = cmf.X11_SH_OBJ
+lensObjShearX12  = cmf.X12_SH_OBJ
+lensObjShearX22  = cmf.X22_SH_OBJ
+lensObjShearE1   = cmf.E1_SH_OBJ
+lensObjShearE2   = cmf.E2_SH_OBJ
+lensPSFSmearX11  = cmf.X11_SM_PSF
+lensPSFSmearX12  = cmf.X12_SM_PSF
+lensPSFSmearX22  = cmf.X22_SM_PSF
+lensPSFSmearE1   = cmf.E1_SM_PSF
+lensPSFSmearE2   = cmf.E2_SM_PSF
+lensPSFShearX11  = cmf.X11_SH_PSF
+lensPSFShearX12  = cmf.X12_SH_PSF
+lensPSFShearX22  = cmf.X22_SH_PSF
+lensPSFShearE1   = cmf.E1_SH_PSF
+lensPSFShearE2   = cmf.E2_SH_PSF
 ---------------- = 
-flxR5            = cpx.FLX_AP_R5
-flxR5Err         = cpx.FLX_ERR_AP_R5
-flxR5Std         = cpx.FLX_STD_AP_R5
-flxR5Fill        = cpx.FLX_FIL_AP_R5
-flxR6            = cpx.FLX_AP_R6
-flxR6Err         = cpx.FLX_ERR_AP_R6
-flxR6Std         = cpx.FLX_STD_AP_R6
-flxR6Fill        = cpx.FLX_FIL_AP_R6
+flxR5            = cmf.FLX_AP_R5
+flxR5Err         = cmf.FLX_ERR_AP_R5
+flxR5Std         = cmf.FLX_STD_AP_R5
+flxR5Fill        = cmf.FLX_FIL_AP_R5
+flxR6            = cmf.FLX_AP_R6
+flxR6Err         = cmf.FLX_ERR_AP_R6
+flxR6Std         = cmf.FLX_STD_AP_R6
+flxR6Fill        = cmf.FLX_FIL_AP_R6
 ---------------- = 
Index: trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement.txt
===================================================================
--- trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement.txt	(revision 37672)
+++ trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement.txt	(revision 37673)
@@ -3,6 +3,6 @@
 uniquePspsFWid   = ipptopsps 
 detectID         = cpm.extID (???)
-ippObjID         = cpx.obj_id | cps.cat_id << 32
-ippDetectID      = cpx.det_id (???)
+ippObjID         = cpt.obj_id | cpt.cat_id << 32
+ippDetectID      = smf:IPP_IDET
 filterID         = ipptopsps /gpc1
 surveyID         = ipptopsps
@@ -13,39 +13,39 @@
 obsTime          = smf
 ---------------- = 
-zp               = smf (???)
-telluricExt      = smf (???) (zp - zpNominal)
+zp               = dvopsps zp
+telluricExt      = dvopsps (zp - zpNominal)
 expTime          = smf
 airMass          = smf
 ---------------- = 
-psfFlux          = smf
-psfFluxErr       = smf
-psfMajorFWHM     = smf [PSF_MAJOR is Sxx parameter, NOT FWHM]
-psfMinorFWHM     = smf [PSF_MAJOR is Sxx parameter, NOT FWHM]
-psfTheta         = smf
-psfCore          = smf [XXX : not currently written out!!]
-psfQf            = smf
-psfQfPerfect     = smf
-psfChiSq         = smf
-psfLikelihood    = ipptopsps
-momentXX         = smf
-momentXY         = smf
-momentYY         = smf
-momentR1         = smf
-momentRH         = smf [XXX : MOMENTS_RH is NOT half-light radius]
-momentM3C        = smf
-momentM3S        = smf
-momentM4C        = smf
-momentM4S        = smf
+psfFlux          = smf:PSF_INST_FLUX / EXPTIME	 
+psfFluxErr       = smf:PSF_INST_FLUX_SIG / EXPTIME
+psfMajorFWHM     = smf:PSF_FWHM_MAJ
+psfMinorFWHM     = smf:PSF_FWHM_MIN
+psfTheta         = smf:PSF_THETA	    
+psfCore          = smf:PSF_CORE	    
+psfQf            = smf:PSF_QF	    
+psfQfPerfect     = smf:PSF_QF_PERFECT
+psfChiSq         = smf:PSF_CHISQ
+psfLikelihood    = smf:NEXT_NSIGMA
+momentXX         = smf:MOMENTS_XX
+momentXY         = smf:MOMENTS_XY
+momentYY         = smf:MOMENTS_YY
+momentR1         = smf:MOMENTS_R1
+momentRH         = smf:MOMENTS_RH
+momentM3C        = smf:MOMENTS_M3C
+momentM3S        = smf:MOMENTS_M3S
+momentM4C        = smf:MOMENTS_M4C
+momentM4S        = smf:MOMENTS_M4S
 		 = 
-apFlux           = smf [PS1_V4]
-apFluxErr        = smf [PS1_V4]
-apFillF          = smf [EAM: add to smf output]
-kronFlux         = smf
-kronFluxErr      = smf
-kronRad          = (2.5*R1)
-kronRadErr       = [drop : not currently calculated]
+apFlux           = smf:AP_FLUX				       
+apFluxErr        = smf:AP_FLUX_SIG			       
+apFillF          = smf:AP_NPIX / (pi * (AP_MAG_RADIUS - 0.5)^2)
+kronFlux         = smf:KRON_FLUX	    
+kronFluxErr      = smf:KRON_FLUX_ERR 
+kronRad          = smf:2.5*MOMENTS_R1
 ---------------- = 
-sky              = smf
-skyErr           = smf
-infoFlag         = smf
+sky              = smf:SKY / exptime	 
+skyErr           = smf:SKY_SIGMA / exptime
+infoFlag         = smf:FLAGS
+infoFlag2        = smf:FLAGS2 | (dvo.measure.flags << 13)
 dataRelease      = ipptopsps
