Index: trunk/Ohana/src/uniphot/include/setphot.h
===================================================================
--- trunk/Ohana/src/uniphot/include/setphot.h	(revision 39262)
+++ trunk/Ohana/src/uniphot/include/setphot.h	(revision 39272)
@@ -35,5 +35,11 @@
   int NyCCD;	// number of pixels
 
+  e_time *tstart;
+  e_time *tstop;
+
+  Header *phu;
   Matrix **matrix; // allocate an array of pointers
+  Header **header; // allocate an array of pointers
+  
   // index = ix + iy*Nx + filter*Nchips + dir*Ngroup
 } CamCorrection;
@@ -47,4 +53,5 @@
 char        *IMAGES;
 char        *SINGLE_CPT;
+char        *CAM_FILE;
 int          VERBOSE;
 int          RESET;
@@ -89,6 +96,6 @@
 Image        *load_images_setphot    PROTO((FITS_DB *db, off_t *Nimage));
 int           match_zpts_to_images   PROTO((Image *image, off_t Nimage, ZptTable *zpts, int Nzpts));
-int           update_dvo_setphot     PROTO((Image *image, off_t Nimage, FlatCorrectionTable *flatcorr));
-void          update_catalog_setphot PROTO((Catalog *catalog, Image *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr));
+int           update_dvo_setphot     PROTO((Image *image, off_t Nimage, CamCorrection *camcorr));
+void          update_catalog_setphot PROTO((Catalog *catalog, Image *image, off_t *index, off_t Nimage, CamCorrection *camcorr));
 void          update_catalog_setphot_client PROTO((Catalog *catalog, ImageSubset *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr));
 
@@ -100,3 +107,13 @@
 float         apply_zpt_offset            PROTO((short code));
 
-int repair_catalog_by_objID (Catalog *catalog);
+int           repair_catalog_by_objID     PROTO((Catalog *catalog));
+
+void           free_cam_correction          PROTO((CamCorrection *cam));
+CamCorrection *alloc_cam_correction         PROTO((int Nx, int Ny, int Nfilter, int Nseason));
+CamCorrection *load_cam_correction          PROTO((char *filename));
+int            save_cam_correction          PROTO((CamCorrection *cam, char *filename));
+// int            get_cam_correction        PROTO((int chipID, int filter, float Xccd, float Yccd, double *dX, double *dY));
+float          get_cam_correction           PROTO((CamCorrection *cam, int flat_id, float Xccd, float Yccd));
+CamCorrection *merge_flatcorr_and_camcorr   PROTO((FlatCorrectionTable *flatcorr, CamCorrection *camcorr));
+
+int            match_camcorr_to_images      PROTO((Image *image, off_t Nimage, CamCorrection *camcorr));
