Index: trunk/Ohana/src/libdvo/include/dvo.h
===================================================================
--- trunk/Ohana/src/libdvo/include/dvo.h	(revision 28855)
+++ trunk/Ohana/src/libdvo/include/dvo.h	(revision 29001)
@@ -85,29 +85,36 @@
 # define PHOT_MAG 0x06  /* generic magnitude; never stored */
 
-/* Image.code values.  these are codes to note bad images */
-# define ID_IMAGE_NEW   0x0000  /* no nrphot attempted */
-# define ID_IMAGE_NOCAL 0x0001  /* used within nrphot to mean "don't apply fit" */
-# define ID_IMAGE_POOR  0x0002  /* relphot says image is bad */
-# define ID_IMAGE_SKIP  0x0004  /* external information image is bad */
-# define ID_IMAGE_FEW   0x0008  /* currently too few measurements for good value */
+/* Image.code values -- these values are 32 bit (as of PS1_V1) */
+typedef enum {
+  ID_IMAGE_NEW          = 0x00000000,  /* no calibrations yet attempted */
+  ID_IMAGE_PHOTOM_NOCAL = 0x00000001,  /* user-set value used within relphot: ignore */
+  ID_IMAGE_PHOTOM_POOR  = 0x00000002,  /* relphot says image is bad (dMcal > limit) */
+  ID_IMAGE_PHOTOM_SKIP  = 0x00000004,  /* user-set value: assert that this image has bad photometry */
+  ID_IMAGE_PHOTOM_FEW   = 0x00000008,  /* currently too few measurements for photometry */
+  ID_IMAGE_ASTROM_NOCAL = 0x00000010,  /* user-set value used within relastro: ignore */
+  ID_IMAGE_ASTROM_POOR  = 0x00000020,  /* relastro says image is bad (dR,dD > limit) */
+  ID_IMAGE_ASTROM_FAIL  = 0x00000040,  /* relastro fit diverged, fit not applied */
+  ID_IMAGE_ASTROM_SKIP  = 0x00000080,  /* user-set value: assert that this image has bad astrometry */
+  ID_IMAGE_ASTROM_FEW   = 0x00000100,  /* currently too few measurements for astrometry */
+} DVOImageFlags;
 
 /* Measure.flags values -- these values are 32 bit (as of PS1_V1) */
 typedef enum {
-  ID_MEAS_NOCAL        = 0x0001,  // detection ignored for this analysis (photcode, time range) -- internal only 
-  ID_MEAS_POOR_PHOTOM  = 0x0002,  // detection is photometry outlier					     	  
-  ID_MEAS_SKIP_PHOTOM  = 0x0004,  // detection was ignored for photometry measurement			     	  
-  ID_MEAS_AREA         = 0x0008,  // detection near image edge						     
-  ID_MEAS_POOR_ASTROM  = 0x0010,  // detection is astrometry outlier					     	  
-  ID_MEAS_SKIP_ASTROM  = 0x0020,  // detection was ignored for astrometry measurement			     	  
-  ID_MEAS_USED_OBJ     = 0x0040,  // detection was used during opdate objects				     
-  ID_MEAS_USED_CHIP    = 0x0080,  // detection was used during update chips					     
-  ID_MEAS_BLEND_MEAS   = 0x0100,  // detection is within radius of multiple objects				     
-  ID_MEAS_BLEND_OBJ    = 0x0200,  // multiple detections within radius of object				     
-  ID_MEAS_UNDEF_3      = 0x0400,  // unused									     
-  ID_MEAS_UNDEF_4      = 0x0800,  // unused									     
-  ID_MEAS_BLEND_MEAS_X = 0x1000,  // detection is within radius of multiple objects across catalogs		     
-  ID_MEAS_ARTIFACT     = 0x2000,  // detection is thought to be non-astronomical				     
-  ID_MEAS_UNDEF_5      = 0x4000,  // unused									     
-  ID_MEAS_UNDEF_6      = 0x8000,  // unused									     
+  ID_MEAS_NOCAL        = 0x00000001,  // detection ignored for this analysis (photcode, time range) -- internal only 
+  ID_MEAS_POOR_PHOTOM  = 0x00000002,  // detection is photometry outlier					     	  
+  ID_MEAS_SKIP_PHOTOM  = 0x00000004,  // detection was ignored for photometry measurement			     	  
+  ID_MEAS_AREA         = 0x00000008,  // detection near image edge						     
+  ID_MEAS_POOR_ASTROM  = 0x00000010,  // detection is astrometry outlier					     	  
+  ID_MEAS_SKIP_ASTROM  = 0x00000020,  // detection was ignored for astrometry measurement			     	  
+  ID_MEAS_USED_OBJ     = 0x00000040,  // detection was used during opdate objects				     
+  ID_MEAS_USED_CHIP    = 0x00000080,  // detection was used during update chips					     
+  ID_MEAS_BLEND_MEAS   = 0x00000100,  // detection is within radius of multiple objects				     
+  ID_MEAS_BLEND_OBJ    = 0x00000200,  // multiple detections within radius of object				     
+  ID_MEAS_UNDEF_3      = 0x00000400,  // unused									     
+  ID_MEAS_UNDEF_4      = 0x00000800,  // unused									     
+  ID_MEAS_BLEND_MEAS_X = 0x00001000,  // detection is within radius of multiple objects across catalogs		     
+  ID_MEAS_ARTIFACT     = 0x00002000,  // detection is thought to be non-astronomical				     
+  ID_MEAS_UNDEF_5      = 0x00004000,  // unused									     
+  ID_MEAS_UNDEF_6      = 0x00008000,  // unused									     
 } DVOMeasureFlags;
 
@@ -147,4 +154,8 @@
   ID_STAR_USE_PM  = 0x00100000, // proper motion used (not AVE or PAR)
   ID_STAR_USE_PAR = 0x00200000, // parallax used (not AVE or PM)
+  ID_OBJ_EXT      = 0x01000000, // extended in our data (eg, PS)
+  ID_OBJ_EXT_ALT  = 0x02000000, // extended in external data (eg, 2MASS)
+  ID_OBJ_GOOD     = 0x04000000, // good-quality measurement in our data (eg, PS)
+  ID_OBJ_GOOD_ALT = 0x08000000, // good-quality measurement in external data (eg, 2MASS)
 } DVOAverageFlags;
 
