Index: trunk/ippToPsps/config/latextables/README
===================================================================
--- trunk/ippToPsps/config/latextables/README	(revision 40186)
+++ trunk/ippToPsps/config/latextables/README	(revision 40186)
@@ -0,0 +1,9 @@
+Instructions to parse/check stuff between ipptopsps and the paper
+
+copy main.tex from sharelatex here
+
+run 'perl parseipptopspsallflags.pl', this parses tables.IN.vot as well as main.tex into different txt files
+
+(ipptopsps.DetectionFlags.txt and latex.DetectionFlags.txt, for example)
+
+do diffs on the 8 different tables: are they as we expect? (note: some have funny whitespace characters i've been unable to diagnose).
Index: trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags.txt	(revision 40186)
@@ -0,0 +1,33 @@
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||PSFMODEL||0x00000001||1||Source fitted with a psf model (linear or non-linear).||
+||EXTMODEL||0x00000002||2||Source fitted with an extended-source model.||
+||FITTED||0x00000004||4||Source fitted with non-linear model (PSF or EXT; good or bad).||
+||FAIL||0x00000008||8||Fit (non-linear) failed (non-converge; off-edge; run to zero).||
+||POOR||0x00000010||16||Fit succeeds, but low-S/N, high-Chisq, or large (for PSF -- drop?).||
+||PAIR||0x00000020||32||Source fitted with a double PSF.||
+||PSFSTAR||0x00000040||64||Source used to define PSF model.||
+||SATSTAR||0x00000080||128||Source model peak is above saturation.||
+||BLEND||0x00000100||256||Source is a blend with other sources.||
+||EXTERNAL||0x00000200||512||Source based on supplied input position.||
+||BADPSF||0x00000400||1024||Failed to get good estimate of object's PSF.||
+||DEFECT||0x00000800||2048||Source is thought to be a defect.||
+||SATURATED||0x00001000||4096||Source is thought to be saturated pixels (bleed trail).||
+||CR_LIMIT||0x00002000||8192||Source has crNsigma above limit.||
+||EXT_LIMIT||0x00004000||16384||Source has extNsigma above limit.||
+||MOMENTS_FAILURE||0x00008000||32768||Could not measure the moments.||
+||SKY_FAILURE||0x00010000||65536||Could not measure the local sky.||
+||SKYVAR_FAILURE||0x00020000||131072||Could not measure the local sky variance.||
+||BELOW_MOMENTS_SN||0x00040000||262144||Moments not measured due to low S/N.||
+||UNDEF_1||0x00080000||524288||Unused bit value.||
+||BIG_RADIUS||0x00100000||1048576||Poor moments for small radius, try large radius.||
+||AP_MAGS||0x00200000||2097152||Source has an aperture magnitude.||
+||BLEND_FIT||0x00400000||4194304||Source was fitted as a blend.||
+||EXTENDED_FIT||0x00800000||8388608||Full extended fit was used.||
+||EXTENDED_STATS||0x01000000||16777216||Extended aperture stats calculated.||
+||LINEAR_FIT||0x02000000||33554432||Source fitted with the linear fit.||
+||NONLINEAR_FIT||0x04000000||67108864||Source fitted with the non-linear fit.||
+||RADIAL_FLUX||0x08000000||134217728||Radial flux measurements calculated.||
+||SIZE_SKIPPED||0x10000000||268435456||Size could not be determined.||
+||PEAK_ON_SPIKE||0x20000000||536870912||Peak lands on diffraction spike.||
+||PEAK_ON_GHOST||0x40000000||1073741824||Peak lands on ghost or glint.||
+||PEAK_OFF_CHIP||0x80000000||2147483648||Peak lands off edge of chip.||
Index: trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags2.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags2.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags2.txt	(revision 40186)
@@ -0,0 +1,24 @@
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||DIFF_WITH_SINGLE||0x00000001||1||Difference source matched to a single positive detection.||
+||DIFF_WITH_DOUBLE||0x00000002||2||Difference source matched to positive detections in both images.||
+||MATCHED||0x00000004||4||Source generated based on another image (forced photometry at source location).||
+||ON_SPIKE||0x00000008||8||More than 25% of (PSF-weighted) pixels land on diffraction spike.||
+||ON_STARCORE||0x00000010||16||More than 25% of (PSF-weighted) pixels land on starcore.||
+||ON_BURNTOOL||0x00000020||32||More than 25% of (PSF-weighted) pixels land on burntool.||
+||ON_CONVPOOR||0x00000040||64||More than 25% of (PSF-weighted) pixels land on convpoor.||
+||PASS1_SRC||0x00000080||128||Source detected in first pass analysis||
+||HAS_BRIGHTER_NEIGHBOR||0x00000100||256||Peak is not the brightest in its footprint||
+||BRIGHT_NEIGHBOR_1||0x00000200||512||Flux_negative / (r^2 flux_positive) > 1.||
+||BRIGHT_NEIGHBOR_10||0x00000400||1024||Flux_negative / (r^2 flux_positive) > 10.||
+||DIFF_SELF_MATCH||0x00000800||2048||Positive detection match is probably this source.||
+||SATSTAR_PROFILE||0x00001000||4096||Saturated source is modeled with a radial profile.||
+||ECONTOUR_FEW_PTS||0x00002000||8192||Too few points to measure the elliptical contour.||
+||RADBIN_NAN_CENTER||0x00004000||16384||Radial bins failed with too many NaN center bin.||
+||PETRO_NAN_CENTER||0x00008000||32768||Petrosian (1976) radial bins failed with too many NaN center bin.||
+||PETRO_NO_PROFILE||0x00010000||65536||Petrosian (1976) not built becaues radial bins missing.||
+||PETRO_INSIG_RATIO||0x00020000||131072||Insignificant measurement of Petrosian (1976) ratio.||
+||PETRO_RATIO_ZEROBIN||0x00040000||262144||Petrosian (1976) ratio in the 0th bin (likely bad).||
+||EXT_FITS_RUN||0x00080000||524288||Attempted to run extended fits on this source.||
+||EXT_FITS_FAIL||0x00100000||1048576||At least one of the model fits failed.||
+||EXT_FITS_RETRY||0x00200000||2097152||One of the model fits was retried with new window.||
+||EXT_FITS_NONE||0x00400000||4194304||All of the model fits failed.||
Index: trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags3.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags3.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.DetectionFlags3.txt	(revision 40186)
@@ -0,0 +1,30 @@
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||NOCAL||0x00000001||1||Detection ignored for this analysis (photcode; time range) -- internal only.||
+||POOR_PHOTOM||0x00000002||2||Detection is photometry outlier.||                              
+||SKIP_PHOTOM||0x00000004||4||Detection was ignored for photometry measurement.||                      
+||AREA||0x00000008||8||Detection near image edge.||                      
+||POOR_ASTROM||0x00000010||16||Detection is astrometry outlier.||                                  
+||SKIP_ASTROM||0x00000020||32||Detection was ignored for astrometry measurement.||                          
+||USED_OBJ||0x00000040||64||Detection was used during update objects||
+||USED_CHIP||0x00000080||128||Detection was used during update chips to measure astrometry with IRLS fit.||
+||BLEND_MEAS||0x00000100||256||Detection is within radius of multiple objects.||
+||BLEND_OBJ||0x00000200||512||Multiple detections within radius of object.||
+||WARP_USED||0x00000400||1024||Measurement used to find mean warp photometry.||
+||UNMASKED_ASTRO||0x00000800||2048||Detection was unmasked in update chips to determine astrometry parameter errors.||
+||BLEND_MEAS_X||0x00001000||4096||Detection is within radius of multiple objects across catalogs.||               
+||ARTIFACT||0x00002000||8192||Detection is thought to be non-astronomical.||        
+||SYNTH_MAG||0x00004000||16384||Magnitude is synthetic.||
+||PHOTOM_UBERCAL||0x00008000||32768||Externally-supplied zero point from ubercal analysis.||
+||STACK_PRIMARY||0x00010000||65536||This stack measurement is in the primary skycell.||            
+||STACK_PHOT_SRC||0x00020000||131072||This measurement supplied the stack photometry.||
+||ICRF_QSO||0x00040000||262144||This measurement is an ICRF reference position.||
+||IMAGE_EPOCH||0x00080000||524288||This measurement is registered to the image epoch (not tied to the reference catalog epoch).||
+||PHOTOM_PSF||0x00100000||1048576||This measurement is used for the mean PSF magnitude.||
+||PHOTOM_APER||0x00200000||2097152||This measurement is used for the mean aperture magnitude.||
+||PHOTOM_KRON||0x00400000||4194304||This measurement is used for the mean Kron (1980) magnitude.||
+||MASKED_PSF||0x01000000||16777216||This measurement is masked based on IRLS weights for the mean PSF magnitude.||
+||MASKED_APER||0x02000000||33554432||This measurement is masked based on IRLS weights for the mean aperture magnitude.||
+||MASKED_KRON||0x04000000||67108864||This measurement is masked based on IRLS weights for the mean Kron (1980) magnitude.||
+||OBJECT_HAS_2MASS||0x10000000||268435456||This measurement comes from an object with 2MASS data.||
+||OBJECT_HAS_GAIA||0x20000000||536870912||This measurement comes from an object with Gaia data.||
+||OBJECT_HAS_TYCHO||0x40000000||1073741824||This measurement comes from an object with Tycho data.||
Index: trunk/ippToPsps/config/latextables/ipptopsps.ForcedGalaxyShapeFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.ForcedGalaxyShapeFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.ForcedGalaxyShapeFlags.txt	(revision 40186)
@@ -0,0 +1,5 @@
+||NO_ERROR||0x00000000||0||No error condition raised.||
+||FAIL_FIT||0x00000001||1||Fit failed to converge or was degenerate||
+||TOO_FEW||0x00000002||2||Not enough points to fit the model||
+||OUT_OF_RANGE||0x00000004||4||Fit minimum too far outside data range||
+||BAD_ERROR||0x00000008||8||Invalid size error (nan or inf)||
Index: trunk/ippToPsps/config/latextables/ipptopsps.ImageFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.ImageFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.ImageFlags.txt	(revision 40186)
@@ -0,0 +1,12 @@
+||NEW||0x00000000||0||No relphot / relastro attempted.||
+||PHOTOM_NOCAL||0x00000001||1||Used within relphot to mean 'don't apply fit'.||
+||PHOTOM_POOR||0x00000002||2||Relphot says image is bad (dMcal > limit).||
+||PHOTOM_SKIP||0x00000004||4||External information image has bad photometry.||
+||PHOTOM_FEW||0x00000008||8||Currently too few measurements for good value for photometry.||
+||ASTROM_NOCAL||0x00000010||16||User-set value used within relastro: ignore.||
+||ASTROM_POOR||0x00000020||32||Relastro says image is bad (dR,dD > limit).||
+||ASTROM_FAIL||0x00000040||64||Relastro fit diverged, fit not applied.||
+||ASTROM_SKIP||0x00000080||128||External information image has bad astrometry.||
+||ASTROM_FEW||0x00000100||256||Currently too few measurements for good value for astrometry.||
+||PHOTOM_UBERCAL||0x00000200||512||Externally-supplied photometry zero point from ubercal analysis.||
+||ASTROM_GMM||0x00000400||1024||Image was fitted to positions corrected by the galaxy motion model.||
Index: trunk/ippToPsps/config/latextables/ipptopsps.ObjectFilterFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.ObjectFilterFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.ObjectFilterFlags.txt	(revision 40186)
@@ -0,0 +1,22 @@
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||SECF_STAR_FEW||0x00000001||1||Used within relphot: skip star.||
+||SECF_STAR_POOR||0x00000002||2||Used within relphot: skip star.||
+||SECF_USE_SYNTH||0x00000004||4||Synthetic photometry used in average measurement.||
+||SECF_USE_UBERCAL||0x00000008||8||Ubercal photometry used in average measurement.||
+||SECF_HAS_PS1||0x00000010||16||PS1 photometry used in average measurement.||
+||SECF_HAS_PS1_STACK||0x00000020||32||PS1 stack photometry exists.||
+||SECF_HAS_TYCHO||0x00000040||64||Tycho photometry used for synthetic magnitudes.||
+||SECF_FIX_SYNTH||0x00000080||128||Synthetic magnitudes repaired with zeropoint map.||
+||SECF_RANK_0||0x00000100||256||Average magnitude calculated in 0th pass.||
+||SECF_RANK_1||0x00000200||512||Average magnitude calculated in 1st pass.||
+||SECF_RANK_2||0x00000400||1024||Average magnitude calculated in 2nd pass.||
+||SECF_RANK_3||0x00000800||2048||Average magnitude calculated in 3rd pass.||
+||SECF_RANK_4||0x00001000||4096||Average magnitude calculated in 4th pass.||
+||SECF_STACK_PRIMARY||0x00004000||16384||PS1 stack photometry comes from primary skycell.||
+||SECF_STACK_BESTDET||0x00008000||32768||PS1 stack best measurement is a detection (not forced).||
+||SECF_STACK_PRIMDET||0x00010000||65536||PS1 stack primary measurement is a detection (not forced).||
+||SECF_HAS_SDSS||0x00100000||1048576||This photcode has SDSS photometry.||
+||SECF_HAS_HSC||0x00200000||2097152||This photcode has HSC photometry.||
+||SECF_HAS_CFH||0x00400000||4194304||This photcode has CFH photometry (mostly Megacam).||
+||SECF_HAS_DES||0x00800000||8388608||This photcode has DES photometry.||
+||SECF_OBJ_EXT||0x01000000||16777216||Extended in this band.||
Index: trunk/ippToPsps/config/latextables/ipptopsps.ObjectInfoFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.ObjectInfoFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.ObjectInfoFlags.txt	(revision 40186)
@@ -0,0 +1,32 @@
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||FEW||0x00000001||1||Used within relphot; skip star.||
+||POOR||0x00000002||2||Used within relphot; skip star.||
+||ICRF_QSO||0x00000004||4||Object IDed with known ICRF quasar (may have ICRF position measurement)||
+||HERN_QSO_P60||0x00000008||8||Identified as likely QSO (Hernitschek et al 2015), P_QSO >= 0.60||
+||HERN_QSO_P05||0x00000010||16||Identified as possible QSO (Hernitschek et al 2015), P_QSO >= 0.05||
+||HERN_RRL_P60||0x00000020||32||Identified as likely RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.60||
+||HERN_RRL_P05||0x00000040||64||Identified as possible RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.05||
+||HERN_VARIABLE||0x00000080||128||Identified as a variable based on ChiSq? (Hernitschek et al 2015)||
+||TRANSIENT||0x00000100||256||Identified as a non-periodic (stationary) transient||
+||HAS_SOLSYS_DET||0x00000200||512||At least one detection identified with a known solar-system object (asteroid or other).||
+||MOST_SOLSYS_DET||0x00000400||1024||Most detections identified with a known solar-system object (asteroid or other).||
+||LARGE_PM||0x00000800||2048||Star with large proper motion||
+||RAW_AVE||0x00001000||4096||Simple weighted average position was used (no IRLS fitting)||
+||FIT_AVE||0x00002000||8192||Average position was fitted||
+||FIT_PM||0x00004000||16384||Proper motion model was fitted||
+||FIT_PAR||0x00008000||32768||Parallax model was fitted||
+||USE_AVE||0x00010000||65536||Average position used (not PM or PAR)||
+||USE_PM||0x00020000||131072||Proper motion used (not AVE or PAR)||
+||USE_PAR||0x00040000||262144||Parallax used (not AVE or PM)||
+||NO_MEAN_ASTROM||0x00080000||524288||Mean astrometry could not be measured||
+||STACK_FOR_MEAN||0x00100000||1048576||Stack position used for mean astrometry||
+||MEAN_FOR_STACK||0x00200000||2097152||Mean astrometry used for stack position||
+||BAD_PM||0x00400000||4194304||Failure to measure proper-motion model||
+||EXT||0x00800000||8388608||Extended in our data (eg; PS)||
+||EXT_ALT||0x01000000||16777216||Extended in external data (eg; 2MASS)||
+||GOOD||0x02000000||33554432||Good-quality measurement in our data (eg; PS)||
+||GOOD_ALT||0x04000000||67108864||Good-quality measurement in  external data (eg; 2MASS)||
+||GOOD_STACK||0x08000000||134217728||Good-quality object in the stack (> 1 good stack measurement)||
+||BEST_STACK||0x10000000||268435456||The primary stack measurements are the best measurements||
+||SUSPECT_STACK||0x20000000||536870912||Suspect object in the stack (no more than 1 good measurement, 2 or more suspect or good stack measurement)||
+||BAD_STACK||0x40000000||1073741824||Poor-quality stack object (no more than 1 good or suspect measurement).||
Index: trunk/ippToPsps/config/latextables/ipptopsps.ObjectQualityFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/ipptopsps.ObjectQualityFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/ipptopsps.ObjectQualityFlags.txt	(revision 40186)
@@ -0,0 +1,9 @@
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||QF_OBJ_EXT||0x00000001||1||Extended in our data (eg; PS).||
+||QF_OBJ_EXT_ALT||0x00000002||2||Extended in external data (eg; 2MASS).||
+||QF_OBJ_GOOD||0x00000004||4||Good-quality measurement in our data (eg; PS).||
+||QF_OBJ_GOOD_ALT||0x00000008||8||Good-quality measurement in  external data (eg; 2MASS).||
+||QF_OBJ_GOOD_STACK||0x00000010||16||Good-quality object in the stack (> 1 good stack measurement).||
+||QF_OBJ_BEST_STACK||0x00000020||32||The primary stack measurements are the best measurements.||
+||QF_OBJ_SUSPECT_STACK||0x00000040||64||Suspect object in the stack (no more than 1 good measurement, 2 or more suspect or good stack measurement).||
+||QF_OBJ_BAD_STACK||0x00000080||128||Poor-quality stack object (no more than 1 good or suspect measurement).||
Index: trunk/ippToPsps/config/latextables/latex.DetectionFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/latex.DetectionFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/latex.DetectionFlags.txt	(revision 40186)
@@ -0,0 +1,34 @@
+||Name||Hexadecimal||Value||Description||
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||PSFMODEL||0x00000001||1||Source fitted with a psf model (linear or non-linear).||
+||EXTMODEL||0x00000002||2||Source fitted with an extended-source model.||
+||FITTED||0x00000004||4||Source fitted with non-linear model (PSF or EXT; good or bad).||
+||FAIL||0x00000008||8||Fit (non-linear) failed (non-converge; off-edge; run to zero).||
+||POOR||0x00000010||16||Fit succeeds; but low-S/N; high-Chisq; or large (for PSF -- drop?).||
+||PAIR||0x00000020||32||Source fitted with a double PSF.||
+||PSFSTAR||0x00000040||64||Source used to define PSF model.||
+||SATSTAR||0x00000080||128||Source model peak is above saturation.||
+||BLEND||0x00000100||256||Source is a blend with other sources.||
+||EXTERNAL||0x00000200||512||Source based on supplied input position.||
+||BADPSF||0x00000400||1024||Failed to get good estimate of object's PSF.||
+||DEFECT||0x00000800||2048||Source is thought to be a defect.||
+||SATURATED||0x00001000||4096||Source is thought to be saturated pixels (bleed trail).||
+||CR_LIMIT||0x00002000||8192||Source has crNsigma above limit.||
+||EXT_LIMIT||0x00004000||16384||Source has extNsigma above limit.||
+||MOMENTS_FAILURE||0x00008000||32768||Could not measure the moments.||
+||SKY_FAILURE||0x00010000||65536||Could not measure the local sky.||
+||SKYVAR_FAILURE||0x00020000||131072||Could not measure the local sky variance.||
+||BELOW_MOMENTS_SN||0x00040000||262144||Moments not measured due to low S/N.||
+||UNDEF_1||0x00080000||524288||Unused bit value.||
+||BIG_RADIUS||0x00100000||1048576||Poor moments for small radius; try large radius.||
+||AP_MAGS||0x00200000||2097152||Source has an aperture magnitude.||
+||BLEND_FIT||0x00400000||4194304||Source was fitted as a blend.||
+||EXTENDED_FIT||0x00800000||8388608||Full extended fit was used.||
+||EXTENDED_STATS||0x01000000||16777216||Extended aperture stats calculated.||
+||LINEAR_FIT||0x02000000||33554432||Source fitted with the linear fit.||
+||NONLINEAR_FIT||0x04000000||67108864||Source fitted with the non-linear fit.||
+||RADIAL_FLUX||0x08000000||134217728||Radial flux measurements calculated.||
+||SIZE_SKIPPED||0x10000000||268435456||Size could not be determined.||
+||PEAK_ON_SPIKE||0x20000000||536870912||Peak lands on diffraction spike.||
+||PEAK_ON_GHOST||0x40000000||1073741824||Peak lands on ghost or glint.||
+||PEAK_OFF_CHIP||0x80000000||2147483648||Peak lands off edge of chip.||
Index: trunk/ippToPsps/config/latextables/latex.DetectionFlags2.txt
===================================================================
--- trunk/ippToPsps/config/latextables/latex.DetectionFlags2.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/latex.DetectionFlags2.txt	(revision 40186)
@@ -0,0 +1,25 @@
+||Name||Hexadecimal||Value||Description||
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||DIFF_WITH_SINGLE||0x00000001||1||Difference source matched to a single positive detection.||
+||DIFF_WITH_DOUBLE||0x00000002||2||Difference source matched to positive detections in both images.||
+||MATCHED||0x00000004||4||Source generated based on another image (forced photometry at source location).||
+||ON_SPIKE||0x00000008||8||More than 25% of (PSF-weighted) pixels land on diffraction spike.||
+||ON_STARCORE||0x00000010||16||More than 25% of (PSF-weighted) pixels land on starcore.||
+||ON_BURNTOOL||0x00000020||32||More than 25% of (PSF-weighted) pixels land on burntool.||
+||ON_CONVPOOR||0x00000040||64||More than 25% of (PSF-weighted) pixels land on convpoor.||
+||PASS1_SRC||0x00000080||128||Source detected in first pass analysis||
+||HAS_BRIGHTER_NEIGHBOR||0x00000100||256||Peak is not the brightest in its footprint||
+||BRIGHT_NEIGHBOR_1||0x00000200||512||Flux_negative / (r^2 flux_positive) >  1.||
+||BRIGHT_NEIGHBOR_10||0x00000400||1024||Flux_negative / (r^2 flux_positive)  > 10.||
+||DIFF_SELF_MATCH||0x00000800||2048||Positive detection match is probably this source.||
+||SATSTAR_PROFILE||0x00001000||4096||Saturated source is modeled with a radial profile.||
+||ECONTOUR_FEW_PTS||0x00002000||8192||Too few points to measure the elliptical contour.||
+||RADBIN_NAN_CENTER||0x00004000||16384||Radial bins failed with too many NaN center bin.||
+||PETRO_NAN_CENTER||0x00008000||32768||Petrosian (1976) radial bins failed with too many NaN center bin.||
+||PETRO_NO_PROFILE||0x00010000||65536||Petrosian (1976) not built becaues radial bins missing.||
+||PETRO_INSIG_RATIO||0x00020000||131072||Insignificant measurement of Petrosian (1976) ratio.||
+||PETRO_RATIO_ZEROBIN||0x00040000||262144||Petrosian (1976) ratio in the 0th bin (likely bad).||
+||EXT_FITS_RUN||0x00080000||524288||Attempted to run extended fits on this source.||
+||EXT_FITS_FAIL||0x00100000||1048576||At least one of the model fits failed.||
+||EXT_FITS_RETRY||0x00200000||2097152||One of the model fits was retried with new window.||
+||EXT_FITS_NONE||0x00400000||4194304||All of the model fits failed.||
Index: trunk/ippToPsps/config/latextables/latex.DetectionFlags3.txt
===================================================================
--- trunk/ippToPsps/config/latextables/latex.DetectionFlags3.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/latex.DetectionFlags3.txt	(revision 40186)
@@ -0,0 +1,32 @@
+||Name||Hexadecimal||Value||Description||
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||NOCAL||0x00000001||1||Detection ignored for this analysis (photcode; time range) -- internal only.||
+||POOR_PHOTOM||0x00000002||2||Detection is photometry outlier.||
+||SKIP_PHOTOM||0x00000004||4||Detection was ignored for photometry measurement.||
+||AREA||0x00000008||8||Detection near image edge.||
+||POOR_ASTROM||0x00000010||16||Detection is astrometry outlier.||
+||SKIP_ASTROM||0x00000020||32||Detection was ignored for astrometry measurement.||
+||USED_OBJ||0x00000040||64||Detection was used during update objects||
+||USED_CHIP||0x00000080||128||Detection was used during update chips to measure astrometry with IRLS fit.||
+||BLEND_MEAS||0x00000100||256||Detection is within radius of multiple objects.||
+||BLEND_OBJ||0x00000200||512||Multiple detections within radius of object.||
+||WARP_USED||0x00000400||1024||Measurement used to find mean warp photometry.||
+||UNMASKED_ASTRO||0x00000800||2048||Detection was unmasked in update chips to determine astrometry parameter errors.||
+||BLEND_MEAS_X||0x00001000||4096||Detection is within radius of multiple objects across catalogs.||
+||ARTIFACT||0x00002000||8192||Detection is thought to be non-astronomical.||
+||SYNTH_MAG||0x00004000||16384||Magnitude is synthetic.||
+||PHOTOM_UBERCAL||0x00008000||32768||Externally-supplied zero point from ubercal analysis.||
+||STACK_PRIMARY||0x00010000||65536||This stack measurement is in the primary skycell.||
+||STACK_PHOT_SRC||0x00020000||131072||This measurement supplied the stack photometry.||
+||ICRF_QSO||0x00040000||262144||This measurement is an ICRF reference position.||
+||IMAGE_EPOCH||0x00080000||524288||This measurement is registered to the image epoch||
+||||||||(not tied to the reference catalog epoch).||
+||PHOTOM_PSF||0x00100000||1048576||This measurement is used for the mean PSF magnitude.||
+||PHOTOM_APER||0x00200000||2097152||This measurement is used for the mean aperture magnitude.||
+||PHOTOM_KRON||0x00400000||4194304||This measurement is used for the mean Kron (1980) magnitude.||
+||MASKED_PSF||0x01000000||16777216||This measurement is masked based on IRLS weights for the mean PSF magnitude.||
+||MASKED_APER||0x02000000||33554432||This measurement is masked based on IRLS weights for the mean aperture magnitude.||
+||MASKED_KRON||0x04000000||67108864||This measurement is masked based on IRLS weights for the mean Kron (1980) magnitude.||
+||OBJECT_HAS_2MASS||0x10000000||268435456||This measurement comes from an object with 2MASS data.||
+||OBJECT_HAS_GAIA||0x20000000||536870912||This measurement comes from an object with Gaia data.||
+||OBJECT_HAS_TYCHO||0x40000000||1073741824||This measurement comes from an object with Tycho data.||
Index: trunk/ippToPsps/config/latextables/latex.ImageFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/latex.ImageFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/latex.ImageFlags.txt	(revision 40186)
@@ -0,0 +1,13 @@
+||Name||Hexadecimal||Value||Description||
+||NEW||0x00000000||0||No relphot / relastro attempted.||
+||PHOTOM_NOCAL||0x00000001||1||Used within relphot to mean 'don't apply fit'.||
+||PHOTOM_POOR||0x00000002||2||Relphot says image is bad (dMcal > limit).||
+||PHOTOM_SKIP||0x00000004||4||External information image has bad photometry.||
+||PHOTOM_FEW||0x00000008||8||Currently too few measurements for good value for photometry.||
+||ASTROM_NOCAL||0x00000010||16||User-set value used within relastro: ignore.||
+||ASTROM_POOR||0x00000020||32||Relastro says image is bad (dR,dD > limit).||
+||ASTROM_FAIL||0x00000040||64||Relastro fit diverged, fit not applied.||
+||ASTROM_SKIP||0x00000080||128||External information image has bad astrometry.||
+||ASTROM_FEW||0x00000100||256||Currently too few measurements for good value for astrometry.||
+||PHOTOM_UBERCAL||0x00000200||512||Externally-supplied photometry zero point from ubercal analysis.||
+||ASTROM_GMM||0x00000400||1024||Image was fitted to positions corrected by the galaxy motion model.||
Index: trunk/ippToPsps/config/latextables/latex.ObjectFilterFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/latex.ObjectFilterFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/latex.ObjectFilterFlags.txt	(revision 40186)
@@ -0,0 +1,23 @@
+||Name||Hexadecimal||Value||Description||
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||SECF_STAR_FEW||0x00000001||1||Used within relphot: skip star.||
+||SECF_STAR_POOR||0x00000002||2||Used within relphot: skip star.||
+||SECF_USE_SYNTH||0x00000004||4||Synthetic photometry used in average measurement.||
+||SECF_USE_UBERCAL||0x00000008||8||Ubercal photometry used in average measurement.||
+||SECF_HAS_PS1||0x00000010||16||PS1 photometry used in average measurement.||
+||SECF_HAS_PS1_STACK||0x00000020||32||PS1 stack photometry exists.||
+||SECF_HAS_TYCHO||0x00000040||64||Tycho photometry used for synthetic magnitudes.||
+||SECF_FIX_SYNTH||0x00000080||128||Synthetic magnitudes repaired with zeropoint map.||
+||SECF_RANK_0||0x00000100||256||Average magnitude calculated in 0th pass.||
+||SECF_RANK_1||0x00000200||512||Average magnitude calculated in 1st pass.||
+||SECF_RANK_2||0x00000400||1024||Average magnitude calculated in 2nd pass.||
+||SECF_RANK_3||0x00000800||2048||Average magnitude calculated in 3rd pass.||
+||SECF_RANK_4||0x00001000||4096||Average magnitude calculated in 4th pass.||
+||SECF_STACK_PRIMARY||0x00004000||16384||PS1 stack photometry comes from primary skycell.||
+||SECF_STACK_BESTDET||0x00008000||32768||PS1 stack best measurement is a detection (not forced).||
+||SECF_STACK_PRIMDET||0x00010000||65536||PS1 stack primary measurement is a detection (not forced).||
+||SECF_HAS_SDSS||0x00100000||1048576||This photcode has SDSS photometry.||
+||SECF_HAS_HSC||0x00200000||2097152||This photcode has HSC photometry.||
+||SECF_HAS_CFH||0x00400000||4194304||This photcode has CFH photometry (mostly megacam).||
+||SECF_HAS_DES||0x00800000||8388608||This photcode has DES photometry.||
+||SECF_OBJ_EXT||0x01000000||16777216||Extended in this band.||
Index: trunk/ippToPsps/config/latextables/latex.ObjectInfoFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/latex.ObjectInfoFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/latex.ObjectInfoFlags.txt	(revision 40186)
@@ -0,0 +1,36 @@
+||Name||Hexadecimal||Value||Description||
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||FEW||0x00000001||1||Used within relphot; skip star.||
+||POOR||0x00000002||2||Used within relphot; skip star.||
+||ICRF_QSO||0x00000004||4||Object IDed with known ICRF quasar||
+||||||||(may have ICRF position measurement)||
+||HERN_QSO_P60||0x00000008||8||Identified as likely QSO (Hernitschek et al 2015);||
+||||||||P_QSO >= 0.60||
+||HERN_QSO_P05||0x00000010||16||Identified as possible QSO (Hernitschek et al 2015), P_QSO >= 0.05||
+||HERN_RRL_P60||0x00000020||32||Identified as likely RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.60||
+||HERN_RRL_P05||0x00000040||64||Identified as possible RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.05||
+||HERN_VARIABLE||0x00000080||128||Identified as a variable based on ChiSq? (Hernitschek et al 2015)||
+||TRANSIENT||0x00000100||256||Identified as a non-periodic (stationary) transient||
+||HAS_SOLSYS_DET||0x00000200||512||At least one detection identified with a known solar-system object (asteroid or other).||
+||MOST_SOLSYS_DET||0x00000400||1024||Most detections identified with a known solar-system object (asteroid or other).||
+||LARGE_PM||0x00000800||2048||Star with large proper motion||
+||RAW_AVE||0x00001000||4096||Simple weighted average position was used (no IRLS fitting)||
+||FIT_AVE||0x00002000||8192||Average position was fitted||
+||FIT_PM||0x00004000||16384||Proper motion model was fitted||
+||FIT_PAR||0x00008000||32768||Parallax model was fitted||
+||USE_AVE||0x00010000||65536||Average position used (not PM or PAR)||
+||USE_PM||0x00020000||131072||Proper motion used (not AVE or PAR)||
+||USE_PAR||0x00040000||262144||Parallax used (not AVE or PM)||
+||NO_MEAN_ASTROM||0x00080000||524288||Mean astrometry could not be measured||
+||STACK_FOR_MEAN||0x00100000||1048576||Stack position used for mean astrometry||
+||MEAN_FOR_STACK||0x00200000||2097152||Mean astrometry used for stack position||
+||BAD_PM||0x00400000||4194304||Failure to measure proper-motion model||
+||EXT||0x00800000||8388608||Extended in our data (eg; PS)||
+||EXT_ALT||0x01000000||16777216||Extended in external data (eg; 2MASS)||
+||GOOD||0x02000000||33554432||Good-quality measurement in our data (eg; PS)||
+||GOOD_ALT||0x04000000||67108864||Good-quality measurement in  external data (eg; 2MASS)||
+||GOOD_STACK||0x08000000||134217728||Good-quality object in the stack (> 1 good stack measurement)||
+||BEST_STACK||0x10000000||268435456||The primary stack measurements are the best measurements||
+||SUSPECT_STACK||0x20000000||536870912||Suspect object in the stack||
+||||||||(no more than 1 good measurement, 2 or more suspect or good stack measurement)||
+||BAD_STACK||0x40000000||1073741824||Poor-quality stack object (no more than 1 good or suspect measurement)||
Index: trunk/ippToPsps/config/latextables/latex.ObjectQualtiyFlags.txt
===================================================================
--- trunk/ippToPsps/config/latextables/latex.ObjectQualtiyFlags.txt	(revision 40186)
+++ trunk/ippToPsps/config/latextables/latex.ObjectQualtiyFlags.txt	(revision 40186)
@@ -0,0 +1,10 @@
+||Name||Hexadecimal||Value||Description||
+||DEFAULT||0x00000000||0||Initial value; resets all bits.||
+||QF_OBJ_EXT||0x00000001||1||Extended in our data (eg; PS).||
+||QF_OBJ_EXT_ALT||0x00000002||2||Extended in external data (eg; 2MASS).||
+||QF_OBJ_GOOD||0x00000004||4||Good-quality measurement in our data (eg; PS).||
+||QF_OBJ_GOOD_ALT||0x00000008||8||Good-quality measurement in  external data (eg; 2MASS).||
+||QF_OBJ_GOOD_STACK||0x00000010||16||Good-quality object in the stack (> 1 good stack measurement).||
+||QF_OBJ_BEST_STACK||0x00000020||32||The primary stack measurements are the best measurements.||
+||QF_OBJ_SUSPECT_STACK||0x00000040||64||Suspect object in the stack (no more than 1 good measurement, 2 or more suspect or good stack measurement).||
+||QF_OBJ_BAD_STACK||0x00000080||128||Poor-quality stack object (no more than 1 good or suspect measurement).||
Index: trunk/ippToPsps/config/latextables/parse_tableIN_sub.pl
===================================================================
--- trunk/ippToPsps/config/latextables/parse_tableIN_sub.pl	(revision 40186)
+++ trunk/ippToPsps/config/latextables/parse_tableIN_sub.pl	(revision 40186)
@@ -0,0 +1,45 @@
+#$table = 'ObjectInfoFlags';
+$table='ObjectQualityFlags';
+$table=$ARGV[1];
+#$table = 'ImageFlags';
+#    <TABLE name="DetectionFlags">
+#    <TABLE name="DetectionFlags2">
+#    <TABLE name="DetectionFlags3">
+#    <TABLE name="ObjectInfoFlags">
+#     <TABLE name="ObjectFilterFlags">
+
+#     <TABLE name="ForcedGalaxyShapeFlags">
+
+$go = 0;
+while (<>) {
+
+
+
+
+if ($_ =~ /\<T/) {
+    if ($_ =~/TABLE name/) {
+	if ($_ =~ /$table"/ ) {
+	    $go = 1;
+	} else {
+	    $go = 0;
+	}
+    } 
+    elsif ($_ =~/TABLEDAT/) {
+	$donothing = 1;
+    }
+    else {
+	if ($go == 1) {
+	$_ =~s /\<TR\>/|/g; 
+	$_ =~s /\s+\<TD\>/|/g;
+	$_ =~s /\<TD\>/|/g; 
+	$_ =~s /\<\/TR\>/|/g; 
+	$_ =~s /\s+\<\/TD\>/|/g;
+	$_ =~s /\<\/TD\>/|/g;
+	$_ =~s /^\s+//;
+
+ 	print $_;
+	}
+    }
+}
+
+}
Index: trunk/ippToPsps/config/latextables/parseipptopspsallflags.pl
===================================================================
--- trunk/ippToPsps/config/latextables/parseipptopspsallflags.pl	(revision 40186)
+++ trunk/ippToPsps/config/latextables/parseipptopspsallflags.pl	(revision 40186)
@@ -0,0 +1,19 @@
+#`rm ipptopsps.*lags.txt`;
+`perl parse_tableIN_sub.pl ../tables.IN.vot ObjectInfoFlags > ipptopsps.ObjectInfoFlags.txt`;
+    `perl parse_tableIN_sub.pl ../tables.IN.vot ObjectQualityFlags > ipptopsps.ObjectQualityFlags.txt`;
+    `perl parse_tableIN_sub.pl ../tables.IN.vot ObjectFilterFlags > ipptopsps.ObjectFilterFlags.txt`;
+    `perl parse_tableIN_sub.pl ../tables.IN.vot DetectionFlags > ipptopsps.DetectionFlags.txt`;
+
+    `perl parse_tableIN_sub.pl ../tables.IN.vot DetectionFlags2 > ipptopsps.DetectionFlags2.txt`;
+    `perl parse_tableIN_sub.pl ../tables.IN.vot DetectionFlags3 > ipptopsps.DetectionFlags3.txt`;
+    `perl parse_tableIN_sub.pl ../tables.IN.vot ImageFlags > ipptopsps.ImageFlags.txt`;
+    `perl parse_tableIN_sub.pl ../tables.IN.vot ForcedGalaxyShapeFlags > ipptopsps.ForcedGalaxyShapeFlags.txt`;
+
+`perl parselatex.pl main.tex ObjectInfoFlags > latex.ObjectInfoFlags.txt`;
+`perl parselatex.pl main.tex ObjectQualityFlags > latex.ObjectQualtiyFlags.txt`;
+`perl parselatex.pl main.tex ObjectFilterFlags > latex.ObjectFilterFlags.txt`;
+`perl parselatex.pl main.tex DetectionFlags > latex.DetectionFlags.txt`;
+`perl parselatex.pl main.tex DetectionFlags2 > latex.DetectionFlags2.txt`;
+`perl parselatex.pl main.tex DetectionFlags3 > latex.DetectionFlags3.txt`;
+`perl parselatex.pl main.tex ImageFlags > latex.ImageFlags.txt`;
+`perl parselatex.pl main.tex ForceGalaxyShapeFlags > latex.ForcedGalaxyShapeFlags.txt`;
Index: trunk/ippToPsps/config/latextables/parselatex.pl
===================================================================
--- trunk/ippToPsps/config/latextables/parselatex.pl	(revision 40186)
+++ trunk/ippToPsps/config/latextables/parselatex.pl	(revision 40186)
@@ -0,0 +1,28 @@
+$table = $ARGV[1];
+$go = 0;
+while (<>) {
+    if ($_ =~ /caption/) {
+	if ($_ =~ /$table\}/) {
+	    $go = 1;
+	} else {
+	    $go = 0;
+	}
+	
+    } 
+    if ($go==1) {
+    if ($_ =~ /\&/) {
+	#this is a good line (?) 
+#	print $_;
+	chomp $_;
+	$_ =~ s/\\//g;
+	$_ =~ s/\s+&/&/g;
+	$_ =~ s/&\s+/&/g;
+	$_ =~ s/\{em //g;
+	$_ =~ s/\}//g;
+	$_ =~ s/\$//g;
+	my @split = split ('&', $_);
+	$split[3] =~ s/\s+$//; 
+	print "||$split[0]||$split[1]||$split[2]||$split[3]||\n";
+    }
+    }
+}
Index: trunk/ippToPsps/config/tables.IN.vot
===================================================================
--- trunk/ippToPsps/config/tables.IN.vot	(revision 40185)
+++ trunk/ippToPsps/config/tables.IN.vot	(revision 40186)
@@ -576,12 +576,12 @@
         <TABLEDATA>
 	  <TR><TD>NEW</TD>           <TD>0x00000000</TD><TD>0</TD><TD>No relphot / relastro attempted.</TD></TR>
-	  <TR><TD>PHOTOM_NOCAL</TD>  <TD>0x00000001</TD><TD>1</TD><TD>Used within relphot to mean 'don't apply fit'. | user-set value used withing relphot: ignore (EAM!)</TD></TR>
-	  <TR><TD>PHOTOM_POOR</TD>   <TD>0x00000002</TD><TD>2</TD><TD>Relphot says image is bad (dMcal > limit). (EAM!)</TD></TR>
-	  <TR><TD>PHOTOM_SKIP</TD>   <TD>0x00000004</TD><TD>4</TD><TD>External information image has bad photometry (EAM).</TD></TR>
+	  <TR><TD>PHOTOM_NOCAL</TD>  <TD>0x00000001</TD><TD>1</TD><TD>Used within relphot to mean 'don't apply fit'.</TD></TR>
+	  <TR><TD>PHOTOM_POOR</TD>   <TD>0x00000002</TD><TD>2</TD><TD>Relphot says image is bad (dMcal > limit).</TD></TR>
+	  <TR><TD>PHOTOM_SKIP</TD>   <TD>0x00000004</TD><TD>4</TD><TD>External information image has bad photometry.</TD></TR>
 	  <TR><TD>PHOTOM_FEW</TD>    <TD>0x00000008</TD><TD>8</TD><TD>Currently too few measurements for good value for photometry.</TD></TR>
-	  <TR><TD>ASTROM_NOCAL</TD>  <TD>0x00000010</TD><TD>16</TD><TD>User-set value used within relastro: ignore (EAM!).</TD></TR>
+	  <TR><TD>ASTROM_NOCAL</TD>  <TD>0x00000010</TD><TD>16</TD><TD>User-set value used within relastro: ignore.</TD></TR>
 	  <TR><TD>ASTROM_POOR</TD>   <TD>0x00000020</TD><TD>32</TD><TD>Relastro says image is bad (dR,dD > limit).</TD></TR>
 	  <TR><TD>ASTROM_FAIL</TD>   <TD>0x00000040</TD><TD>64</TD><TD>Relastro fit diverged, fit not applied.</TD></TR>
-	  <TR><TD>ASTROM_SKIP</TD>   <TD>0x00000080</TD><TD>128</TD><TD>External information image has bad astrometry. (EAM)</TD></TR>
+	  <TR><TD>ASTROM_SKIP</TD>   <TD>0x00000080</TD><TD>128</TD><TD>External information image has bad astrometry.</TD></TR>
 	  <TR><TD>ASTROM_FEW</TD>    <TD>0x00000100</TD><TD>256</TD><TD>Currently too few measurements for good value for astrometry.</TD></TR>
 	  <TR><TD>PHOTOM_UBERCAL</TD><TD>0x00000200</TD><TD>512</TD><TD>Externally-supplied photometry zero point from ubercal analysis.</TD></TR>
@@ -614,5 +614,5 @@
           <TR><TD>EXTMODEL</TD>        <TD>0x00000002</TD><TD>2         </TD><TD>Source fitted with an extended-source model.</TD></TR>
 	  <TR><TD>FITTED</TD>          <TD>0x00000004</TD><TD>4         </TD><TD>Source fitted with non-linear model (PSF or EXT; good or bad).</TD></TR>
-	  <TR><TD>FAIL</TD>            <TD>0x00000008</TD><TD>8         </TD><TD>Fit (non-linear) failed (non-converge, off-edge, run to zero).</TD></TR>
+	  <TR><TD>FAIL</TD>            <TD>0x00000008</TD><TD>8         </TD><TD>Fit (non-linear) failed (non-converge; off-edge; run to zero).</TD></TR>
 	  <TR><TD>POOR</TD>            <TD>0x00000010</TD><TD>16        </TD><TD>Fit succeeds, but low-S/N, high-Chisq, or large (for PSF -- drop?).</TD></TR>
 	  <TR><TD>PAIR</TD>            <TD>0x00000020</TD><TD>32        </TD><TD>Source fitted with a double PSF.</TD></TR>
@@ -669,5 +669,5 @@
 	  <TR><TD>DIFF_WITH_SINGLE</TD>     <TD>0x00000001</TD><TD>1         </TD><TD>Difference source matched to a single positive detection.</TD></TR>
 	  <TR><TD>DIFF_WITH_DOUBLE</TD>     <TD>0x00000002</TD><TD>2         </TD><TD>Difference source matched to positive detections in both images.</TD></TR>
-	  <TR><TD>MATCHED</TD>              <TD>0x00000004</TD><TD>4         </TD><TD>source generated based on another image (forced photometry at source location).</TD></TR>
+	  <TR><TD>MATCHED</TD>              <TD>0x00000004</TD><TD>4         </TD><TD>Source generated based on another image (forced photometry at source location).</TD></TR>
 	  <TR><TD>ON_SPIKE</TD>             <TD>0x00000008</TD><TD>8         </TD><TD>More than 25% of (PSF-weighted) pixels land on diffraction spike.</TD></TR>
 	  <TR><TD>ON_STARCORE</TD>          <TD>0x00000010</TD><TD>16        </TD><TD>More than 25% of (PSF-weighted) pixels land on starcore.</TD></TR>
@@ -715,5 +715,5 @@
         <TABLEDATA>
           <TR><TD>DEFAULT</TD>               <TD>0x00000000</TD><TD>0          </TD><TD>Initial value; resets all bits.</TD></TR>
-	  <TR><TD>NOCAL</TD>                 <TD>0x00000001</TD><TD>1          </TD><TD>Detection ignored for this analysis (photcode, time range) -- internal only.</TD></TR>
+	  <TR><TD>NOCAL</TD>                 <TD>0x00000001</TD><TD>1          </TD><TD>Detection ignored for this analysis (photcode; time range) -- internal only.</TD></TR>
 	  <TR><TD>POOR_PHOTOM</TD>           <TD>0x00000002</TD><TD>2          </TD><TD>Detection is photometry outlier.</TD></TR>                              
 	  <TR><TD>SKIP_PHOTOM</TD>           <TD>0x00000004</TD><TD>4          </TD><TD>Detection was ignored for photometry measurement.</TD></TR>                      
@@ -770,33 +770,33 @@
 	  <TR><TD>FEW</TD>              <TD>0x00000001</TD><TD>1              </TD><TD>Used within relphot; skip star.</TD></TR>
 	  <TR><TD>POOR</TD>             <TD>0x00000002</TD><TD>2              </TD><TD>Used within relphot; skip star.</TD></TR>
-          <TR><TD>ICRF_QSO</TD>         <TD>0x00000004</TD><TD>4              </TD><TD>object IDed with known ICRF quasar (may have ICRF position measurement)</TD></TR>
-          <TR><TD>HERN_QSO_P60</TD>     <TD>0x00000008</TD><TD>8              </TD><TD>identified as likely QSO (Hernitschek et al 2015), P_QSO >= 0.60</TD></TR>
-          <TR><TD>HERN_QSO_P05</TD>     <TD>0x00000010</TD><TD>16             </TD><TD>identified as possible QSO (Hernitschek et al 2015), P_QSO >= 0.05</TD></TR>
-          <TR><TD>HERN_RRL_P60</TD>     <TD>0x00000020</TD><TD>32             </TD><TD>identified as likely RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.60</TD></TR>
-          <TR><TD>HERN_RRL_P05</TD>     <TD>0x00000040</TD><TD>64             </TD><TD>identified as possible RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.05</TD></TR>
-          <TR><TD>HERN_VARIABLE</TD>    <TD>0x00000080</TD><TD>128            </TD><TD>identified as a variable based on ChiSq (Hernitschek et al 2015)</TD></TR>
-          <TR><TD>TRANSIENT</TD>        <TD>0x00000100</TD><TD>256            </TD><TD>identified as a non-periodic (stationary) transient</TD></TR>
-          <TR><TD>HAS_SOLSYS_DET</TD>   <TD>0x00000200</TD><TD>512            </TD><TD>at least one detection identified with a known solar-system object (asteroid or other).</TD></TR>
-          <TR><TD>MOST_SOLSYS_DET</TD>  <TD>0x00000400</TD><TD>1024           </TD><TD>most detections identified with a known solar-system object (asteroid or other).</TD></TR>
-          <TR><TD>LARGE_PM</TD>         <TD>0x00000800</TD><TD>2048           </TD><TD>star with large proper motion</TD></TR>
-          <TR><TD>RAW_AVE</TD>          <TD>0x00001000</TD><TD>4096           </TD><TD>simple weighted average position was used (no IRLS fitting)</TD></TR>
-          <TR><TD>FIT_AVE</TD>          <TD>0x00002000</TD><TD>8192           </TD><TD>average position was fitted</TD></TR>
-          <TR><TD>FIT_PM</TD>           <TD>0x00004000</TD><TD>16384          </TD><TD>proper motion model was fitted</TD></TR>
-          <TR><TD>FIT_PAR</TD>          <TD>0x00008000</TD><TD>32768          </TD><TD>parallax model was fitted</TD></TR>
-          <TR><TD>USE_AVE</TD>          <TD>0x00010000</TD><TD>65536          </TD><TD>average position used (not PM or PAR)</TD></TR>
-          <TR><TD>USE_PM</TD>           <TD>0x00020000</TD><TD>131072         </TD><TD>proper motion used (not AVE or PAR)</TD></TR>
-          <TR><TD>USE_PAR</TD>          <TD>0x00040000</TD><TD>262144         </TD><TD>parallax used (not AVE or PM)</TD></TR>
-          <TR><TD>NO_MEAN_ASTROM</TD>   <TD>0x00080000</TD><TD>524288         </TD><TD>mean astrometry could not be measured</TD></TR>
-          <TR><TD>STACK_FOR_MEAN</TD>   <TD>0x00100000</TD><TD>1048576        </TD><TD>stack position used for mean astrometry</TD></TR>
-          <TR><TD>MEAN_FOR_STACK</TD>   <TD>0x00200000</TD><TD>2097152        </TD><TD>mean astrometry used for stack position</TD></TR>
-          <TR><TD>BAD_PM</TD>           <TD>0x00400000</TD><TD>4194304        </TD><TD>failure to measure proper-motion model</TD></TR>
-          <TR><TD>EXT</TD>              <TD>0x00800000</TD><TD>8388608        </TD><TD>extended in our data (eg, PS)</TD></TR>
-          <TR><TD>EXT_ALT</TD>          <TD>0x01000000</TD><TD>16777216       </TD><TD>extended in external data (eg, 2MASS)</TD></TR>
-          <TR><TD>GOOD</TD>             <TD>0x02000000</TD><TD>33554432       </TD><TD>good-quality measurement in our data (eg,PS)</TD></TR>
-          <TR><TD>GOOD_ALT</TD>         <TD>0x04000000</TD><TD>67108864       </TD><TD>good-quality measurement in  external data (eg, 2MASS)</TD></TR>
-          <TR><TD>GOOD_STACK</TD>       <TD>0x08000000</TD><TD>134217728      </TD><TD>good-quality object in the stack (> 1 good stack measurement)</TD></TR>
-          <TR><TD>BEST_STACK</TD>       <TD>0x10000000</TD><TD>268435456      </TD><TD>the primary stack measurements are the best measurements</TD></TR>
-          <TR><TD>SUSPECT_STACK</TD>    <TD>0x20000000</TD><TD>536870912      </TD><TD>suspect object in the stack (no more than 1 good measurement, 2 or more suspect or good stack measurement)</TD></TR>
-          <TR><TD>BAD_STACK</TD>        <TD>0x40000000</TD><TD>1073741824     </TD><TD>poor-quality stack object (no more than 1 good or suspect measurement)</TD></TR>
+          <TR><TD>ICRF_QSO</TD>         <TD>0x00000004</TD><TD>4              </TD><TD>Object IDed with known ICRF quasar (may have ICRF position measurement)</TD></TR>
+          <TR><TD>HERN_QSO_P60</TD>     <TD>0x00000008</TD><TD>8              </TD><TD>Identified as likely QSO (Hernitschek et al 2015), P_QSO >= 0.60</TD></TR>
+          <TR><TD>HERN_QSO_P05</TD>     <TD>0x00000010</TD><TD>16             </TD><TD>Identified as possible QSO (Hernitschek et al 2015), P_QSO >= 0.05</TD></TR>
+          <TR><TD>HERN_RRL_P60</TD>     <TD>0x00000020</TD><TD>32             </TD><TD>Identified as likely RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.60</TD></TR>
+          <TR><TD>HERN_RRL_P05</TD>     <TD>0x00000040</TD><TD>64             </TD><TD>Identified as possible RR Lyra (Hernitschek et al 2015), P_RRLyra >= 0.05</TD></TR>
+          <TR><TD>HERN_VARIABLE</TD>    <TD>0x00000080</TD><TD>128            </TD><TD>Identified as a variable based on ChiSq? (Hernitschek et al 2015)</TD></TR>
+          <TR><TD>TRANSIENT</TD>        <TD>0x00000100</TD><TD>256            </TD><TD>Identified as a non-periodic (stationary) transient</TD></TR>
+          <TR><TD>HAS_SOLSYS_DET</TD>   <TD>0x00000200</TD><TD>512            </TD><TD>At least one detection identified with a known solar-system object (asteroid or other).</TD></TR>
+          <TR><TD>MOST_SOLSYS_DET</TD>  <TD>0x00000400</TD><TD>1024           </TD><TD>Most detections identified with a known solar-system object (asteroid or other).</TD></TR>
+          <TR><TD>LARGE_PM</TD>         <TD>0x00000800</TD><TD>2048           </TD><TD>Star with large proper motion</TD></TR>
+          <TR><TD>RAW_AVE</TD>          <TD>0x00001000</TD><TD>4096           </TD><TD>Simple weighted average position was used (no IRLS fitting)</TD></TR>
+          <TR><TD>FIT_AVE</TD>          <TD>0x00002000</TD><TD>8192           </TD><TD>Average position was fitted</TD></TR>
+          <TR><TD>FIT_PM</TD>           <TD>0x00004000</TD><TD>16384          </TD><TD>Proper motion model was fitted</TD></TR>
+          <TR><TD>FIT_PAR</TD>          <TD>0x00008000</TD><TD>32768          </TD><TD>Parallax model was fitted</TD></TR>
+          <TR><TD>USE_AVE</TD>          <TD>0x00010000</TD><TD>65536          </TD><TD>Average position used (not PM or PAR)</TD></TR>
+          <TR><TD>USE_PM</TD>           <TD>0x00020000</TD><TD>131072         </TD><TD>Proper motion used (not AVE or PAR)</TD></TR>
+          <TR><TD>USE_PAR</TD>          <TD>0x00040000</TD><TD>262144         </TD><TD>Parallax used (not AVE or PM)</TD></TR>
+          <TR><TD>NO_MEAN_ASTROM</TD>   <TD>0x00080000</TD><TD>524288         </TD><TD>Mean astrometry could not be measured</TD></TR>
+          <TR><TD>STACK_FOR_MEAN</TD>   <TD>0x00100000</TD><TD>1048576        </TD><TD>Stack position used for mean astrometry</TD></TR>
+          <TR><TD>MEAN_FOR_STACK</TD>   <TD>0x00200000</TD><TD>2097152        </TD><TD>Mean astrometry used for stack position</TD></TR>
+          <TR><TD>BAD_PM</TD>           <TD>0x00400000</TD><TD>4194304        </TD><TD>Failure to measure proper-motion model</TD></TR>
+          <TR><TD>EXT</TD>              <TD>0x00800000</TD><TD>8388608        </TD><TD>Extended in our data (eg; PS)</TD></TR>
+          <TR><TD>EXT_ALT</TD>          <TD>0x01000000</TD><TD>16777216       </TD><TD>Extended in external data (eg; 2MASS)</TD></TR>
+          <TR><TD>GOOD</TD>             <TD>0x02000000</TD><TD>33554432       </TD><TD>Good-quality measurement in our data (eg; PS)</TD></TR>
+          <TR><TD>GOOD_ALT</TD>         <TD>0x04000000</TD><TD>67108864       </TD><TD>Good-quality measurement in  external data (eg; 2MASS)</TD></TR>
+          <TR><TD>GOOD_STACK</TD>       <TD>0x08000000</TD><TD>134217728      </TD><TD>Good-quality object in the stack (> 1 good stack measurement)</TD></TR>
+          <TR><TD>BEST_STACK</TD>       <TD>0x10000000</TD><TD>268435456      </TD><TD>The primary stack measurements are the best measurements</TD></TR>
+          <TR><TD>SUSPECT_STACK</TD>    <TD>0x20000000</TD><TD>536870912      </TD><TD>Suspect object in the stack (no more than 1 good measurement, 2 or more suspect or good stack measurement)</TD></TR>
+          <TR><TD>BAD_STACK</TD>        <TD>0x40000000</TD><TD>1073741824     </TD><TD>Poor-quality stack object (no more than 1 good or suspect measurement).</TD></TR>
         </TABLEDATA>
       </DATA>
@@ -833,16 +833,16 @@
 	  <TR><TD>SECF_FIX_SYNTH</TD>    <TD>0x00000080</TD><TD>128            </TD><TD>Synthetic magnitudes repaired with zeropoint map.</TD></TR>
 
-	  <TR><TD>SECF_RANK_0</TD>       <TD>0x00000100</TD><TD>256            </TD><TD>Average magnitude uses only rank 0 detections.</TD></TR>
-	  <TR><TD>SECF_RANK_1</TD>       <TD>0x00000200</TD><TD>512            </TD><TD>Average magnitude uses only rank 1 detections.</TD></TR>
-	  <TR><TD>SECF_RANK_2</TD>       <TD>0x00000400</TD><TD>1024           </TD><TD>Average magnitude uses only rank 2 detections.</TD></TR>
-	  <TR><TD>SECF_RANK_3</TD>       <TD>0x00000800</TD><TD>2048           </TD><TD>Average magnitude uses only rank 3 detections.</TD></TR>
-	  <TR><TD>SECF_RANK_4</TD>       <TD>0x00001000</TD><TD>4096           </TD><TD>Average magnitude uses only rank 4 detections.</TD></TR>
+	  <TR><TD>SECF_RANK_0</TD>       <TD>0x00000100</TD><TD>256            </TD><TD>Average magnitude calculated in 0th pass.</TD></TR>
+	  <TR><TD>SECF_RANK_1</TD>       <TD>0x00000200</TD><TD>512            </TD><TD>Average magnitude calculated in 1st pass.</TD></TR>
+	  <TR><TD>SECF_RANK_2</TD>       <TD>0x00000400</TD><TD>1024           </TD><TD>Average magnitude calculated in 2nd pass.</TD></TR>
+	  <TR><TD>SECF_RANK_3</TD>       <TD>0x00000800</TD><TD>2048           </TD><TD>Average magnitude calculated in 3rd pass.</TD></TR>
+	  <TR><TD>SECF_RANK_4</TD>       <TD>0x00001000</TD><TD>4096           </TD><TD>Average magnitude calculated in 4th pass.</TD></TR>
 	  <TR><TD>SECF_STACK_PRIMARY</TD><TD>0x00004000</TD><TD>16384          </TD><TD>PS1 stack photometry comes from primary skycell.</TD></TR>
 	  <TR><TD>SECF_STACK_BESTDET</TD><TD>0x00008000</TD><TD>32768          </TD><TD>PS1 stack best measurement is a detection (not forced).</TD></TR>
 	  <TR><TD>SECF_STACK_PRIMDET</TD><TD>0x00010000</TD><TD>65536          </TD><TD>PS1 stack primary measurement is a detection (not forced).</TD></TR>
-	  <TR><TD>SECF_HAS_SDSS</TD>     <TD>0x00100000</TD><TD>1048576        </TD><TD>This photcode has SDSS photometry (EAM??).</TD></TR>
-	  <TR><TD>SECF_HAS_HSC</TD>      <TD>0x00200000</TD><TD>2097152        </TD><TD>This photcode has HSC  photometry (EAM??).</TD></TR>
-	  <TR><TD>SECF_HAS_CFH</TD>      <TD>0x00400000</TD><TD>4194304        </TD><TD>This photcode has CFH  photometry (mostly Megacam) (EAM??).</TD></TR>
-	  <TR><TD>SECF_HAS_DES</TD>      <TD>0x00800000</TD><TD>8388608        </TD><TD>This photcode has DES  photometry (EAM??).</TD></TR>
+	  <TR><TD>SECF_HAS_SDSS</TD>     <TD>0x00100000</TD><TD>1048576        </TD><TD>This photcode has SDSS photometry.</TD></TR>
+	  <TR><TD>SECF_HAS_HSC</TD>      <TD>0x00200000</TD><TD>2097152        </TD><TD>This photcode has HSC photometry.</TD></TR>
+	  <TR><TD>SECF_HAS_CFH</TD>      <TD>0x00400000</TD><TD>4194304        </TD><TD>This photcode has CFH photometry (mostly Megacam).</TD></TR>
+	  <TR><TD>SECF_HAS_DES</TD>      <TD>0x00800000</TD><TD>8388608        </TD><TD>This photcode has DES photometry.</TD></TR>
 	  <TR><TD>SECF_OBJ_EXT</TD>      <TD>0x01000000</TD><TD>16777216       </TD><TD>Extended in this band.</TD></TR>
         </TABLEDATA>
@@ -869,12 +869,12 @@
         <TABLEDATA>
           <TR><TD>DEFAULT</TD>             <TD>0x00000000</TD><TD>0       </TD><TD>Initial value; resets all bits.</TD></TR>
-	  <TR><TD>QF_OBJ_EXT</TD>          <TD>0x00000001</TD><TD>1       </TD><TD>Extended in our data (eg, PS).</TD></TR>
-	  <TR><TD>QF_OBJ_EXT_ALT</TD>      <TD>0x00000002</TD><TD>2       </TD><TD>Extended in external data (eg, 2MASS).</TD></TR>
-	  <TR><TD>QF_OBJ_GOOD</TD>         <TD>0x00000004</TD><TD>4       </TD><TD>Good-quality measurement in our data (eg,PS).</TD></TR>
-	  <TR><TD>QF_OBJ_GOOD_ALT</TD>     <TD>0x00000008</TD><TD>8       </TD><TD>Good-quality measurement in  external data (eg, 2MASS).</TD></TR>
-	  <TR><TD>QF_OBJ_GOOD_STACK</TD>   <TD>0x00000010</TD><TD>16      </TD><TD>good-quality object in the stack (> 1 good stack measurement)</TD></TR>
-	  <TR><TD>QF_OBJ_BEST_STACK</TD>   <TD>0x00000020</TD><TD>32      </TD><TD>the primary stack measurements are the best measurements.</TD></TR>
-	  <TR><TD>QF_OBJ_SUSPECT_STACK</TD><TD>0x00000040</TD><TD>64      </TD><TD>suspect object in the stack (no more than 1 good measurement, 2 or more suspect or good stack measurement).</TD></TR>
-	  <TR><TD>QF_OBJ_BAD_STACK</TD>    <TD>0x00000080</TD><TD>128      </TD><TD>poor-quality stack object (no more than 1 good or suspect measurement).</TD></TR>
+	  <TR><TD>QF_OBJ_EXT</TD>          <TD>0x00000001</TD><TD>1       </TD><TD>Extended in our data (eg; PS).</TD></TR>
+	  <TR><TD>QF_OBJ_EXT_ALT</TD>      <TD>0x00000002</TD><TD>2       </TD><TD>Extended in external data (eg; 2MASS).</TD></TR>
+	  <TR><TD>QF_OBJ_GOOD</TD>         <TD>0x00000004</TD><TD>4       </TD><TD>Good-quality measurement in our data (eg; PS).</TD></TR>
+	  <TR><TD>QF_OBJ_GOOD_ALT</TD>     <TD>0x00000008</TD><TD>8       </TD><TD>Good-quality measurement in  external data (eg; 2MASS).</TD></TR>
+	  <TR><TD>QF_OBJ_GOOD_STACK</TD>   <TD>0x00000010</TD><TD>16      </TD><TD>Good-quality object in the stack (> 1 good stack measurement).</TD></TR>
+	  <TR><TD>QF_OBJ_BEST_STACK</TD>   <TD>0x00000020</TD><TD>32      </TD><TD>The primary stack measurements are the best measurements.</TD></TR>
+	  <TR><TD>QF_OBJ_SUSPECT_STACK</TD><TD>0x00000040</TD><TD>64      </TD><TD>Suspect object in the stack (no more than 1 good measurement, 2 or more suspect or good stack measurement).</TD></TR>
+	  <TR><TD>QF_OBJ_BAD_STACK</TD>    <TD>0x00000080</TD><TD>128      </TD><TD>Poor-quality stack object (no more than 1 good or suspect measurement).</TD></TR>
 	</TABLEDATA>
       </DATA>
@@ -900,8 +900,8 @@
         <TABLEDATA>
           <TR><TD>NO_ERROR</TD>     <TD>0x00000000</TD><TD>0 </TD><TD>No error condition raised.</TD></TR>
-	  <TR><TD>FAIL_FIT</TD>     <TD>0x00000001</TD><TD>1 </TD><TD>fit failed to converge or was degenerate</TD></TR>
-	  <TR><TD>TOO_FEW</TD>      <TD>0x00000002</TD><TD>2 </TD><TD>not enough points to fit the model</TD></TR>
-	  <TR><TD>OUT_OF_RANGE</TD> <TD>0x00000004</TD><TD>4 </TD><TD>fit minimum too far outside data range</TD></TR>
-	  <TR><TD>BAD_ERROR</TD>    <TD>0x00000008</TD><TD>8 </TD><TD>invalid size error (nan or inf)</TD></TR>
+	  <TR><TD>FAIL_FIT</TD>     <TD>0x00000001</TD><TD>1 </TD><TD>Fit failed to converge or was degenerate</TD></TR>
+	  <TR><TD>TOO_FEW</TD>      <TD>0x00000002</TD><TD>2 </TD><TD>Not enough points to fit the model</TD></TR>
+	  <TR><TD>OUT_OF_RANGE</TD> <TD>0x00000004</TD><TD>4 </TD><TD>Fit minimum too far outside data range</TD></TR>
+	  <TR><TD>BAD_ERROR</TD>    <TD>0x00000008</TD><TD>8 </TD><TD>Invalid size error (nan or inf)</TD></TR>
 	</TABLEDATA>
       </DATA>
