Index: /branches/eam_branches/relphot.20210521/include/relphot.h
===================================================================
--- /branches/eam_branches/relphot.20210521/include/relphot.h	(revision 41610)
+++ /branches/eam_branches/relphot.20210521/include/relphot.h	(revision 41611)
@@ -136,4 +136,16 @@
   int      nCode;
 } TGTimes;
+
+typedef struct {
+  unsigned short photcode;
+  float **Mgrid; // grid of average corrections
+  float **dMgrid; // grid of stdev of corrections
+    int **nMgrid; // grid of number of stars for corrections
+  int Nx; // bin = int(Xchip * (Nx / NxChip))
+  int Ny; // bin = int(Ychip * (Ny / NyChip))
+  float dX; // bin = int(Xchip * dX), dX = Nx / NxChip
+  float dY; // bin = int(Ychip * dY), dY = Ny / NyChip
+  // NxChip, NyChip = 4900,4900 for now
+} GridCorrectionType;
 
 typedef enum {
@@ -562,4 +574,6 @@
 void          setMflatFromGrid    PROTO((Catalog *catalog));
 void          initGridBins        PROTO(());
+GridCorrectionType *getGridCorr   PROTO((int *Nlast));
+int           GridCorrectionSave  PROTO((char *filename));
 void          initImageBins       PROTO((Catalog *catalog, int Ncatalog, int doImageList));
 void          initImagesSubset    PROTO((ImageSubset *input, off_t *line_number, off_t N));
