Index: branches/eam_branches/relphot.20210521/src/ImageOps.c
===================================================================
--- branches/eam_branches/relphot.20210521/src/ImageOps.c	(revision 41604)
+++ branches/eam_branches/relphot.20210521/src/ImageOps.c	(revision 41606)
@@ -497,17 +497,4 @@
 }
 
-float getMflat (off_t meas, int cat, FlatCorrectionTable *flatcorr, Catalog *catalog) {
-  OHANA_UNUSED_PARAM(flatcorr);
-
-  off_t i = MeasureToImage[cat][meas];
-  if (i == -1) return (NAN);
-
-  float offset = catalog[cat].measureT[meas].Mflat;
-  if (!isfinite(offset)) {
-    offset = 0.0;
-  }
-  return (offset);
-}
-
 Coords *getCoords (off_t meas, int cat) {
 
@@ -520,5 +507,5 @@
 
 /* determine Mcal values for all images */
-void setMcal (Catalog *catalog, FlatCorrectionTable *flatcorr) {
+void setMcal (Catalog *catalog) {
 
   off_t i, j, m, c, n;
@@ -651,5 +638,5 @@
       // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat)
 
-      float Mflat = getMflat (m, c, flatcorr, catalog);
+      float Mflat = getMflat (m, c, catalog);
 
       n = catalog[c].measureT[m].averef;
@@ -773,5 +760,5 @@
 
 /* determine McalTEST values for all images -- this is not used to set measure.Mcal, but only to test */
-void setMcalTest (Catalog *catalog, FlatCorrectionTable *flatcorr) {
+void setMcalTest (Catalog *catalog) {
 
   off_t i, j, m, c, n;
@@ -845,5 +832,5 @@
       // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat)
 
-      float Mflat = getMflat (m, c, flatcorr, catalog);
+      float Mflat = getMflat (m, c, catalog);
 
       // get the PSF magnitude for thie measurement, with airmass slope applied
@@ -1084,5 +1071,5 @@
 }
 
-StatType statsImageN (Catalog *catalog, FlatCorrectionTable *flatcorr) {
+StatType statsImageN (Catalog *catalog) {
 
   off_t i, j, m, c, n, N;
