
2007.10.16

  absphot concept:

    * determine zero points and color transformations from internal
      system to selected target system.
    
    * choose the color and source/target photcodes based on the photcode table
    
    * optionally fit trends as a function of color index (externally defined)

  USAGE examples:

    * absphot (source) (target)

    * absphot g g_SDSS
    * absphot g g_SDSS_S99
    * absphot g g_SDSS -update

  Design Notes:

    * absphot uses the average (source) and measure (target) data.
    * absphot modify the photcode table
    * absphot does not use the image tables

  Code Outline:

    * lock the photcode table (if -update)

    * load catalogs one at a time
      * identify the stars which contain measurements in the target system of interest
	* this can be done as a full sweep of the db (fairly slow)
	* optimization would pre-define a table of the stars with the target measurements
      * generate a subset catalog containing only the desired target photometry
	* this subset catalog could be stored as a single catalog for the full sky?

    * generate the set of vectors to be fitted:
      * y = source - target
      * dy = dsource^2 + dtarget^2
      * x = source_c1 - source_c2

    * fit the trend x,y,dy

    * determine stats, update photcode table if desired
