Index: trunk/Ohana/src/libautocode/def/average-elixir.d
===================================================================
--- trunk/Ohana/src/libautocode/def/average-elixir.d	(revision 4800)
+++ trunk/Ohana/src/libautocode/def/average-elixir.d	(revision 4800)
@@ -0,0 +1,19 @@
+STRUCT  Average
+EXTNAME DVO_AVERAGE
+TYPE    BINTABLE
+SIZE    32
+
+# elements of data structure / FITS table
+
+FIELD R,              RA,         float,            RA,                	       	  decimal degrees 
+FIELD D,              DEC,        float,            DEC,               	       	  decimal degrees 
+FIELD M,              MAG,        short,            primary mag,       	       	  millimag
+FIELD Nm,             NMEAS,      unsigned short,   number of measures
+FIELD Nn,             NMISS,      unsigned short,   number of missings
+FIELD Xp,             SIGMA_POS,  short, 	    position scatter,   	  1/100 arcsec
+FIELD Xm,             CHISQ_MAG,  short, 	    chisq for primary mag,        [1000*value]  ?
+FIELD code,           code,       unsigned short,   ID code (star, ghost, etc)
+FIELD offset,         offset,     int,     	    offset to first measurement
+FIELD missing,        missing,    int,     	    offset to first missing obs
+FIELD dM,             MAG_ERR,    short,            error on primary mag,         [1000*log(value)] ?
+FIELD Xg,             Xg,         short,            best chisq value
Index: trunk/Ohana/src/libautocode/def/average.d
===================================================================
--- trunk/Ohana/src/libautocode/def/average.d	(revision 4780)
+++ trunk/Ohana/src/libautocode/def/average.d	(revision 4800)
@@ -2,10 +2,10 @@
 EXTNAME DVO_AVERAGE
 TYPE    BINTABLE
-SIZE    32
+SIZE    40
 
 # elements of data structure / FITS table
 
-FIELD R,              RA,         float,            RA,                	       	  decimal degrees 
-FIELD D,              DEC,        float,            DEC,               	       	  decimal degrees 
+FIELD R_PS,              RA,         double,            RA,                	       	  decimal degrees 
+FIELD D_PS,              DEC,        double,            DEC,               	       	  decimal degrees 
 FIELD M,              MAG,        short,            primary mag,       	       	  millimag
 FIELD Nm,             NMEAS,      unsigned short,   number of measures
Index: trunk/Ohana/src/libautocode/def/measure-elixir.d
===================================================================
--- trunk/Ohana/src/libautocode/def/measure-elixir.d	(revision 4800)
+++ trunk/Ohana/src/libautocode/def/measure-elixir.d	(revision 4800)
@@ -0,0 +1,23 @@
+STRUCT  Measure
+EXTNAME DVO_MEASURE
+TYPE    BINTABLE
+SIZE    32
+
+# elements of data structure / FITS table
+
+FIELD dR,             D_RA,       short,          RA offset,                	  1/100 arcsec
+FIELD dD,             D_DEC,      short,          DEC offset,               	  1/100 arcsec
+FIELD M,              MAG,        short,          catalog mag,       	       	  millimag
+FIELD Mcal,           Mcal,       short,          image cal mag,	          millimag
+FIELD Mgal,           Mgal,       short,          galaxy mag,			  millimag
+FIELD airmass,        airmass,    short,          (airmass - 1),		  milliairmass
+FIELD FWx,            FWx,        short,          object fwhm major axis,         1/100 of arcsec 
+FIELD dM,             dM,         unsigned char,  mag error,                      millimag
+FIELD fwy,            fwy,        unsigned char,  object fwhm minor/major ratio
+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 t,              t,          unsigned int,   time in seconds (UNIX)
+FIELD averef,         averef,     unsigned int,   reference to average entry      
+FIELD dt,             dt,         short,          exposure time,                  2500*log(exptime)
+FIELD flags,          flags,      unsigned short, flags for various uses  
Index: trunk/Ohana/src/libautocode/def/measure-panstarrs.d
===================================================================
--- trunk/Ohana/src/libautocode/def/measure-panstarrs.d	(revision 4800)
+++ trunk/Ohana/src/libautocode/def/measure-panstarrs.d	(revision 4800)
@@ -0,0 +1,23 @@
+STRUCT  Measure
+EXTNAME DVO_MEASURE
+TYPE    BINTABLE
+SIZE    32
+
+# elements of data structure / FITS table
+
+FIELD dR,             D_RA,       short,          RA offset,                	  1/100 arcsec
+FIELD dD,             D_DEC,      short,          DEC offset,               	  1/100 arcsec
+FIELD M,              MAG,        short,          catalog mag,       	       	  millimag
+FIELD Mcal,           Mcal,       short,          image cal mag,	          millimag
+FIELD Mgal,           Mgal,       short,          galaxy mag,			  millimag
+FIELD airmass,        airmass,    short,          (airmass - 1),		  milliairmass
+FIELD FWx,            FWx,        short,          object fwhm major axis,         1/100 of arcsec 
+FIELD dM,             dM,         unsigned char,  mag error,                      millimag
+FIELD fwy,            fwy,        unsigned char,  object fwhm minor/major ratio
+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 t,              t,          unsigned int,   time in seconds (UNIX)
+FIELD averef,         averef,     unsigned int,   reference to average entry      
+FIELD dt,             dt,         short,          exposure time,                  2500*log(exptime)
+FIELD flags,          flags,      unsigned short, flags for various uses  
Index: trunk/Ohana/src/libautocode/def/measure.d
===================================================================
--- trunk/Ohana/src/libautocode/def/measure.d	(revision 4780)
+++ trunk/Ohana/src/libautocode/def/measure.d	(revision 4800)
@@ -2,10 +2,15 @@
 EXTNAME DVO_MEASURE
 TYPE    BINTABLE
-SIZE    32
+SIZE    36
 
 # elements of data structure / FITS table
 
-FIELD dR,             D_RA,       short,          RA offset,                	  1/100 arcsec
-FIELD dD,             D_DEC,      short,          DEC offset,               	  1/100 arcsec
+# these are the entries from the Elixir DB format:
+# FIELD dR,             D_RA,      short,          RA offset,                	  1/100 arcsec
+# FIELD dD,             D_DEC,     short,          DEC offset,               	  1/100 arcsec
+# replace these with the above names 
+FIELD dR_PS,             D_RA,   float,          RA offset,                	  arcsec
+FIELD dD_PS,             D_DEC,  float,          DEC offset,               	  arcsec
+
 FIELD M,              MAG,        short,          catalog mag,       	       	  millimag
 FIELD Mcal,           Mcal,       short,          image cal mag,	          millimag
Index: trunk/Ohana/src/libautocode/doc/notes.txt
===================================================================
--- trunk/Ohana/src/libautocode/doc/notes.txt	(revision 4780)
+++ trunk/Ohana/src/libautocode/doc/notes.txt	(revision 4800)
@@ -14,6 +14,4 @@
     - fits_fread_datatable_NAME
     - fits_fwrite_datatable_NAME
-
-  
 
 FITS db APIs
@@ -112,2 +110,29 @@
   - unlock file
 
+
+---
+
+DVO tables
+
+I am converting all DVO tables to have an internal representation of
+the table with the necessary precision (ie, double for RA & DEC, etc),
+and a set of external representations in which the precision and
+available columns are truncated to fit a specific representation.  the
+autocode tables then include the internal name (ie, measure.d) and the
+external versions (ie, measure-elixir.d, etc).  
+
+To pursue this, I have modifed the definion of measure.d to replace,
+eg, dR with dR_PS.  I am now compiling all of ohana and looking for
+places where the new name is needed in the code, stopping the
+compilation.  (In the process, I am being forced to clean up the
+relphot - at least - coding problems: unused variables, undeclared
+functions, etc).  After I have made the changes, I will search for all
+instances of dR_PS and return them to their original.
+
+The only things to watch for in this process are units for the
+values.  In the older code, the value of measure.dR was interpreted as
+1/100th of an arcsec.  Everywhere this was the interpretation must be
+changed to make the value represent 1 arcsec.  This will also be an
+issue for the internal magnitude representations, which all use
+millimags...
+
