Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v2.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v2.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v2.d	(revision 36974)
@@ -22,9 +22,9 @@
 FIELD  astromErrScale,    ASTROM_ERR_SCALE,  	 float,          astrometric error scale
 FIELD  astromErrMagScale, ASTROM_ERR_MAG_SCALE,  float,          astrometric error / mag error scale
-FIELD  astromPoorMask,    ASTROM_POOR_MASK,      short,          detections matching this mask should only be used in emergencies
-FIELD  astromBadMask,     ASTROM_BAD_MASK,       short,          detections matching this mask should not be used
+FIELD  astromPoorMask,    ASTROM_POOR_MASK,      unsigned short,   detections matching this mask should only be used in emergencies
+FIELD  astromBadMask,     ASTROM_BAD_MASK,       unsigned short,   detections matching this mask should not be used
 FIELD  photomErrSys,   	  PHOTOM_ERR_SYS,  	 float,          systematic photometric error
-FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 short,          detections matching this mask should only be used in emergencies
-FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 short,          detections matching this mask should not be used
+FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 unsigned short,   detections matching this mask should only be used in emergencies
+FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 unsigned short,   detections matching this mask should not be used
 
 #   dR_total^2 =  dR_sys^2 + AS * dR_obs^2 + MS * dM_obs^2
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v3.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v3.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v3.d	(revision 36974)
@@ -22,9 +22,9 @@
 FIELD  astromErrScale,    ASTROM_ERR_SCALE,  	 float,          astrometric error scale
 FIELD  astromErrMagScale, ASTROM_ERR_MAG_SCALE,  float,          astrometric error / mag error scale
-FIELD  astromPoorMask,    ASTROM_POOR_MASK,      int,            detections matching this mask should only be used in emergencies
-FIELD  astromBadMask,     ASTROM_BAD_MASK,       int,            detections matching this mask should not be used
+FIELD  astromPoorMask,    ASTROM_POOR_MASK,      unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  astromBadMask,     ASTROM_BAD_MASK,       unsigned int,   detections matching this mask should not be used
 FIELD  photomErrSys,   	  PHOTOM_ERR_SYS,  	 float,          systematic photometric error
-FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 int,            detections matching this mask should only be used in emergencies
-FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 int,            detections matching this mask should not be used
+FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 unsigned int,   detections matching this mask should not be used
 
 #   dR_total^2 =  dR_sys^2 + AS * dR_obs^2 + MS * dM_obs^2
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v4.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v4.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v4.d	(revision 36974)
@@ -22,9 +22,9 @@
 FIELD  astromErrScale,    ASTROM_ERR_SCALE,  	 float,          astrometric error scale
 FIELD  astromErrMagScale, ASTROM_ERR_MAG_SCALE,  float,          astrometric error / mag error scale
-FIELD  astromPoorMask,    ASTROM_POOR_MASK,      int,            detections matching this mask should only be used in emergencies
-FIELD  astromBadMask,     ASTROM_BAD_MASK,       int,            detections matching this mask should not be used
+FIELD  astromPoorMask,    ASTROM_POOR_MASK,      unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  astromBadMask,     ASTROM_BAD_MASK,       unsigned int,   detections matching this mask should not be used
 FIELD  photomErrSys,   	  PHOTOM_ERR_SYS,  	 float,          systematic photometric error
-FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 int,            detections matching this mask should only be used in emergencies
-FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 int,            detections matching this mask should not be used
+FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 unsigned int,   detections matching this mask should not be used
 
 #   dR_total^2 =  dR_sys^2 + AS * dR_obs^2 + MS * dM_obs^2
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v5.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v5.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode-ps1-v5.d	(revision 36974)
@@ -22,9 +22,9 @@
 FIELD  astromErrScale,    ASTROM_ERR_SCALE,  	 float,          astrometric error scale
 FIELD  astromErrMagScale, ASTROM_ERR_MAG_SCALE,  float,          astrometric error / mag error scale
-FIELD  astromPoorMask,    ASTROM_POOR_MASK,      int,            detections matching this mask should only be used in emergencies
-FIELD  astromBadMask,     ASTROM_BAD_MASK,       int,            detections matching this mask should not be used
+FIELD  astromPoorMask,    ASTROM_POOR_MASK,      unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  astromBadMask,     ASTROM_BAD_MASK,       unsigned int,   detections matching this mask should not be used
 FIELD  photomErrSys,   	  PHOTOM_ERR_SYS,  	 float,          systematic photometric error
-FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 int,            detections matching this mask should only be used in emergencies
-FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 int,            detections matching this mask should not be used
+FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 unsigned int,   detections matching this mask should not be used
 
 #   dR_total^2 =  dR_sys^2 + AS * dR_obs^2 + MS * dM_obs^2
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/photcode.d	(revision 36974)
@@ -22,9 +22,9 @@
 FIELD  astromErrScale,    ASTROM_ERR_SCALE,  	 float,          astrometric error scale
 FIELD  astromErrMagScale, ASTROM_ERR_MAG_SCALE,  float,          astrometric error / mag error scale
-FIELD  astromPoorMask,    ASTROM_POOR_MASK,      int,            detections matching this mask should only be used in emergencies
-FIELD  astromBadMask,     ASTROM_BAD_MASK,       int,            detections matching this mask should not be used
+FIELD  astromPoorMask,    ASTROM_POOR_MASK,      unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  astromBadMask,     ASTROM_BAD_MASK,       unsigned int,   detections matching this mask should not be used
 FIELD  photomErrSys,   	  PHOTOM_ERR_SYS,  	 float,          systematic photometric error
-FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 int,            detections matching this mask should only be used in emergencies
-FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 int,            detections matching this mask should not be used
+FIELD  photomPoorMask, 	  PHOTOM_POOR_MASK,  	 unsigned int,   detections matching this mask should only be used in emergencies
+FIELD  photomBadMask,  	  PHOTOM_BAD_MASK,  	 unsigned int,   detections matching this mask should not be used
 
 #   dR_total^2 =  dR_sys^2 + AS * dR_obs^2 + MS * dM_obs^2
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v1.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v1.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v1.d	(revision 36974)
@@ -6,9 +6,9 @@
 
 # elements of data structure / FITS table
-FIELD  M,     MAG,      float,                average mag in this band, mags
-FIELD  dM,    MAG_ERR,  float,                error on average mag,     mags
-FIELD  Xm,    MAG_CHI,  float,                chisq on average mag,     [100*log(value)]
-FIELD  Ncode, NCODE,    short,                number of detections in band
-FIELD  Nused, NUSED,    short,                number of detections used in average
-FIELD  M_20,  MAG_20,   short,                lower 20percent mag,      millimags
-FIELD  M_80,  MAG_80,   short,                upper 20percent mag,      millimags
+FIELD  M,      MAG,      float,                average mag in this band, mags
+FIELD  dM,     MAG_ERR,  float,                error on average mag,     mags
+FIELD  Mchisq, MAG_CHI,  float,                chisq on average mag,                  value
+FIELD  Ncode,  NCODE,    short,                number of detections in band
+FIELD  Nused,  NUSED,    short,                number of detections used in average
+FIELD  M_20,   MAG_20,   short,                lower 20percent mag,      millimags
+FIELD  M_80,   MAG_80,   short,                upper 20percent mag,      millimags
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v2.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v2.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v2.d	(revision 36974)
@@ -6,10 +6,10 @@
 
 # elements of data structure / FITS table
-FIELD  M,     MAG,      float,                average mag in this band, mags
-FIELD  dM,    MAG_ERR,  float,                error on average mag,     mags
-FIELD  Xm,    MAG_CHI,  float,                chisq on average mag,     [100*log(value)]
-FIELD  flags, FLAGS,    uint32_t,             photometry flags
-FIELD  Ncode, NCODE,    short,                number of detections in band
-FIELD  Nused, NUSED,    short,                number of detections used in average
-FIELD  M_20,  MAG_20,   short,                lower 20percent mag,      millimags
-FIELD  M_80,  MAG_80,   short,                upper 20percent mag,      millimags
+FIELD  M,      MAG,      float,                average mag in this band, mags
+FIELD  dM,     MAG_ERR,  float,                error on average mag,     mags
+FIELD  Mchisq, MAG_CHI,  float,                chisq on average mag,     value
+FIELD  flags,  FLAGS,    uint32_t,             photometry flags
+FIELD  Ncode,  NCODE,    short,                number of detections in band
+FIELD  Nused,  NUSED,    short,                number of detections used in average
+FIELD  M_20,   MAG_20,   short,                lower 20percent mag,      millimags
+FIELD  M_80,   MAG_80,   short,                upper 20percent mag,      millimags
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v3.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v3.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v3.d	(revision 36974)
@@ -9,5 +9,5 @@
 FIELD  Map,    	    MAG_AP,    	  float,      ave aperture mag in this band,         mags
 FIELD  dM,    	    MAG_ERR,  	  float,      formal error on average mag,           mags
-FIELD  Xm,    	    MAG_CHI,  	  float,      chisq on average mag,                  [100*log(value)]
+FIELD  Mchisq,      MAG_CHI,      float,      chisq on average mag,                  value
 FIELD  flags, 	    FLAGS,    	  uint32_t,   photometry flags
 FIELD  Ncode, 	    NCODE,    	  short,      number of detections in band
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v4.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v4.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v4.d	(revision 36974)
@@ -11,5 +11,5 @@
 FIELD  dMkron,        MAG_KRON_ERR,    float,      formal error on average kron mag,      mags
 FIELD  dM,            MAG_ERR,         float,      formal error on average mag,           mags
-FIELD  Xm,            MAG_CHI,         float,      chisq on average mag,                  [100*log(value)]
+FIELD  Mchisq,        MAG_CHI,         float,      chisq on average mag,                  value
 FIELD  FluxPSF,       FLUX_PSF,        float,      mean flux psf fit (PS1: stack)
 FIELD  dFluxPSF,      FLUX_PSF_ERR,    float,      mean flux psf error
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v5.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v5.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt-ps1-v5.d	(revision 36974)
@@ -19,5 +19,5 @@
 FIELD  Mmin,          MAG_MIN,           float,    min accepted mag,                      mags
 FIELD  Mmax,          MAG_MAX,           float,    max accepted mag,                      mags
-FIELD  Xm,            MAG_CHI,           float,    chisq on average mag,                  [100*log(value)]
+FIELD  Mchisq,        MAG_CHI,           float,    chisq on average mag,                  value
 				         
 FIELD  Ncode,         NCODE,             short,    number of detections in band
Index: /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt.d
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt.d	(revision 36973)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/libautocode/def/secfilt.d	(revision 36974)
@@ -19,5 +19,5 @@
 FIELD  Mmin,          MAG_MIN,         float,      minimum accepted mag,                  mags
 FIELD  Mmax,          MAG_MAX,         float,      maximum accepted mag,                  mags
-FIELD  Xm,            MAG_CHI,         float,      chisq on average mag,                  [100*log(value)]
+FIELD  Mchisq,        MAG_CHI,         float,      chisq on average mag,                  value
 
 FIELD  Ncode,         NCODE,           short,      number of detections in band
