
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)
