Index: branches/eam_branches/ohana.20170822/src/libdvo/include/dvo.h
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/include/dvo.h	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/include/dvo.h	(revision 40243)
@@ -504,5 +504,6 @@
   float          M; // change to Mpsf eventually to disambiguate
   float          Mkron;
-  float          Mcal;
+  float          McalPSF;
+  float          McalAPER;
   float          Mflat;
   float          dM;
Index: branches/eam_branches/ohana.20170822/src/libdvo/include/dvodb.h
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/include/dvodb.h	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/include/dvodb.h	(revision 40243)
@@ -243,5 +243,6 @@
       MEAS_EXTERN_ID,
       MEAS_EXPNAME_AS_INT,
-      MEAS_MCAL_OFFSET, // make this a dvoMagOption?
+      MEAS_MCAL_OFFSET_PSF, // make this a dvoMagOption?
+      MEAS_MCAL_OFFSET_APER, // make this a dvoMagOption?
       MEAS_FLAT,
       MEAS_CENTER_OFFSET,
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dbExtractMeasures.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dbExtractMeasures.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dbExtractMeasures.c	(revision 40243)
@@ -740,5 +740,6 @@
       break;
 
-    case MEAS_MCAL_OFFSET: { value.Flt = measure[0].Mcal; break; }
+    case MEAS_MCAL_OFFSET_PSF:  { value.Flt = measure[0].McalPSF;  break; }
+    case MEAS_MCAL_OFFSET_APER: { value.Flt = measure[0].McalAPER; break; }
     case MEAS_FLAT: { value.Flt = measure[0].Mflat; break; }
 
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dbFields.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dbFields.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dbFields.c	(revision 40243)
@@ -609,5 +609,7 @@
   if (!strcasecmp (fieldName, "SKY"))        	 ESCAPE (MEAS_SKY,            OPIHI_FLT);
   if (!strcasecmp (fieldName, "SKY_ERR"))    	 ESCAPE (MEAS_dSKY,           OPIHI_FLT);
-  if (!strcasecmp (fieldName, "MCAL_OFFSET"))    ESCAPE (MEAS_MCAL_OFFSET,    OPIHI_FLT);
+  if (!strcasecmp (fieldName, "MCAL_OFFSET"))    ESCAPE (MEAS_MCAL_OFFSET_PSF,    OPIHI_FLT);
+  if (!strcasecmp (fieldName, "MCAL_OFFSET_PSF"))  ESCAPE (MEAS_MCAL_OFFSET_PSF,  OPIHI_FLT);
+  if (!strcasecmp (fieldName, "MCAL_OFFSET_APER")) ESCAPE (MEAS_MCAL_OFFSET_APER, OPIHI_FLT);
   if (!strcasecmp (fieldName, "FLAT"))    	 ESCAPE (MEAS_FLAT,           OPIHI_FLT);
   if (!strcasecmp (fieldName, "CENTER_OFFSET"))  ESCAPE (MEAS_CENTER_OFFSET,  OPIHI_FLT);
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_catalog.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_catalog.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_catalog.c	(revision 40243)
@@ -317,5 +317,6 @@
  measure->Mkron     = NAN;
  measure->dMkron    = NAN;
- measure->Mcal      = NAN;
+ measure->McalPSF   = NAN;
+ measure->McalAPER  = NAN;
  measure->dMcal     = NAN;
  measure->dt        = NAN;
@@ -344,5 +345,4 @@
 
  measure->Mflat     = 0.0;
- measure->dummy2    = 0;
 
  measure->Sky       = NAN;
@@ -395,5 +395,6 @@
  measure->D         = NAN;
  measure->M         = NAN;
- measure->Mcal      = NAN;
+ measure->McalPSF   = NAN;
+ measure->McalAPER  = NAN;
  measure->dM        = NAN;
 
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_DEV_1.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_DEV_1.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_DEV_1.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].D          = ave[averef].D - in[i].dD / 3600.0;
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].dM         = in[i].dM;
     out[i].dt         = in[i].dt;
@@ -64,5 +65,5 @@
     out[i].dD         = 3600.0*(ave[averef].D - in[i].D);
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].dM         = in[i].dM;
     out[i].dt         = in[i].dt;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_DEV_2.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_DEV_2.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_DEV_2.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].D          = ave[averef].D - in[i].dD / 3600.0;
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
@@ -62,5 +63,5 @@
     out[i].dD         = 3600.0*(ave[averef].D - in[i].D);
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_SIM.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_SIM.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_SIM.c	(revision 40243)
@@ -18,5 +18,6 @@
     out[i].M          = in[i].M;
     out[i].dM         = in[i].dM;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].dt         = in[i].dt;
     out[i].airmass    = in[i].airmass;
@@ -64,5 +65,5 @@
     out[i].M          = in[i].M;
     out[i].dM         = in[i].dM;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].dt         = in[i].dt;
     out[i].airmass    = in[i].airmass;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V1.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V1.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V1.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].D          = ave[averef].D - in[i].dD / 3600.0;
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
@@ -71,5 +72,5 @@
     out[i].dD         = 3600.0*(ave[averef].D - in[i].D);
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V2.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V2.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V2.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].D          = ave[averef].D - in[i].dD / 3600.0;
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
@@ -72,5 +73,5 @@
     out[i].dD         = 3600.0*(ave[averef].D - in[i].D);
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V3.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V3.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V3.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].D          = ave[averef].D - in[i].dD / 3600.0;
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
@@ -72,5 +73,5 @@
     out[i].dD         = 3600.0*(ave[averef].D - in[i].D);
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].Map        = in[i].Map;
     out[i].dM         = in[i].dM;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V4.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V4.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V4.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].D          = ave[averef].D - in[i].dD / 3600.0;
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].Map        = in[i].Map;
     out[i].Mkron      = in[i].Mkron;
@@ -81,5 +82,5 @@
     out[i].dD         = 3600.0*(ave[averef].D - in[i].D);
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].Map        = in[i].Map;
     out[i].Mkron      = in[i].Mkron;
@@ -518,5 +519,6 @@
     out[i].D          = ave[averef].D - in[i].dD / 3600.0;
     out[i].M          = in[i].M;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].Map        = in[i].Map;
     out[i].Mkron      = in[i].Mkron;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V5.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V5.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V5.c	(revision 40243)
@@ -22,5 +22,6 @@
     out[i].Mkron      = in[i].Mkron;
     out[i].dMkron     = in[i].dMkron;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].dMcal      = in[i].dMcal;
     out[i].dt         = in[i].dt;
@@ -96,5 +97,5 @@
     out[i].Mkron      = in[i].Mkron;
     out[i].dMkron     = in[i].dMkron;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].dMcal      = in[i].dMcal;
     out[i].dt         = in[i].dt;
@@ -1674,5 +1675,6 @@
     out[i].Mkron      = in[i].Mkron;
     out[i].dMkron     = in[i].dMkron;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].dMcal      = in[i].dMcal;
     out[i].dt         = in[i].dt;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V5_LOAD.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V5_LOAD.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V5_LOAD.c	(revision 40243)
@@ -22,5 +22,6 @@
     out[i].Mkron      = in[i].Mkron;
     out[i].dMkron     = in[i].dMkron;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
     out[i].dMcal      = in[i].dMcal;
     out[i].dt         = in[i].dt;
@@ -96,5 +97,5 @@
     out[i].Mkron      = in[i].Mkron;
     out[i].dMkron     = in[i].dMkron;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].dMcal      = in[i].dMcal;
     out[i].dt         = in[i].dt;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V6.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V6.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_PS1_V6.c	(revision 40243)
@@ -22,5 +22,6 @@
     out[i].Mkron      = in[i].Mkron;
     out[i].dMkron     = in[i].dMkron;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].McalPSF;
+    out[i].McalAPER   = in[i].McalAPER;
     out[i].dMcal      = in[i].dMcal;
     out[i].dt         = in[i].dt;
@@ -96,5 +97,6 @@
     out[i].Mkron      = in[i].Mkron;
     out[i].dMkron     = in[i].dMkron;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].McalPSF;
+    out[i].McalAPER   = in[i].McalAPER;
     out[i].dMcal      = in[i].dMcal;
     out[i].dt         = in[i].dt;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_elixir.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_elixir.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_elixir.c	(revision 40243)
@@ -24,5 +24,6 @@
     out[i].dM       = (in[i].dM      == NAN_U_CHAR)  ? NAN : in[i].dM     * 0.001;
     out[i].dt       = (in[i].dt      == NAN_S_SHORT) ? NAN : in[i].dt     * 0.001;
-    out[i].Mcal     = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
+    out[i].McalPSF  = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
+    out[i].McalAPER = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
     out[i].Map      = (in[i].Mgal    == NAN_S_SHORT) ? NAN : in[i].Mgal   * 0.001;
     out[i].airmass  = (in[i].airmass == NAN_S_SHORT) ? NAN : in[i].airmass* 0.001;
@@ -72,5 +73,5 @@
     out[i].dM       = isnan(in[i].dM     ) ? NAN_U_CHAR  : in[i].dM      * 1000.0;
     out[i].dt       = isnan(in[i].dt     ) ? NAN_S_SHORT : in[i].dt      * 1000.0;
-    out[i].Mcal     = isnan(in[i].Mcal   ) ? NAN_S_SHORT : in[i].Mcal    * 1000.0;
+    out[i].Mcal     = isnan(in[i].McalPSF) ? NAN_S_SHORT : in[i].McalPSF * 1000.0;
     out[i].Mgal     = isnan(in[i].Map    ) ? NAN_S_SHORT : in[i].Map     * 1000.0;
     out[i].airmass  = isnan(in[i].airmass) ? NAN_S_SHORT : in[i].airmass * 1000.0;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_loneos.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_loneos.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_loneos.c	(revision 40243)
@@ -26,5 +26,6 @@
     out[i].M        = (in[i].M       == NAN_S_SHORT) ? NAN : in[i].M      * 0.001;
     out[i].dM       = (in[i].dM      == NAN_U_CHAR)  ? NAN : in[i].dM     * 0.001;
-    out[i].Mcal     = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
+    out[i].McalPSF  = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
+    out[i].McalAPER = (in[i].Mcal    == NAN_S_SHORT) ? NAN : in[i].Mcal   * 0.001;
     out[i].Map      = (in[i].M       == NAN_S_SHORT) ? NAN : in[i].M      * 0.001;
     out[i].photcode = in[i].source;
@@ -59,5 +60,5 @@
     out[i].M      = isnan(in[i].M      ) ? NAN_S_SHORT : in[i].M       * 1000.0;
     out[i].dM     = isnan(in[i].dM     ) ? NAN_U_CHAR  : in[i].dM      * 1000.0;
-    out[i].Mcal   = isnan(in[i].Mcal   ) ? NAN_S_SHORT : in[i].Mcal    * 1000.0;
+    out[i].Mcal   = isnan(in[i].McalPSF) ? NAN_S_SHORT : in[i].McalPSF * 1000.0;
     out[i].source = in[i].photcode;
     out[i].t      = in[i].t;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].M          = in[i].M;
     out[i].dM         = in[i].dM;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
 
     out[i].airmass    = in[i].airmass;
@@ -68,5 +69,5 @@
     out[i].M          = in[i].M;
     out[i].dM         = in[i].dM;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].airmass    = in[i].airmass;
     out[i].az         = in[i].az;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c	(revision 40243)
@@ -17,5 +17,6 @@
     out[i].M          = in[i].M;
     out[i].dM         = in[i].dM;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].McalPSF    = in[i].Mcal;
+    out[i].McalAPER   = in[i].Mcal;
 
     out[i].airmass    = in[i].airmass;
@@ -68,5 +69,5 @@
     out[i].M          = in[i].M;
     out[i].dM         = in[i].dM;
-    out[i].Mcal       = in[i].Mcal;
+    out[i].Mcal       = in[i].McalPSF;
     out[i].airmass    = in[i].airmass;
     out[i].az         = in[i].az;
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_photcode_ops.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_photcode_ops.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_photcode_ops.c	(revision 40243)
@@ -381,13 +381,17 @@
 
   float Mraw = NAN;
+  float Mcal = NAN;
   switch (class) {
     case MAG_CLASS_PSF:
       Mraw = measure[0].M;
+      Mcal = measure[0].McalPSF;
       break;
     case MAG_CLASS_KRON:
       Mraw = measure[0].Mkron;
+      Mcal = measure[0].McalAPER;
       break;
     case MAG_CLASS_APER:
       Mraw = measure[0].Map;
+      Mcal = measure[0].McalAPER;
       break;
     default:
@@ -398,5 +402,5 @@
   }
   float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0;
-  float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat;
+  float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat;
 
   /* for DEP, color must be made of PRI/SEC */
@@ -1130,7 +1134,7 @@
 
   // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux
-  float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
-  float Moff = Mcal - ZERO_POINT + 8.9;
-  float Foff = 3630.8 * MagToFlux(Mcal);
+  float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
+  float Moff = Mzpt - ZERO_POINT + 8.9;
+  float Foff = 3630.8 * MagToFlux(Mzpt);
   float Fcat = NAN;
   switch (class) {
@@ -1158,7 +1162,7 @@
 
   // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux
-  float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
-  float Moff = Mcal - ZERO_POINT + 8.9;
-  float Foff = 3630.8 * MagToFlux(Mcal);
+  float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
+  float Moff = Mzpt - ZERO_POINT + 8.9;
+  float Foff = 3630.8 * MagToFlux(Mzpt);
   float Fcat = NAN;
   switch (class) {
@@ -1203,8 +1207,12 @@
 
   // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux
+
+  // use Mcal APER for aperture-like data
+  float Mcal = (class == MAG_CLASS_PSF) ? measure[0].McalPSF : measure[0].McalAPER;
   float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0;
-  float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat;
-  float Moff = Mcal - ZERO_POINT + 8.9;
-  float Foff = 3630.8 * MagToFlux(Mcal);
+
+  float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat;
+  float Moff = Mzpt - ZERO_POINT + 8.9;
+  float Foff = 3630.8 * MagToFlux(Mzpt);
   float Fcat = NAN;
   switch (class) {
@@ -1470,7 +1478,7 @@
 
   // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux
-  float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
-  float Moff = Mcal - ZERO_POINT + 8.9;
-  float Foff = 3630.8 * MagToFlux(Mcal);
+  float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
+  float Moff = Mzpt - ZERO_POINT + 8.9;
+  float Foff = 3630.8 * MagToFlux(Mzpt);
 
   // use dFlux if we can, but use dMag if we must:
@@ -1516,7 +1524,7 @@
 
   // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux
-  float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
-  float Moff = Mcal - ZERO_POINT + 8.9;
-  float Foff = 3630.8 * MagToFlux(Mcal);
+  float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C;
+  float Moff = Mzpt - ZERO_POINT + 8.9;
+  float Foff = 3630.8 * MagToFlux(Mzpt);
 
   // use dFlux if we can, but use dMag if we must:
@@ -1579,8 +1587,11 @@
 
   // measure.M has the static ZERO_POINT (25.0) applied, but not measure.Flux
+  // XXX fix this too:
   float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0;
-  float Mcal = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat;
-  float Moff = Mcal - ZERO_POINT + 8.9;
-  float Foff = 3630.8 * MagToFlux(Mcal);
+  float Mcal = (class == MAG_CLASS_PSF) ? measure[0].McalPSF : measure[0].McalAPER;
+
+  float Mzpt = code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat;
+  float Moff = Mzpt - ZERO_POINT + 8.9;
+  float Foff = 3630.8 * MagToFlux(Mzpt);
 
   // use dFlux if we can, but use dMag if we must:
@@ -1742,13 +1753,17 @@
 
   float Mraw = NAN;
+  float Mcal = NAN;
   switch (class) {
     case MAG_CLASS_PSF:
       Mraw = measure[0].M;
+      Mcal = measure[0].McalPSF;
       break;
     case MAG_CLASS_KRON:
       Mraw = measure[0].Mkron;
+      Mcal = measure[0].McalAPER;
       break;
     case MAG_CLASS_APER:
       // Mraw = measure[0].Map; // MeasureTiny does not have Map
+      // Mcal = measure[0].McalAPER;
       break;
     default:
@@ -1759,5 +1774,5 @@
   }
   float Mflat = isfinite(measure[0].Mflat) ? measure[0].Mflat : 0.0;
-  float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - measure[0].Mcal - Mflat;
+  float Mcat = Mraw - ZERO_POINT + code[0].K*(measure[0].airmass - 1.000) + SCALE*code[0].C - Mcal - Mflat;
 
   /* for DEP, color must be made of PRI/SEC */
Index: branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_tiny_values.c
===================================================================
--- branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_tiny_values.c	(revision 40229)
+++ branches/eam_branches/ohana.20170822/src/libdvo/src/dvo_tiny_values.c	(revision 40243)
@@ -20,5 +20,6 @@
   measureT[0].M          = measure[0].M;
   measureT[0].Mkron      = measure[0].Mkron;
-  measureT[0].Mcal       = measure[0].Mcal;
+  measureT[0].McalPSF    = measure[0].McalPSF;
+  measureT[0].McalAPER   = measure[0].McalAPER;
   measureT[0].dM         = measure[0].dM;
   measureT[0].airmass    = measure[0].airmass;
