Index: trunk/Ohana/src/relphot/src/setMrelCatalog.c
===================================================================
--- trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 37907)
+++ trunk/Ohana/src/relphot/src/setMrelCatalog.c	(revision 37924)
@@ -729,4 +729,7 @@
     }
 
+    float psfQfMax = 0.0;
+    float psfQfPerfMax = 0.0;
+
     off_t meas = measureOffset;
 
@@ -773,4 +776,10 @@
       float Fcal = MagToFlux(-Mcal);
 
+      // these are only used below if IS_DIFF_DB
+      if (IS_DIFF_DB) {
+	if (measure[k].psfQF     > psfQfMax)     psfQfMax     = measure[k].psfQF;
+	if (measure[k].psfQFperf > psfQfPerfMax) psfQfPerfMax = measure[k].psfQFperf;
+      }
+
       // in the calculations below, 
       // ...list gives the error per measurement, wlist gives the weight
@@ -836,4 +845,10 @@
     liststats (Fpsflist, dpsflist, wpsflist, Npsf, psfstats);
 
+    if (IS_DIFF_DB) {
+      // for non DIFF_DB, these are set in setMrelAverageExposure
+      secfilt[Nsec].psfQfMax     = psfQfMax;
+      secfilt[Nsec].psfQfPerfMax = psfQfPerfMax;
+    }
+
     secfilt[Nsec].FpsfWrp  = psfstats->mean;
     secfilt[Nsec].dFpsfWrp = psfstats->error;
