Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt	(revision 37209)
@@ -1,58 +1,56 @@
-objID           = dvo / addstar
-gcObjID		= dvo / addstar [EAM: DROP?]
-detectID        = dvo / addstar
-ippObjID        = dvo / addstar
-ippDetectID     = dvo / addstar
-filterID        = smf / ipptopsps
-surveyID        = ipptopsps
-imageID         = smf header
-randomDetID     = ipptopsps
-dvoRegionID     = dvo / catID [EAM: add to dvopsps]
-obsTime         = smf
-xPos            = smf
-yPos            = smf
-xPosErr         = smf [EAM: modify errors to match relastro?]
-yPosErr         = smf
-pltScale        = smf
-posAngle        = smf
-----------------= 
-ra              = dvo / relastro
-dec             = dvo / relastro
-raErr           = dvo / relastro
-decErr          = dvo / relastro
-zp              = dvo / relphot
-telluricExt     = zp - zpNominal (dvopsps) [EAM: add to dvopsps]
-expTime         = smf
-airMass         = smf
-----------------= 
-psfFlux         = smf [OK: ipptopsps uses PSF_FLUX]
-psfFluxErr      = smf
-psfMajorFWHM    = smf [PSF_MAJOR is Sxx parameter, NOT FWHM] [EAM: add PSF_FWHM_MAJ to smf, keep PSF_MAJOR]
-psfMinorFWHM    = smf [PSF_MINOR is Sxx parameter, NOT FWHM] [EAM: add PSF_FWHM_MIN to smf, keep PSF_MINOR]
-psfTheta        = smf
-psfCore         = smf [EAM: add PSF_CORE to smf]
-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 : keep as MOMENTS_RH or calculate?]
-momentM3C       = smf
-momentM3S       = smf
-momentM4C       = smf
-momentM4S       = smf
-apFlux          = smf [requires PS1_V4]
-apFluxErr       = smf [requires PS1_V4]
-apFillF         = smf [EAM: add to pmSource and smf]
-kronFlux        = smf
-kronFluxErr     = smf
-kronRad         = (2.5*R1) : Ken : drop this or MOMENTS_R1?
-kronRadErr      = [not calculated] : drop this
-sky             = smf
-skyErr          = smf
-infoFlag        = smf
-infoFlag2       = smf
-dataRelease     = ippToPsps
+objID           + dvo = average.extID [calculated in addstar]
+detectID        + dvo = measure.extID [calculated in addstar]
+ippObjID        + dvo = average.objID + (average.catID << 32) [NOTE: this is a change in definition]
+ippDetectID     + smf:IPP_IDET
+filterID        + ipptopsps : internal, lookup from filter (grizy)
+surveyID        + ipptopsps : internal, from survey name
+imageID         - ipptopsps : expID x y (*** is this right???) (smf:IMAGEID / gpc1.chipRun.chip_image_id)_
+randomDetID     + ipptopsps : RANDOM from sql
+dvoRegionID     - dvo / catID [EAM: add to dvopsps]
+obsTime         - smf:MJD-OBS + 0.5 EXPTIME / 84600
+xPos            + smf:X_PSF 
+yPos            + smf:Y_PSF
+xPosErr         + smf:X_PSF_SIG
+yPosErr         + smf:Y_PSF_SIG
+pltScale        + smf:PLTSCALE (negative -> sky parity)
+posAngle        + smf:POSANGLE
+---------------
+ra              = dvo:measure.ra
+dec             = dvo:measure.dec
+raErr           = smf:X_PSF_SIG * abs(PLTSCALE)
+decErr          = smf:Y_PSF_SIG * abs(PLTSCALE)
+zp              = dvo / dvopsps : zp
+telluricExt     = dvo / dvopsps : zp - zpNominal (dvopsps)
+expTime         = dvo:measure.dt [converted to seconds]
+airMass         = dvo:measure.airmass
+---------------
+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:psfLikelihood(EXT_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: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:SKY / exptime
+skyErr          = smf:SKY_SIGMA / exptime
+infoFlag        = smf:FLAGS
+infoFlag2       = smf:FLAGS2 | (dvo.measure.flags << 13)
+dataRelease     = ippToPsps : user input (skychunk.dataRelease)
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitDeV.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitDeV.txt	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitDeV.txt	(revision 37209)
@@ -16,5 +16,5 @@
 gDeVMag          + cmf : EXT_INST_MAG + 2.5log(exptime) + dvo.zp
 gDeVMagErr       + cmf : EXT_INST_MAG_SIG ** seems kind of small in CMF
-gDeVAb           - cmf : EXT_WIDTH_MAJ/EXT_WIDTH_MIN ** should this be Minor / Major?
+gDeVAb           + cmf : EXT_WIDTH_MAJ/EXT_WIDTH_MIN ** should this be Minor / Major?
 gDeVAbErr        - cmf : EXT_WIDTH_MIN_ERR
 gDeVPhi          + cmf : EXT_THETA
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitExp.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitExp.txt	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitExp.txt	(revision 37209)
@@ -16,5 +16,5 @@
 gExpMag          + cmf : EXT_INST_MAG + 2.5log(exptime) + dvo.zp
 gExpMagErr       + cmf : EXT_INST_MAG_SIG ** seems kind of small in CMF
-gExpAb           - cmf : EXT_WIDTH_MIN/EXT_WIDTH_MAJ
+gExpAb           + cmf : EXT_WIDTH_MIN/EXT_WIDTH_MAJ
 gExpAbErr        - cmf : EXT_WIDTH_MIN_ERR
 gExpPhi          + cmf : EXT_THETA ** in radians, not degrees (fixed, check)
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitSer.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitSer.txt	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackModelFitSer.txt	(revision 37209)
@@ -19,5 +19,5 @@
 gSerAbErr        - cmf : EXT_WIDTH_MIN_ERR
 gSerNu           + cmf : EXT_PAR_07
-gSerPhiErr       + cmf : 0.1 ** NOTE this is hard-wired
+gSerNuErr        - cmf : 0.1 ** NOTE this is hard-wired
 gSerPhi          - cmf : EXT_THETA ** in radians, not degrees
 gSerPhiErr       - cmf : EXT_THETA_ERR
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin.txt	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin.txt	(revision 37209)
@@ -9,5 +9,5 @@
 skycellID          + smf : parse SKYCELL (skycell.NNN or skycell.MMMM.NNN)
 randomStackObjID   + ipptopsps (RANDOM on sql into mysql)
-stackDetectRowID   * set by PSPS
+stackDetectRowID   - set by PSPS
 primaryDetection   - dvo * NOT YET TESTED
 bestDetection      - dvo * THIS CANNOT BE SET UNTIL LATER (after PV3 initial ingest to psps)
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/schema18.notes.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/schema18.notes.txt	(revision 37209)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/schema18.notes.txt	(revision 37209)
@@ -0,0 +1,103 @@
+
+This document describes the new PSPS schema (18.0) and identifies existing problems.
+
+Stacks
+
+Measurements related to the stacks are now split into 11 separate
+tables depending on the measurements and, in some cases, the Galactic
+latitude.  The granularity of the split is partly mandated by the
+inability of PSPS or its ingest system to handle excessively wide
+tables.  Note that in all of the tables below, a single row represents
+the set of measurements from all 5 filters (grizy) for the aparition
+of an astronomical object in a single skycell.  The primaryDetection
+flag is set to identify the row which comes from the primary skycell
+for that location on the sky.  
+
+Several of the tables are meant to be filled only for the Galactic cap
+regions.  As of 2014.08.09, ippToPsps is not setting this limit.
+These tables are:
+
+    StackModelFitDeV   
+    StackModelFitExp   
+    StackModelFitSer   
+    StackModelFitExtra 
+    StackApFlxFull     
+    StackApFlxFullC1   
+    StackApFlxFullC2   
+    StackPetrosian     
+
+Other general concerns:
+
+* various size-related fields are reported in pixels not arcseconds.
+
+* I need to double-check the reported zero point and telluric
+  extinction values.
+
+* almost no 
+
+The tables are divided as follows:
+
+StackObjectThin : basic properties of the stack object detection.
+  * stackDetectRowID : this field will be set by PSPS and cannot be
+    		       tested in the ippToPsps code
+  * bestDetection    : this field cannot be set until the entire PSPS is
+    		       populated.  this will be deferred until the end of
+		       the ingest.
+  * primaryDetection : NOT YET TESTED
+  * xinfoFlag2 	     : currently only includes bits from
+    		       dvo:measure.dbflags but not dvo:secfilt.flags
+
+* NOTE : stackDetectRowID, bestDetection, primaryDetection are
+  inherited by the following tables from StackObjectThin, so the issue
+  above are present in all Stack tables
+
+StackObjectRaw : raw measurement values from the PSF fits
+  * xpsfLikelihood   : some values seem to be negative, which should
+    		       not be allowed
+
+StackModelFitExtra : extra properties derived from extended source
+		     fits.  NOTE: this table is not being generated
+
+StackModelFitExp : Exponential model fit parameters
+ * xExpRadiusErr : EXT_WIDTH_MAJ_SIG is not being set in the CMF file
+ * xExpAbErr     : EXT_WIDTH_MIN_SIG is not being set in the CMF file
+ * xExpPhiErr    : not set in CMF
+ * xExpRa,Dec    : this position is currently an approximate based on
+   		   X_EXT, X_PSF and the plate scale
+ * xExpRa,DecErr : circularly symmetric approximation based on S/N
+ * xExpCf	 : not calculated in psphot
+ * xExpChisq	 : the fit chisq is provided, not the likelihood
+
+StackModelFitDeV : DeVaucouleur model fit parameters
+ * NOTE same issues as for Exp
+
+StackModelFitSer : Sersic model fit parameters
+ * NOTE same issues as for Exp, also:
+ * xSerNuErr     : value is hard-wired at 0.1, and not well-measured
+   		   in CMF
+
+StackApFlx : flux measured in radial apertures (only 3 radii; raw and
+	     both convolutions)
+
+ * standard deviation fields (eg, gflxR3Std) are measured in psphot as
+   the standard deviation across the full object.  Should this perhaps
+   be a measurement of the standard deviation after the radial profile
+   is subtracted?
+
+StackApFlxFull : flux measured in radial apertures (raw, all radii)
+
+ * see note above on Standard Deviation
+ * radius 10 is not measured or reported in the CMF
+
+StackApFlxFullC1 : flux measured in radial apertures (first convolution, all radii)
+
+ * see note above on Standard Deviation
+ * radius 10 is not measured or reported in the CMF
+
+StackApFlxFullC2 : flux measured in radial apertures (second convolution, all radii)
+
+ * see note above on Standard Deviation
+ * radius 10 is not measured or reported in the CMF
+
+StackPetrosian : petrosian analysis data
+ * xpetCf  : fill factor is mis-calculated in psphot (consistently > 1.0)
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/FrameMeta
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/FrameMeta	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/FrameMeta	(revision 37209)
@@ -1,49 +1,49 @@
-frameID	dimensionless	INT	4	NA	unique exposure/frame identifier.
-frameName	dimensionless	VARCHAR(32)	32	NA	frame name provided by camera software
-surveyID	dimensionless	TINYINT	1	NA	survey flag identifier
-filterID	dimensionless	TINYINT	1	NA	filter identifier
-cameraID	dimensionless	SMALLINT	2	NA	camera identifier
-cameraConfigID	dimensionless	SMALLINT	2	NA	camera configuration identifier
-telescopeID	dimensionless	SMALLINT	2	NA	telescope identifier
-analysisVer	alphanumeric	VARCHAR(MAX)	8000		IPP software analysis release
-p1Recip	alphanumeric	VARCHAR(MAX)	8000		IPP phase 1 MD5 Checksum
-p2Recip	alphanumeric	VARCHAR(MAX)	8000		IPP phase 2 MD5 Checksum
-p3Recip	alphanumeric	VARCHAR(MAX)	8000		IPP phase 3 MD5 Checksum
-nOTA	alphanumeric	SMALLINT	2	-999	number of valid OTA/CCD images in this exposure
-photoScat	magnitude	REAL	4	-999	global photometric scatter
-numPhotoRef	dimensionless	INT	4	-999	number of photometric reference sources
-expStart	days	FLOAT	8	-999	exposure start time in MJD
-expTime	seconds	REAL	4	-999	exposure time
-airmass	dimensionless	REAL	4	-999	airmass at mid-exposure
-raBore	degrees	FLOAT	8	-999	RA of telescope boresight
-decBore	degrees	FLOAT	8	-999	DEC of telescope boresight
-ctype1	alphanumeric	VARCHAR(MAX)	8000		name of astrometric projection in RA
-ctype2		VARCHAR(MAX)	8000		name of astrometric projection in DEC
-crval1	degrees	FLOAT	8	-999	RA corresponding to reference pixel
-crval2	degrees	FLOAT	8	-999	DEC corresponding to reference pixel
-crpix1	pc001001	FLOAT	8	-999	reference pixel value for RA
-crpix2	dimensionless	FLOAT	8	-999	reference pixel value for DEC
-cdelt1	degrees/pixel	FLOAT	8	-999	scale factor for RA
-cdelt2	degrees/pixel	FLOAT	8	-999	scale factor for DEC
-pc001001	dimensionless	FLOAT	8	-999	elements of rotation/Dcale matrix
-pc001002	dimensionless	FLOAT	8	-999	elements of rotation/Dcale matrix
-pc002001	dimensionless	FLOAT	8	-999	elements of rotation/Dcale matrix
-pc002002	dimensionless	FLOAT	8	-999	elements of rotation/Dcale matrix
-polyOrder	dimensionless	TINYINT	1	255	polynomial order of astrometry fit
-pca1x3y0	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca1x2y1	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca1x1y2	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca1x0y3	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca1x2y0	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca1x1y1	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca1x0y2	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca2x3y0	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca2x2y1	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca2x1y2	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca2x0y3	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca2x2y0	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca2x1y1	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-pca2x0y2	dimensionless	FLOAT	8	-999	polynomial coefficients for the astrometric fit
-calibModNum	dimensionless	SMALLINT	2	NA	calibration modification number
-batchID 	dimensionless	BIGINT	8	NA	batch ID 
-dataRelease	dimensionless	TINYINT	1	NA	Data release Version of this table
+frameID         dimensionless   INT             4       NA      unique exposure/frame identifier.
+frameName       dimensionless   VARCHAR(32)     32      NA      frame name provided by camera software
+surveyID        dimensionless   TINYINT         1       NA      survey flag identifier
+filterID        dimensionless   TINYINT         1       NA      filter identifier
+cameraID        dimensionless   SMALLINT        2       NA      camera identifier
+cameraConfigID  dimensionless   SMALLINT        2       NA      camera configuration identifier
+telescopeID     dimensionless   SMALLINT        2       NA      telescope identifier
+analysisVer     alphanumeric    VARCHAR(MAX)    8000    NA      IPP software analysis release
+p1Recip         alphanumeric    VARCHAR(MAX)    8000    NA      IPP phase 1 MD5 Checksum
+p2Recip         alphanumeric    VARCHAR(MAX)    8000    NA      IPP phase 2 MD5 Checksum
+p3Recip         alphanumeric    VARCHAR(MAX)    8000    NA      IPP phase 3 MD5 Checksum
+nOTA            alphanumeric    SMALLINT        2       -999    number of valid OTA/CCD images in this exposure
+photoScat       magnitude       REAL            4       -999    global photometric scatter
+numPhotoRef     dimensionless   INT             4       -999    number of photometric reference sources
+expStart        days            FLOAT           8       -999    exposure start time in MJD
+expTime         seconds         REAL            4       -999    exposure time
+airmass         dimensionless   REAL            4       -999    airmass at mid-exposure
+raBore          degrees         FLOAT           8       -999    RA of telescope boresight
+decBore         degrees         FLOAT           8       -999    DEC of telescope boresight
+ctype1          alphanumeric    VARCHAR(MAX)    8000    NA      name of astrometric projection in RA
+ctype2          alphanumeric    VARCHAR(MAX)    8000    NA      name of astrometric projection in DEC
+crval1          degrees         FLOAT           8       -999    RA corresponding to reference pixel
+crval2          degrees         FLOAT           8       -999    DEC corresponding to reference pixel
+crpix1          dimensionless   FLOAT           8       -999    reference pixel value for RA
+crpix2          dimensionless   FLOAT           8       -999    reference pixel value for DEC
+cdelt1          degrees/pixel   FLOAT           8       -999    scale factor for RA
+cdelt2          degrees/pixel   FLOAT           8       -999    scale factor for DEC
+pc001001        dimensionless   FLOAT           8       -999    elements of rotation/Dcale matrix
+pc001002        dimensionless   FLOAT           8       -999    elements of rotation/Dcale matrix
+pc002001        dimensionless   FLOAT           8       -999    elements of rotation/Dcale matrix
+pc002002        dimensionless   FLOAT           8       -999    elements of rotation/Dcale matrix
+polyOrder       dimensionless   TINYINT         1       255     polynomial order of astrometry fit
+pca1x3y0        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca1x2y1        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca1x1y2        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca1x0y3        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca1x2y0        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca1x1y1        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca1x0y2        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca2x3y0        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca2x2y1        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca2x1y2        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca2x0y3        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca2x2y0        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca2x1y1        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+pca2x0y2        dimensionless   FLOAT           8       -999    polynomial coefficients for the astrometric fit
+calibModNum     dimensionless   SMALLINT        2       NA      calibration modification number
+batchID         dimensionless   BIGINT          8       NA      batch ID 
+dataRelease     dimensionless   TINYINT         1       NA      Data release Version of this table
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/FrameMeta.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/FrameMeta.txt	(revision 37209)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/FrameMeta.txt	(revision 37209)
@@ -0,0 +1,50 @@
+frameID         | ipptopsps : gpc1.rawExp.exp_id
+frameName       | ipptopsps : gpc1.rawExp.exp_name
+surveyID        | ipptopsps : internal, from survey name
+filterID        | ipptopsps : internal, lookup from filter (grizy)
+cameraID        | ipptopsps : hardwired to 1 ***
+cameraConfigID  | ipptopsps : hardwired to 1 ***
+telescopeID     | ipptopsps : hardwired to 1 ***
+analysisVer     | ipptopsps : gpc1.camRun.software_ver
+p1Recip         | * NOT SET
+p2Recip         | * NOT SET
+p3Recip         | * NOT SET
+nOTA            | ipptopsps : count of OTAs
+photoScat       | cmf: ZPT_ERR
+numPhotoRef     | sum(cmf:NASTRO)
+expStart        | cmf:MJD-OBS
+expTime         | cmf:EXPREQ
+airmass         | cmf:AIRMASS
+raBore          | cmf:RA
+decBore         | cmf:DEC
+ctype1          | cmf:CTYPE1
+ctype2          | cmf:CTYPE2
+crval1          | cmf:CRVAL1  
+crval2          | cmf:CRVAL2  
+crpix1          | cmf:CRPIX1  
+crpix2          | cmf:CRPIX2  
+cdelt1          | cmf:CDELT1  
+cdelt2          | cmf:CDELT2  
+pc001001        | cmf:PC001001
+pc001002        | cmf:PC001002
+pc002001        | cmf:PC002001
+pc002002        | cmf:PC002002
+polyOrder       | cmf:NPLYTERM        
+pca1x3y0        | cmf:PCA1X3Y0
+pca1x2y1        | cmf:PCA1X2Y1
+pca1x1y2        | cmf:PCA1X1Y2
+pca1x0y3        | cmf:PCA1X0Y3
+pca1x2y0        | cmf:PCA1X2Y0
+pca1x1y1        | cmf:PCA1X1Y1
+pca1x0y2        | cmf:PCA1X0Y2
+pca2x3y0        | cmf:PCA2X3Y0
+pca2x2y1        | cmf:PCA2X2Y1
+pca2x1y2        | cmf:PCA2X1Y2
+pca2x0y3        | cmf:PCA2X0Y3
+pca2x2y0        | cmf:PCA2X2Y0
+pca2x1y1        | cmf:PCA2X1Y1
+pca2x0y2        | cmf:PCA2X0Y2
+calibModNum     | ipptopsps: hardwired to 0 ***
+batchID         | ipptopsps: internal
+dataRelease     | ipptopsps: user input (skychunk.dataRelease)
+
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/ImageMeta
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/ImageMeta	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/ImageMeta	(revision 37209)
@@ -22,15 +22,12 @@
 psfWidMinor	arcsec		REAL	4	-999	model PSF parameters at chip center
 psfTheta	degrees		REAL	4	-999	model PSF parameters at chip center
-momentXX        pixels  	REAL    4       -999    moment XX
-momentXY        pixels  	REAL    4       -999    moment XY
-momentYY        pixels  	REAL    4       -999    moment YY
-momentM3C       pixels squared  REAL    4       -999    moment M3C
-momentM3S       pixels squared  REAL    4       -999    moment M3S
-momentM4C       pixels squared  REAL    4       -999    moment M4C
-momentM4S       pixels squared  REAL    4       -999    moment M4S
-momentR1        pixels  	REAL    4       -999    moment R1
-momentRH        sqrt pixels     REAL    4       -999    moment RH
-apResid		magnitide	REAL	4	-999	corrected aperture residual
-dapResid	magnitide	REAL	4	-999	scatter of aperture corrections
+momentMajor     pixels  	REAL    4       -999    momentMajor
+momentMinor     pixels  	REAL    4       -999    momentMinor
+momentM2C       pixels squared 	REAL    4       -999    momentM2C  
+momentM2S       pixels squared  REAL    4       -999    momentM2S  
+momentM3        pixels squared  REAL    4       -999    momentM3   
+momentM4        pixels squared  REAL    4       -999    momentM4   
+apResid		magnitude	REAL	4	-999	corrected aperture residual
+dapResid	magnitude	REAL	4	-999	scatter of aperture corrections
 detectorID	alphanumeric	VARCHAR(32)	32		identifier for actual CCD chip
 qaFlags		dimensionless	BIGINT	8	-999	Q/A flags for this OTA
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/ImageMeta.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/ImageMeta.txt	(revision 37209)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/ImageMeta.txt	(revision 37209)
@@ -0,0 +1,71 @@
+imageID      | 	ipptopsps : expID x y (*** is this right???) (smf:IMAGEID / gpc1.chipRun.chip_image_id)_
+frameID	     | 	ipptopsps : gpc1.rawExp.exp_id
+ccdID	     | 	ipptopsps : from XYnn
+photoCalID   |  dvo:photcode (from photcode table)
+filterID     | 	ipptopsps : internal, lookup from filter (grizy)
+bias	     | 	gpc1.rawExp.bg *** WRONG!
+biasScat     | 	gpc1.rawExp.bg_stdev *** WRONG!
+sky	     | 	MSKY_MN
+skyScat	     | 	MSKY_SIG
+nDetect	     | 	ipptopsps : rows(Detection table)
+magSat	     | 	FSATUR
+completMag   | 	FLIMIT
+astroScat    | 	CERROR
+photoScat    | 	ZPT_OBS ** wrong
+numAstroRef  | 	NASTRO
+numPhotoRef  | 	NASTRO
+nx	     |  CNAXIS1	
+ny	     |  CNAXIS2	
+psfModelID   | 	** NOT SET
+psfFwhm	     | 	0.5*(FWHM_MAJ + FWHM_MIN)
+psfWidMajor  | 	FWHM_MAJ
+psfWidMinor  | 	FWHM_MIN
+psfTheta     | 	ANGLE
+momentMajor  |  IQ_FW1
+momentMinor  |  IQ_FW1
+momentM2C    |  IQ_M2C
+momentM2S    |  IQ_M2S
+momentM3     |  IQ_M3
+momentM4     |  IQ_M4
+apResid	     | 	APMIFIT
+dapResid     | 	DAPMIFIT
+detectorID   | 	DETECTOR
+qaFlags	     | 	dvo:image.flags
+detrend1     | 	DETREND.MASK
+detrend2     | 	DETREND.DARK
+detrend3     | 	DETREND.FLAT
+detrend4     | 	** NOT SET
+detrend5     | 	** NOT SET
+detrend6     | 	** NOT SET
+detrend7     | 	** NOT SET
+detrend8     | 	** NOT SET
+photoZero    | 	ZPT_OBS
+ctype1	     | 	CTYPE1
+ctype2	     | 	CTYPE2
+crval1	     | 	CRVAL1')
+crval2	     | 	CRVAL2')
+crpix1	     | 	CRPIX1')
+crpix2	     | 	CRPIX2')
+cdelt1	     | 	CDELT1')
+cdelt2	     | 	CDELT2')
+pc001001     | 	PC001001
+pc001002     | 	PC001002
+pc002001     | 	PC002001
+pc002002     | 	PC002002
+polyOrder    | 	NPLYTERM
+pca1x2y0     | 	PCA1X2Y0
+pca1x1y1     | 	PCA1X1Y1
+pca1x0y2     | 	PCA1X0Y2
+pca2x2y0     | 	PCA2X2Y0
+pca2x1y1     | 	PCA2X1Y1
+pca2x0y2     | 	PCA2X0Y2
+pca1x3y0     | 	PCA1X3Y0
+pca1x2y1     | 	PCA1X2Y1
+pca1x1y2     | 	PCA1X1Y2
+pca1x0y3     | 	PCA1X0Y3
+pca2x3y0     | 	PCA2X3Y0
+pca2x2y1     | 	PCA2X2Y1
+pca2x1y2     | 	PCA2X1Y2
+pca2x0y3     | 	PCA2X0Y3
+calibModNum  | 	ipptopsps: hardwired to 0 ***
+dataRelease  | 	ipptopsps: user input (skychunk.dataRelease)
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/StackMeta
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/StackMeta	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/StackMeta	(revision 37209)
@@ -2,5 +2,5 @@
 batchID      dimensionless   BIGINT   8 NA batch identifier
 surveyID     dimensionless   TINYINT  1 NA survey flag identifier
-filterID     dimensionless   TINYINT  1 NA fnilutemr eidriecnatl ifidier
+filterID     dimensionless   TINYINT  1 NA filter number identifier
 stackTypeID  dimensionless   TINYINT  1 0 stack type identifier
 tessID       dimensionless   TINYINT  1       -1      ID mapping to tessellation names (eg, RINGS.V3, MD01.V3, etc)
Index: /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/StackMeta.txt
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/StackMeta.txt	(revision 37208)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/pspsschema/SchemaNew18.0/PSPS_TABLES/MetaData_Tables/StackMeta.txt	(revision 37209)
@@ -2,5 +2,5 @@
 batchID       | ipptopsps : internal
 surveyID      | ipptopsps : internal, from survey name
-filterID      | ipptopsps : internal, lookup from filter (griz)
+filterID      | ipptopsps : internal, lookup from filter (grizy)
 stackTypeID   | ipptopsps : internal, *** hard-wired name ***
 tessID        | smf : TESS_ID (table mapping)
