Index: trunk/Ohana/src/libautocode/def/image.d
===================================================================
--- trunk/Ohana/src/libautocode/def/image.d	(revision 4019)
+++ trunk/Ohana/src/libautocode/def/image.d	(revision 4020)
@@ -6,56 +6,58 @@
 # elements of the image structure
 
-TYPE  coords,               COORDS,               Coords         astrometric data
-FIELD tzero,                TZERO,                e_time         readout time (row 0)
-FIELD nstar,                NSTAR,                unsigned int   number of stars on image 
-FIELD secz,                 SECZ,                 short int      airmass,                   milliairmass
-FIELD NX,                   NX,                   short int      image width
-FIELD NY,                   NY,                   short int      image height
-FIELD apmifit,              APMIFIT,              short int      aperture correction,       millimag
-FIELD dapmifit,             DAPMIFIT,             short int      apmifit error,             millimag 
-FIELD source,               SOURCE,               short int      identifier for CCD
-FIELD Mcal,                 MCAL,                 short int      millimag
-FIELD dMcal,                DMCAL,                short int      millimag
-FIELD Xm,                   XM,                   short int      10*log(image chi-square) 
-FIELD name,                 NAME,                 char[32]       name of original image 
-FIELD detection_limit,      DETECTION_LIMIT,      unsigned char  detection limit,           10*mag
-FIELD saturation_limit,     SATURATION_LIMIT,     unsigned char  saturation limit,          10*mag
-FIELD cerror,               CERROR,               unsigned char  astrometric error,         50*arcsec
-FIELD fwhm_x                FWHM_X                unsigned char  PSF x width,               25*arcsec
-FIELD fwhm_y,               FWHM_Y,               unsigned char  PSF y width,               25*arcsec
-FIELD trate,                TRATE,                unsigned char  scan rate,                 100 usec/pixel 
-FIELD exptime,              EXPTIME,              float          exposure time,             seconds
-FIELD code,                 CODE,                 char           image quality flag
-FIELD ccdnum,               CCDNUM,               unsigned char  CCD ID number
-FIELD dummy,                DUMMY,                char[20]       unused
-FIELD order,                ORDER,                short int      Mrel 2D polynomical order 
-FIELD Mx,                   MX,                   short int      Mrel polyterm
-FIELD My,                   MY,                   short int      Mrel polyterm
-FIELD Mxx                   MXX                   short int      Mrel polyterm
-FIELD Mxy                   MXY                   short int      Mrel polyterm
-FIELD Myy,                  MYY,                  short int      Mrel polyterm
-FIELD Mxxx                  MXXX                  short int      Mrel polyterm
-FIELD Mxxy                  MXXY                  short int      Mrel polyterm
-FIELD Mxyy                  MXYY                  short int      Mrel polyterm
-FIELD Myyy,                 MYYY,                 short int      Mrel polyterm
-FIELD Mxxxx                 MXXXX                 short int      Mrel polyterm
-FIELD Mxxxy                 MXXXY                 short int      Mrel polyterm
-FIELD Mxxyy                 MXXYY                 short int      Mrel polyterm
-FIELD Mxyyy                 MXYYY                 short int      Mrel polyterm
-FIELD Myyyy,                MYYYY,                short int      Mrel polyterm
+SUBSTRUCT coords,           COORDS,               Coords,        astrometric data
+SUBFIELD  crval1,           CRVAL1,               double,   	 coordinate at reference pixel
+SUBFIELD  crval2,           CRVAL2,               double,  	 coordinate at reference pixel
+SUBFIELD  crpix1,           CRPIX1,               float,   	 coordinate of reference pixel
+SUBFIELD  crpix2,           CRPIX2,               float,   	 coordinate of reference pixel
+SUBFIELD  cdelt1,           CDELT1,               float,   	 degrees per pixel
+SUBFIELD  cdelt2,           CDELT2,               float,    	 degrees per pixel
+SUBFIELD  pc1_1,            PC1_1,                float,    	 rotation matrix
+SUBFIELD  pc1_2,            PC1_2,                float,    	 rotation matrix
+SUBFIELD  pc2_1,            PC2_1,                float,    	 rotation matrix
+SUBFIELD  pc2_2,            PC2_2,                float,    	 rotation matrix
+SUBFIELD  polyterms[7][2],  POLYTERMS[7][2],      float,    	 higher order warping terms
+SUBFIELD  ctype[15],        CTYPE[15],            char,     	 coordinate type
+SUBFIELD  Npolyterms,       NPOLYTERMS,           char,     	 order of polynomial
 
-TYPE  Coords
-FIELD crval1                CRVAL1                double   
-FIELD crval2                CRVAL2                double   
-FIELD crpix1                CRPIX1                float    
-FIELD crpix2                CRPIX2                float    
-FIELD cdelt1                CDELT1                float    
-FIELD cdelt2                CDELT2                float    
-FIELD pc1_1                 PC1_1                 float    
-FIELD pc1_2                 PC1_2                 float    
-FIELD pc2_1                 PC2_1                 float    
-FIELD pc2_2                 PC2_2                 float    
-FIELD polyterms[7][2]       POLYTERMS[7][2]       float    
-FIELD ctype[15]             CTYPE[15]             char     
-FIELD Npolyterms            NPOLYTERMS            char     
-END
+FIELD 	  tzero,            TZERO,                e_time,         readout time (row 0)
+FIELD 	  nstar,            NSTAR,                unsigned int,   number of stars on image
+FIELD 	  secz,             SECZ,                 short int,      airmass,                   milliairmass
+FIELD 	  NX,               NX,                   short int,      image width
+FIELD 	  NY,               NY,                   short int,      image height
+FIELD 	  apmifit,          APMIFIT,              short int,      aperture correction,       millimag
+FIELD 	  dapmifit,         DAPMIFIT,             short int,      apmifit error,             millimag
+FIELD 	  source,           SOURCE,               short int,      identifier for CCD,
+FIELD 	  Mcal,             MCAL,                 short int,      calibration mag,           millimag
+FIELD 	  dMcal,            DMCAL,                short int,      error on Mcal,             millimag
+FIELD 	  Xm,               XM,                   short int,      image chisq,               10*log(value)
+FIELD 	  name,             NAME,                 char[32],       name of original image 
+FIELD 	  detection_limit,  DETECTION_LIMIT,      unsigned char,  detection limit,           10*mag
+FIELD 	  saturation_limit, SATURATION_LIMIT,     unsigned char,  saturation limit,          10*mag
+FIELD 	  cerror,           CERROR,               unsigned char,  astrometric error,         50*arcsec
+FIELD 	  fwhm_x,           FWHM_X,               unsigned char,  PSF x width,               25*arcsec
+FIELD 	  fwhm_y,           FWHM_Y,               unsigned char,  PSF y width,               25*arcsec
+FIELD 	  trate,            TRATE,                unsigned char,  scan rate,                 100 usec/pixel
+FIELD 	  exptime,          EXPTIME,              float,          exposure time,             seconds
+FIELD 	  code,             CODE,                 char,           image quality flag
+FIELD 	  ccdnum,           CCDNUM,               unsigned char,  CCD ID number
+FIELD 	  dummy,            DUMMY,                char[20],       unused
+FIELD 	  order,            ORDER,                short int,      Mrel 2D polynomical order 
+FIELD 	  Mx,               MX,                   short int,      Mrel polyterm
+FIELD 	  My,               MY,                   short int,      Mrel polyterm
+FIELD 	  Mxx,              MXX,                  short int,      Mrel polyterm
+FIELD 	  Mxy,              MXY,                  short int,      Mrel polyterm
+FIELD 	  Myy,              MYY,                  short int,      Mrel polyterm
+FIELD 	  Mxxx,             MXXX,                 short int,      Mrel polyterm
+FIELD 	  Mxxy,             MXXY,                 short int,      Mrel polyterm
+FIELD 	  Mxyy,             MXYY,                 short int,      Mrel polyterm
+FIELD 	  Myyy,             MYYY,                 short int,      Mrel polyterm
+FIELD 	  Mxxxx,            MXXXX,                short int,      Mrel polyterm
+FIELD 	  Mxxxy,            MXXXY,                short int,      Mrel polyterm
+FIELD 	  Mxxyy,            MXXYY,                short int,      Mrel polyterm
+FIELD 	  Mxyyy,            MXYYY,                short int,      Mrel polyterm
+FIELD 	  Myyyy,            MYYYY,                short int,      Mrel polyterm
+
+
+
+
