
I now have the ability to load and save DVO databases in old formats,
with automatic conversion to the current 'internal' representations
for the average, measure, and image tables.  an important concern with
this process is ensuring that we track the old layout names and avoid
breaking existing databases.  Here is a list of old databases, some of
which may not have been written with the right names, or with
inaccurate names.  these can be fixed by setting the FORMAT and MODE
header keywords with the 'fits_insert' command:

- LONEOS : old-style cmp files (ie, RAW), with the 'LONEOS' format.
- CFHT Elixir databases: cmp files, ELIXIR format
- Brandon's Taurus db: incorrect 'PANSTARRS' format, should be called
  'PSTEST1'

I am going to use the following naming convention for future db table
updates:

- PANSTARRS.PS1.0, PANSTARRS.PS1.1, etc
- PANSTARRS.PS4.0, PANSTARRS.PS4.1, etc

The next version of the DVO format needs several major changes:

  - unique IDs in the measure and average tables.
  - reference to the source image in the measure table.
  - chip X,Y coordinates and errors in the measure table
  - remove primary average magnitude from average.d and only use
    the secfilt.d table for the average magnitudes

These are fairly substantial modifications.  Can I do these changes on
an appropriate timescale to get Dave Monet working with relastro?  Is
it necessary to do these all at once?

------

DVO has undergone at least two bit-incompatible versions of the data
structures to date: the 'loneos' version and the 'elixir' version.  

the 'loneos' version was used for the loneos database currently still
in my dataspace.

the 'elixir' version, which extended some of the structures and added
the Secfilt concept, was added at CFHT and is used for all of the
existing CFHT elixir databases.

For DVO-2 development, I will need to make a few modifications to
those tables.  It will be useful to allow versions of DVO which
interact with these different versions correctly.  At one level, this
simply means changing the structures in the included file.  More
difficult is that certain functions use elements of the structures
from one version which are not available in the other versions.  

I am going to explore this process briefly to get DVO-2 started,
particularly so I can solve the astrometric problems which are
currently limited by the use of floats to represent RA & DEC.  

I am going to make the selection of the structures depend on #define
values in the header files.  Currently, everybody which works with the
dvo files includes loneos.h.  This should be broken out to a loneos.h,
elixir.h, panstarrs.h, etc, all independently included from within
dvo.h, which will be the include file called within the user-level
programs.

Translations

/* average data as stored in the LONEOS database -- must be translated on load */

Loneos:Measure -> Elixir:Measure
/* OLD LONEOS VERSION.  NOT BYTE COMPATIBLE WITH NEW VERSION 
   (can be loaded with translation, losing the exptime,
   and limited the number of Naverage to 0xffffff - in load_catalog) */

------

the DVO structure Catalog contains the data from a single sky patch, including:
    average, measure, missing, and secfilt.  

the catalog may be saved in one of 4 modes (catalog.catmode):
    raw   : the old Elixir style which is a header + 4 binary tables
    mef   : catalog is a single file with header and 4 fits tables
    split : catalog is 5 files, one with the header and one for each table
    mysql : catalog is 4 (or 5?) mysql tables

    in split mode, the filename is the file of the descriptive header
    and the averages, the measure, missing, and secfilt data are
    stored in additional files referenced in the header and named
    based on the filename (replacing extension .cpa with .cpb, .cpc,
    .cpd, for example)

    
