Index: branches/eam_branches/relphot.20210521/src/MagResidSave.c
===================================================================
--- branches/eam_branches/relphot.20210521/src/MagResidSave.c	(revision 41603)
+++ branches/eam_branches/relphot.20210521/src/MagResidSave.c	(revision 41606)
@@ -235,5 +235,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);
 
     // MrelPSF is the average magnitude for this star.  
@@ -248,8 +248,5 @@
     if (isnan(MsysPSF)) continue;
 
-    // XXX skip Mflat for now
-    // float Moff = Mcal + Mmos + Mgrp + Mgrid - Mflat;
-
-    float Moff = Mcal + Mmos + Mgrp + Mgrid;
+    float Moff = Mcal + Mmos + Mgrp + Mgrid - Mflat;
 
     // Mrel is the true average apparent magnitude of this star
