Index: trunk/Ohana/src/libautocode/def/measure.d
===================================================================
--- trunk/Ohana/src/libautocode/def/measure.d	(revision 6454)
+++ trunk/Ohana/src/libautocode/def/measure.d	(revision 12332)
@@ -2,21 +2,52 @@
 EXTNAME      DVO_MEASURE
 TYPE         BINTABLE
-SIZE         50
+SIZE         96
 DESCRIPTION  DVO Detection Measurement Table 
 
-FIELD dR_PS,          D_RA,       float,          RA offset,                	  arcsec
-FIELD dD_PS,          D_DEC,      float,          DEC offset,               	  arcsec
-FIELD M_PS,           MAG,        float,          catalog mag,       	       	  mag
-FIELD Mcal_PS,        Mcal,       float,          image cal mag,	          mag
-FIELD Mgal_PS,        Mgal,       float,          galaxy mag,			  mag
-FIELD dM_PS,          dM,         float,          mag error,                      mag
-FIELD airmass_PS,     airmass,    float,          (airmass - 1),		  airmass
-FIELD dt_PS,          dt,         float,          exposure time,                  2.5*log(exptime)
-FIELD FWx,            FWx,        short,          object fwhm major axis,         1/100 of arcsec 
-FIELD FWy,            FWy,        short,          object fwhm minor axis,         1/100 of arcsec 
-FIELD theta,          theta,      unsigned char,  angle wrt ccd X dir,            (0xff/360) deg
-FIELD dophot,         dophot,     char,           dophot type
-FIELD source,         source,     unsigned short, photcode
-FIELD flags,          flags,      unsigned short, flags for various uses  
-FIELD t,              t,          unsigned int,   time in seconds (UNIX)
-FIELD averef,         averef,     unsigned int,   reference to average entry      
+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,           Mcal,         float,          image cal mag,	          mag
+FIELD Mgal,           Mgal,         float,          galaxy mag,			  mag
+FIELD dM,             dM,           float,          mag error,                    mag
+FIELD airmass,        airmass,      float,          (airmass - 1),		  airmass
+FIELD dt,             dt,           float,          exposure time,                2.5*log(exptime)
+
+FIELD t,              t,            unsigned int,   time in seconds (UNIX)
+FIELD averef,         averef,       unsigned int,   reference to average entry      
+
+FIELD FWx,            FWx,          short,          object fwhm major axis,       1/100 of arcsec 
+FIELD FWy,            FWy,          short,          object fwhm minor axis,       1/100 of arcsec 
+FIELD theta,          theta,        short,          angle wrt ccd X dir,          (0xffff/360) deg
+FIELD photcode,       photcode,     unsigned short, photcode
+
+FIELD flags,          flags,        unsigned short, flags for various uses  
+FIELD dophot,         dophot,       char,           dophot type
+FIELD stargal,        stargal,      char,           star-galaxy separator
+
+# new field elements needed for Pan-STARRS:
+FIELD Xccd,           X_CCD,        float,          X coord on chip,               pixels
+FIELD Yccd,           Y_CCD,        float,          Y coord on chip,               pixels
+
+# could these be packed into fewer bits?
+FIELD Sky,            SKY_FLUX,     float,          local estimate of sky flux,    counts/sec
+FIELD dSky,           SKY_FLUX_ERR, float,          local estimate of sky flux,    counts/sec
+
+FIELD dXccd,          X_CCD_ERR,    short,          X coord error on chip,         pixels
+FIELD dYccd,          Y_CCD_ERR,    short,          Y coord error on chip,         pixels
+
+# do we need more resolution than a short? should this be a log?
+FIELD qPSF,           PSF_QF,       short,          psf coverage/quality factor
+
+# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints for backwards compatibility?
+FIELD detID_hi,       DET_ID_HI,    unsigned int,   ID upper bytes
+FIELD detID_lo,       DET_ID_LO,    unsigned int,   ID lower bytes
+
+FIELD imageID_hi,     IMAGE_ID_HI,  unsigned int,   reference to image
+FIELD imageID_lo,     IMAGE_ID_LO,  unsigned int,   reference to image
+
+# note that with airmass = 1.0 / cos(90 - alt), we have full alt/az representation
+FIELD az,             AZ,           float,          telescope azimuth
+
+# we need extra bytes for padding purposes...
+FIELD dummy,          dummy,        char[2],        padding
