Index: trunk/Ohana/src/libautocode/def/image.d
===================================================================
--- trunk/Ohana/src/libautocode/def/image.d	(revision 27579)
+++ trunk/Ohana/src/libautocode/def/image.d	(revision 30604)
@@ -1,3 +1,3 @@
-STRUCT       Image
+ STRUCT       Image
 EXTNAME      DVO_IMAGE
 TYPE         BINTABLE
@@ -6,4 +6,5 @@
 
 # elements of the image structure
+# careful of 8-byte boundaries
 
 SUBSTRUCT coords,           COORDS,               Coords,        astrometric data
@@ -60,21 +61,38 @@
 # 48 bytes 
 
-FIELD 	  order,            ORDER,                short,      	  Mrel 2D polynomical order 
-FIELD 	  Mx,               MX,                   short,      	  Mrel polyterm
-FIELD 	  My,               MY,                   short,      	  Mrel polyterm
-FIELD 	  Mxx,              MXX,                  short,      	  Mrel polyterm
-FIELD 	  Mxy,              MXY,                  short,      	  Mrel polyterm
-FIELD 	  Myy,              MYY,                  short,      	  Mrel polyterm
-FIELD 	  Mxxx,             MXXX,                 short,      	  Mrel polyterm
-FIELD 	  Mxxy,             MXXY,                 short,      	  Mrel polyterm
-FIELD 	  Mxyy,             MXYY,                 short,      	  Mrel polyterm
-FIELD 	  Myyy,             MYYY,                 short,      	  Mrel polyterm
-FIELD 	  Mxxxx,            MXXXX,                short,      	  Mrel polyterm
-FIELD 	  Mxxxy,            MXXXY,                short,      	  Mrel polyterm
-FIELD 	  Mxxyy,            MXXYY,                short,      	  Mrel polyterm
-FIELD 	  Mxyyy,            MXYYY,                short,      	  Mrel polyterm
-FIELD 	  Myyyy,            MYYYY,                short,      	  Mrel polyterm
+FIELD 	  nLinkAstrom,      NLINK_ASTROM,         short,      	  mean number of matched measurements for astrometry
+FIELD 	  nLinkPhotom,      NLINK_PHOTOM,         short,      	  mean number of matched measurements for astrometry
+FIELD 	  dummy3,           DUMMY3,               short,      	  place holder for byte boundaries
+
+FIELD 	  dXpixSys,         XPIX_SYS_ERR,         float,      	  systematic astrometry error in X
+FIELD 	  dYpixSys,         YPIX_SYS_ERR,         float,      	  systematic astrometry error in Y
+
+FIELD 	  dMagSys,          MAG_SYS_ERR,          float,      	  systematic photometry error
+FIELD 	  nFitAstrom,       N_FIT_ASTROM,         short,      	  number of stars used for astrometry cal
+FIELD 	  nFitPhotom,       N_FIT_PHOTOM,         short,      	  number of stars used for photometry cal
+
+FIELD 	  photom_map_id,    PHOTOM_MAP_ID,        unsigned int,   reference to 2D zero point map
+FIELD 	  astrom_map_id,    ASTROM_MAP_ID,        unsigned int,   reference to 2D astrometry map
+# nFitPhotom lands on the old location of Mxxxx, which was used to mean nFitPhotom in some cases
+
+# old image structure:
+# FIELD 	  order,            ORDER,                short,      	  Mrel 2D polynomical order 
+# FIELD 	  Mx,               MX,                   short,      	  Mrel polyterm
+# FIELD 	  My,               MY,                   short,      	  Mrel polyterm
+# FIELD 	  Mxx,              MXX,                  short,      	  Mrel polyterm
+# FIELD 	  Mxy,              MXY,                  short,      	  Mrel polyterm
+# FIELD 	  Myy,              MYY,                  short,      	  Mrel polyterm
+# FIELD 	  Mxxx,             MXXX,                 short,      	  Mrel polyterm
+# FIELD 	  Mxxy,             MXXY,                 short,      	  Mrel polyterm
+# FIELD 	  Mxyy,             MXYY,                 short,      	  Mrel polyterm
+# FIELD 	  Myyy,             MYYY,                 short,      	  Mrel polyterm
+# FIELD 	  Mxxxx,            MXXXX,                short,      	  Mrel polyterm
+# FIELD 	  Mxxxy,            MXXXY,                short,      	  Mrel polyterm
+# FIELD 	  Mxxyy,            MXXYY,                short,      	  Mrel polyterm
+# FIELD 	  Mxyyy,            MXYYY,                short,      	  Mrel polyterm
+# FIELD 	  Myyyy,            MYYYY,                short,      	  Mrel polyterm
 # 40 bytes
 
 # *** 20090206 : new fields : parentID, flags (was code char), changed name to 121 bytes.
-# *** 20100331 : new fields : 
+# *** 20100331 : new fields : RAo, DECo. Radius
+# *** 20110203 : replace the old zero point polynomial terms (Mx,My,... Mxxxx,Myyyy) with dummy1 - astrom_map_id
