Index: branches/eam_branches/relphot.20210521/src/ImageOps.c
===================================================================
--- branches/eam_branches/relphot.20210521/src/ImageOps.c	(revision 41606)
+++ branches/eam_branches/relphot.20210521/src/ImageOps.c	(revision 41608)
@@ -636,5 +636,6 @@
       // apply that offset as well here for this image (in other words, each detection is
       // being compared to the model, excluding the zero point, Mcal.  The model includes
-      // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat)
+      // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal + Mflat)
+      // this was inconsistent w.r.t. PhotRel pre-r41606
 
       float Mflat = getMflat (m, c, catalog);
@@ -647,5 +648,5 @@
       }
 
-      float Moff = Mmos + Mgrp + Mgrid - Mflat;
+      float Moff = Mmos + Mgrp + Mgrid + Mflat;
 
       PhotCode *code = GetPhotcodebyCode (catalog[c].measureT[m].photcode);
@@ -830,5 +831,5 @@
       // apply that offset as well here for this image (in other words, each detection is
       // being compared to the model, excluding the zero point, Mcal.  The model includes
-      // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat)
+      // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal + Mflat)
 
       float Mflat = getMflat (m, c, catalog);
@@ -842,5 +843,5 @@
       }
 
-      float Moff = Mmos + Mgrp + Mgrid - Mflat;
+      float Moff = Mmos + Mgrp + Mgrid + Mflat;
 
       psfStars.alldata-> yVector[Nref] = MsysPSF - MrelPSF - Moff;
