Index: trunk/Ohana/src/libautocode/def/average.d
===================================================================
--- trunk/Ohana/src/libautocode/def/average.d	(revision 11742)
+++ trunk/Ohana/src/libautocode/def/average.d	(revision 12332)
@@ -2,5 +2,5 @@
 EXTNAME      DVO_AVERAGE
 TYPE         BINTABLE
-SIZE         76
+SIZE         72
 DESCRIPTION  DVO Average Object Table
 
@@ -19,9 +19,11 @@
 FIELD dP,             PAR_ERR,    float,            parallax error,               arcsec
 
-FIELD M,              MAG,        float,            primary mag,       	       	  mag
-FIELD dM,             MAG_ERR,    float,            error on primary mag,         mag
+# XXX drop the old primary magnitude concept
+# FIELD M,            MAG,        float,            primary mag,       	       	  mag
+# FIELD dM,           MAG_ERR,    float,            error on primary mag,         mag
+# FIELD Xm,           CHISQ_MAG,  short, 	    chisq for primary mag,        [100*log(value)]
+# FIELD Xg,           CHISQ_GAL,  short,            chisq for galaxy mags,        [100*log(value)]
+
 FIELD Xp,             SIGMA_POS,  short, 	    position scatter,   	  1/100 arcsec
-FIELD Xm,             CHISQ_MAG,  short, 	    chisq for primary mag,        [100*log(value)]
-FIELD Xg,             CHISQ_GAL,  short,            chisq for galaxy mags,        [100*log(value)]
 FIELD Nm,             NMEAS,      unsigned short,   number of measures
 FIELD Nn,             NMISS,      unsigned short,   number of missings
@@ -30,6 +32,18 @@
 FIELD missing,        missing,    int,     	    offset to first missing obs
 
+# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints for backwards compatibility?
+FIELD objID_hi,       OBJ_ID_HI,    unsigned int,   ID upper bytes
+FIELD objID_lo,       OBJ_ID_LO,    unsigned int,   ID lower bytes
+
 # this structure should only be used for internal representations
 # the average-FORMAT structures should be used for external representations
 # note that the average magnitudes are stored in the 'secfilt' table (change this name??)
 # the index for the secfilt table is just Nsecfilt times the index for the average table.
+
+# XXX after the rest of the DVO re-org work, remove the magnitude based values from this table
+# and move them to the secfilt table.
+
+# the DVO object IDs are generated internally and are not equivalent to the PSPS object IDs
+# probably need to add position chisq
+
+# XXX include the number of measurements used to determine the positional information?
