Index: trunk/Ohana/src/libautocode/def/measure.d
===================================================================
--- trunk/Ohana/src/libautocode/def/measure.d	(revision 35099)
+++ trunk/Ohana/src/libautocode/def/measure.d	(revision 37034)
@@ -2,23 +2,26 @@
 EXTNAME      DVO_MEASURE
 TYPE         BINTABLE
-SIZE         184
+SIZE         228
 DESCRIPTION  DVO Detection Measurement Table 
 
-FIELD dR,             D_RA,         float,          RA offset,                      arcsec
-FIELD dD,             D_DEC,        float,          DEC offset,                     arcsec
-FIELD M,              MAG,          float,          catalog mag,                    mag
-FIELD Mcal,           M_CAL,        float,          image cal mag,                  mag
-FIELD Map,            M_APER,       float,          aperture mag,                   mag
-FIELD Mkron,          M_KRON,       float,          kron magnitude,                 mag
-FIELD dMkron,         M_KRON_ERR,   float,          kron magnitude error,           mag
-FIELD dM,             MAG_ERR,      float,          mag error,                      mag
-FIELD dMcal,          MAG_CAL_ERR,  float,          systematic calibration error,   mag
-FIELD dt,             M_TIME,       float,          exposure time,                  2.5*log(exptime)
+FIELD R,              RA,            double,         RA at epoch,                  degrees
+FIELD D,              DEC,           double,         DEC at epoch,                 degrees
+FIELD M,              MAG,           float,          catalog mag,                    mag
+FIELD dM,             MAG_ERR,       float,          mag error,                      mag
+FIELD Map,            M_APER,        float,          aperture mag,                   mag
+FIELD dMap,           M_APER,        float,          aperture mag,                   mag
+FIELD Mkron,          M_KRON,        float,          kron magnitude,                 mag
+FIELD dMkron,         M_KRON_ERR,    float,          kron magnitude error,           mag
+FIELD Mcal,           M_CAL,         float,          image cal mag,                  mag
+FIELD dMcal,          MAG_CAL_ERR,   float,          systematic calibration error,   mag
+FIELD dt,             M_TIME,        float,          exposure time,                  2.5*log(exptime)
 
 # for stacks only?
-FIELD FluxPSF,        FLUX_PSF,     float,          flux from psf fit,              counts/sec?
-FIELD dFluxPSF,       FLUX_PSF_ERR, float,          error on psf flux,              counts/sec?
-FIELD FluxKron,       FLUX_KRON,     float,         flux from kron ap,              counts/sec?
-FIELD dFluxKron,      FLUX_KRON_ERR, float,         error on kron flux,             counts/sec?
+FIELD FluxPSF,        FLUX_PSF,      float,         flux from psf fit,              counts/sec
+FIELD dFluxPSF,       FLUX_PSF_ERR,  float,         error on psf flux,              counts/sec
+FIELD FluxKron,       FLUX_KRON,     float,         flux from kron ap,              counts/sec
+FIELD dFluxKron,      FLUX_KRON_ERR, float,         error on kron flux,             counts/sec
+FIELD FluxAp,         FLUX_AP,       float,         flux from ap,                   counts/sec
+FIELD dFluxAp,        FLUX_AP_ERR,   float,         error on ap flux,               counts/sec
 
 # note that with airmass = 1.0 / cos(90 - alt), we have full alt/az representation
@@ -33,4 +36,11 @@
 FIELD Yfix,           Y_FIX,        float,          Y coord after correction,     pixels
 
+FIELD XoffKH,         X_OFF_KH,      float,          X offset from correction,     pixels
+FIELD YoffKH,         Y_OFF_KH,      float,          Y offset from correction,     pixels
+FIELD XoffDCR,        X_OFF_DCR,     float,          X offset from correction,     pixels
+FIELD YoffDCR,        Y_OFF_DCR,     float,          Y offset from correction,     pixels
+FIELD RoffGAL,        R_OFF_GAL,     float,          RA offset from correction,    arcsec
+FIELD DoffGAL,        D_OFF_GAL,     float,          DEC offset from correction,   arcsec
+
 # could these be packed into fewer bits?
 FIELD Sky,            SKY_FLUX,     float,          local estimate of sky flux,     counts/sec
@@ -38,9 +48,7 @@
 
 FIELD t,              TIME,         int,            time in seconds (UNIX)
-FIELD t_msec,         TIME_MSEC,    unsigned short, time fraction of second,        milliseconds
 FIELD averef,         AVE_REF,      unsigned int,   reference to average entry      
 
 FIELD detID,          DET_ID,       unsigned int,   detection ID
-FIELD imageID,        IMAGE_ID,     unsigned int,   reference to DVO image ID
 FIELD objID,          OBJ_ID,       unsigned int,   unique ID for object in table
 FIELD catID,          CAT_ID,       unsigned int,   unique ID for table in which object was first realized
@@ -48,4 +56,6 @@
 # PSPS uses a 64-bit detection ID
 FIELD extID,          EXT_ID,       uint64_t,       external ID (eg PSPS detID)
+
+FIELD imageID,        IMAGE_ID,     unsigned int,   reference to DVO image ID
 
 # do we need more resolution than a short? should this be a log?
@@ -69,4 +79,8 @@
 FIELD Myy,            MYY,          short,          second moments in pixel coords, 1/100 of pixels^2
 
+# fractional exposure time
+FIELD t_msec,         TIME_MSEC,    unsigned short, time fraction of second,        milliseconds
+FIELD photcode,       PHOTCODE,     unsigned short, photcode
+
 # convert this to error in pixels on load?
 FIELD dXccd,          X_CCD_ERR,    short,          X coord error on chip,          1/100 of pixels
@@ -77,5 +91,4 @@
 FIELD pltscale,       PLTSCALE,     float,          plate scale,                    arcsec/pixel
 
-FIELD photcode,       PHOTCODE,     unsigned short, photcode
 FIELD dbFlags,        DB_FLAGS,     unsigned int,   flags supplied by analysis in database
 FIELD photFlags,      PHOT_FLAGS,   unsigned int,   flags supplied by photometry program
@@ -85,3 +98,6 @@
 #                Changed dbFlags, photFlags : uint16_t to uint64_t
 
+# *** 20140617 : changed: dR,dD -> R,D (removed dependence on average.R,D)
+      	       	 added: dMap, FluxAp, dFluxAp, (X,Y)off(KH,DCR,GAL)
+
 # XXX unsigned int values are probably not being saved in the FITS file correctly: no BZERO, BSCALE
