Index: trunk/ippToPsps/config/tables.ST.vot
===================================================================
--- trunk/ippToPsps/config/tables.ST.vot	(revision 39067)
+++ trunk/ippToPsps/config/tables.ST.vot	(revision 39081)
@@ -6,5 +6,9 @@
     <!-- StackMeta Table ************************************************** -->
     <TABLE name="StackMeta">
-      <DESCRIPTION>Contains the metadata describing the stacked image produced from a set of single epoch exposures.  The astrometric and photometric calibration of the stacked image are listed.</DESCRIPTION>
+      <DESCRIPTION>Contains the metadata describing the stacked image
+      produced from the combination of a set of single epoch
+      exposures.  The nature of the stack is given by the StackTypeID.
+      The astrometric and photometric calibration of the stacked image
+      are listed.</DESCRIPTION>
       <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM>              
       <FIELD name="stackImageID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
@@ -94,7 +98,4 @@
       <FIELD name="photoZero" arraysize="1" datatype="float" unit="magnitudes" default="-999">
         <DESCRIPTION>Locally derived photometric zero point for this stack.</DESCRIPTION>
-      </FIELD>
-      <FIELD name="photoColor" arraysize="1" datatype="float" unit="magnitudes" default="-999">
-        <DESCRIPTION>Locally derived photometric color term for this stack.</DESCRIPTION>
       </FIELD>
       <FIELD name="ctype1" arraysize="100" datatype="char" unit="dimensionless" default="">
@@ -170,7 +171,4 @@
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
       </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
-      </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
         <DESCRIPTION>Identifies if this row is the primary stack detection.</DESCRIPTION>
@@ -207,4 +205,7 @@
         <DESCRIPTION>Declination error from g filter stack detection.</DESCRIPTION>
       </FIELD>
+      <FIELD name="gEpoch" arraysize="1" datatype="double" unit="days" default="-999">
+        <DESCRIPTION>Modified Julian Date of the mean epoch of images contributing to the the g-band stack (equinox J2000).</DESCRIPTION>
+      </FIELD>
       <FIELD name="gPSFMag" arraysize="1" datatype="float" unit="AB magnitudes" default="-999">
         <DESCRIPTION>PSF magnitude from g filter stack detection.</DESCRIPTION>
@@ -260,4 +261,7 @@
         <DESCRIPTION>Declination error from r filter stack detection.</DESCRIPTION>
       </FIELD>
+      <FIELD name="rEpoch" arraysize="1" datatype="double" unit="days" default="-999">
+        <DESCRIPTION>Modified Julian Date of the mean epoch of images contributing to the the r-band stack (equinox J2000).</DESCRIPTION>
+      </FIELD>
       <FIELD name="rPSFMag" arraysize="1" datatype="float" unit="AB magnitudes" default="-999">
         <DESCRIPTION>PSF magnitude from r filter stack detection.</DESCRIPTION>
@@ -313,4 +317,7 @@
         <DESCRIPTION>Declination error from i filter stack detection.</DESCRIPTION>
       </FIELD>
+      <FIELD name="iEpoch" arraysize="1" datatype="double" unit="days" default="-999">
+        <DESCRIPTION>Modified Julian Date of the mean epoch of images contributing to the the i-band stack (equinox J2000).</DESCRIPTION>
+      </FIELD>
       <FIELD name="iPSFMag" arraysize="1" datatype="float" unit="AB magnitudes" default="-999">
         <DESCRIPTION>PSF magnitude from i filter stack detection.</DESCRIPTION>
@@ -366,4 +373,7 @@
         <DESCRIPTION>Declination error from z filter stack detection.</DESCRIPTION>
       </FIELD>
+      <FIELD name="zEpoch" arraysize="1" datatype="double" unit="days" default="-999">
+        <DESCRIPTION>Modified Julian Date of the mean epoch of images contributing to the the z-band stack (equinox J2000).</DESCRIPTION>
+      </FIELD>
       <FIELD name="zPSFMag" arraysize="1" datatype="float" unit="AB magnitudes" default="-999">
         <DESCRIPTION>PSF magnitude from z filter stack detection.</DESCRIPTION>
@@ -418,4 +428,7 @@
       <FIELD name="ydecErr" arraysize="1" datatype="float" unit="arcsec" default="-999">
         <DESCRIPTION>Declination error from y filter stack detection.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="yEpoch" arraysize="1" datatype="double" unit="days" default="-999">
+        <DESCRIPTION>Modified Julian Date of the mean epoch of images contributing to the the y-band stack (equinox J2000).</DESCRIPTION>
       </FIELD>
       <FIELD name="yPSFMag" arraysize="1" datatype="float" unit="AB magnitudes" default="-999">
@@ -470,7 +483,4 @@
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
       </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
-      </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
         <DESCRIPTION>Identifies if this row is the primary stack detection.</DESCRIPTION>
@@ -1021,5 +1031,5 @@
     <!-- StackApFlx Table ************************************************** -->
     <TABLE name="StackApFlx">
-      <DESCRIPTION>Contains the unconvolved fluxes within the SDSS R5 (r = 3.00 arcsec), R6 (r = 4.63 arcsec), and R7 (r = 7.43 arcsec) apertures (Stoughton 2002).  Convolved fluxes within these same apertures are also provided for convolution targets of 6 sky pixels (1.5 arcsec) and 8 sky pixels (2.0 arcsec).  All filters are matched into a single row.  See StackObjectThin table for discussion of primary, secondary, and best detections.  References: Stoughton, C., Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123, 485.</DESCRIPTION>
+      <DESCRIPTION>Contains the unconvolved fluxes within the SDSS R5 (r = 3.00 arcsec), R6 (r = 4.63 arcsec), and R7 (r = 7.43 arcsec) apertures (Stoughton 2002).  Convolved fluxes within these same apertures are also provided for images convolved to 6 sky pixels (1.5 arcsec) and 8 sky pixels (2.0 arcsec).  All filters are matched into a single row.  See StackObjectThin table for discussion of primary, secondary, and best detections.  References: Stoughton, C., Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123, 485.</DESCRIPTION>
       <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM>
       <FIELD name="objID" arraysize="1" datatype="long" unit="dimensionless"  default="NA">
@@ -1034,7 +1044,4 @@
       <FIELD name="randomStackObjID" arraysize="1" datatype="double" unit="dimensionless" default="NA">
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
-      </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
       </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
@@ -1660,7 +1667,4 @@
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
       </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
-      </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
         <DESCRIPTION>Identifies if this row is the primary stack detection.</DESCRIPTION>
@@ -1845,7 +1849,4 @@
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
       </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
-      </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
         <DESCRIPTION>Identifies if this row is the primary stack detection.</DESCRIPTION>
@@ -2126,7 +2127,4 @@
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
       </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
-      </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
         <DESCRIPTION>Identifies if this row is the primary stack detection.</DESCRIPTION>
@@ -2407,7 +2405,4 @@
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
       </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
-      </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
         <DESCRIPTION>Identifies if this row is the primary stack detection.</DESCRIPTION>
@@ -2704,5 +2699,18 @@
     <!-- StackApFlxFull Table ************************************************** -->
     <TABLE name="StackApFlxExGalUnc">
-      <DESCRIPTION>Contains the unconvolved fluxes within the SDSS R3 (r = 1.03 arcsec), R4 (r = 1.76 arcsec), R5 (r = 3.00 arcsec), R6 (r = 4.63 arcsec), R7 (r = 7.43 arcsec), R8 (r = 11.42 arcsec), R9 (r = 18.20 arcsec), R10 (r = 28.20 arcsec), and R11 (r = 44.21 arcsec) apertures (Stoughton 2002) for extended sources.  See StackObjectThin table for discussion of primary, secondary, and best detections.  References:  Stoughton, C., Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123, 485.</DESCRIPTION>
+
+      <DESCRIPTION>Contains the unconvolved fluxes within the SDSS R3
+      (r = 1.03 arcsec), R4 (r = 1.76 arcsec), R5 (r = 3.00 arcsec),
+      R6 (r = 4.63 arcsec), R7 (r = 7.43 arcsec), R8 (r = 11.42
+      arcsec), R9 (r = 18.20 arcsec), R10 (r = 28.20 arcsec), and R11
+      (r = 44.21 arcsec) apertures (Stoughton 2002) for extended
+      sources.  These measurements are only provided for objects in
+      the extragalactic sky, i.e., they are not provided for objects
+      in the Galactic plane because they are not useful in crowded
+      areas.  See StackObjectThin table for discussion of primary,
+      secondary, and best detections.  References: Stoughton, C.,
+      Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123,
+      485.</DESCRIPTION>
+
       <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM>
       <FIELD name="objID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
@@ -2717,7 +2725,4 @@
       <FIELD name="randomStackObjID" arraysize="1" datatype="double" unit="dimensionless" default="NA">
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
-      </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
       </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
@@ -3329,5 +3334,19 @@
     <!-- StackApFlxFullC6 Table ************************************************** -->
     <TABLE name="StackApFlxExGalCon6">
-      <DESCRIPTION>Contains the fluxes within the SDSS R3 (r = 1.03 arcsec), R4 (r = 1.76 arcsec), R5 (r = 3.00 arcsec), R6 (r = 4.63 arcsec), R7 (r = 7.43 arcsec), R8 (r = 11.42 arcsec), R9 (r = 18.20 arcsec), R10 (r = 28.20 arcsec), and R11 (r = 44.21 arcsec) apertures (Stoughton 2002) for extended sources after the images have been convolved to a target of 6 sky pixels (1.5 arcsec).  See StackObjectThin table for discussion of primary, secondary, and best detections.  References:  Stoughton, C., Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123, 485.</DESCRIPTION>
+
+      <DESCRIPTION>Contains the fluxes within the SDSS R3 (r = 1.03
+      arcsec), R4 (r = 1.76 arcsec), R5 (r = 3.00 arcsec), R6 (r =
+      4.63 arcsec), R7 (r = 7.43 arcsec), R8 (r = 11.42 arcsec), R9 (r
+      = 18.20 arcsec), R10 (r = 28.20 arcsec), and R11 (r = 44.21
+      arcsec) apertures (Stoughton 2002) for extended sources after
+      the images have been convolved to a target of 6 sky pixels (1.5
+      arcsec).  These measurements are only provided for objects in
+      the extragalactic sky, i.e., they are not provided for objects
+      in the Galactic plane because they are not useful in crowded
+      areas.  See StackObjectThin table for discussion of primary,
+      secondary, and best detections.  References: Stoughton, C.,
+      Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123,
+      485.</DESCRIPTION>
+
       <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM>
       <FIELD name="objID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
@@ -3342,7 +3361,4 @@
       <FIELD name="randomStackObjID" arraysize="1" datatype="double" unit="dimensionless" default="NA">
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
-      </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
       </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
@@ -3955,5 +3971,19 @@
     <!-- StackApFlxFullC8 Table ************************************************** -->
     <TABLE name="StackApFlxExGalCon8">
-      <DESCRIPTION>Contains the fluxes within the SDSS R3 (r = 1.03 arcsec), R4 (r = 1.76 arcsec), R5 (r = 3.00 arcsec), R6 (r = 4.63 arcsec), R7 (r = 7.43 arcsec), R8 (r = 11.42 arcsec), R9 (r = 18.20 arcsec), R10 (r = 28.20 arcsec), and R11 (r = 44.21 arcsec) apertures (Stoughton 2002) for extended sources after the images have been convolved to a target of 8 sky pixels (2.0 arcsec).  See StackObjectThin table for discussion of primary, secondary, and best detections.  References:  Stoughton, C., Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123, 485.</DESCRIPTION>
+
+      <DESCRIPTION>Contains the fluxes within the SDSS R3 (r = 1.03
+      arcsec), R4 (r = 1.76 arcsec), R5 (r = 3.00 arcsec), R6 (r =
+      4.63 arcsec), R7 (r = 7.43 arcsec), R8 (r = 11.42 arcsec), R9 (r
+      = 18.20 arcsec), R10 (r = 28.20 arcsec), and R11 (r = 44.21
+      arcsec) apertures (Stoughton 2002) for extended sources after
+      the images have been convolved to a target of 8 sky pixels (2.0
+      arcsec).  These measurements are only provided for objects in
+      the extragalactic sky, i.e., they are not provided for objects
+      in the Galactic plane because they are not useful in crowded
+      areas.  See StackObjectThin table for discussion of primary,
+      secondary, and best detections.  References: Stoughton, C.,
+      Lupton, R. H., Bernardi, M., et al. 2002, AJ, 123,
+      485.</DESCRIPTION>
+
       <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM>
       <FIELD name="objID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
@@ -3968,7 +3998,4 @@
       <FIELD name="randomStackObjID" arraysize="1" datatype="double" unit="dimensionless" default="NA">
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
-      </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
       </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
@@ -4595,7 +4622,4 @@
 	<DESCRIPTION>Random value drawn from the interval between zero and one.</DESCRIPTION>
       </FIELD>
-      <FIELD name="stackDetectRowID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
-	<DESCRIPTION>Identifies if this row is the primary detection, a secondary detection, and if it is the best detection.</DESCRIPTION>
-      </FIELD>
       <FIELD name="primaryDetection" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="255">
         <DESCRIPTION>Identifies if this row is the primary stack detection.</DESCRIPTION>
@@ -4844,5 +4868,10 @@
     <!-- StackDetEffMeta Table ************************************************** -->
     <TABLE name="StackDetEffMeta">
-      <DESCRIPTION>Contains the detection efficiency information for a given stacked image.  Provides the number of recovered sources out of 500 and statistics about the magnitudes of the recovered sources for a range of magnitude offsets.</DESCRIPTION>
+
+      <DESCRIPTION>Contains the detection efficiency information for a
+      given stacked image.  Provides the number of recovered sources
+      out of 500 injected sources for each magnitude bin and statistics about the magnitudes of the recovered
+      sources for a range of magnitude offsets.</DESCRIPTION>
+
       <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM>
       <FIELD name="stackImageID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
@@ -4851,4 +4880,7 @@
       <FIELD name="magref" arraysize="1" datatype="float" unit="magnitudes" default="NA">
         <DESCRIPTION>Detection efficiency reference magnitude.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="nInjected" arraysize="1" datatype="int" unit="dimensionless" default="NA">
+        <DESCRIPTION>Number of fake sources injected in each magnitude bin.</DESCRIPTION>
       </FIELD>
       <FIELD name="offset01" arraysize="1" datatype="float" unit="magnitudes" default="NA">
