Index: trunk/psModules/src/objects/pmSourceMoments.c
===================================================================
--- trunk/psModules/src/objects/pmSourceMoments.c	(revision 29602)
+++ trunk/psModules/src/objects/pmSourceMoments.c	(revision 31153)
@@ -82,4 +82,6 @@
     psF32 Sum = 0.0;
     psF32 Var = 0.0;
+    psF32 SumCore = 0.0;
+    psF32 VarCore = 0.0;
     psF32 R2 = PS_SQR(radius);
     psF32 minSN2 = PS_SQR(minSN);
@@ -248,4 +250,7 @@
 
     int nKronPix = 0;
+    int nCorePix = 0;
+    int nInner = 0;
+    int nOuter = 0;
     Sum = Var = 0.0;
     float SumInner = 0.0;
@@ -255,5 +260,5 @@
 
 	psF32 yDiff = row - yCM;
-	if (fabs(yDiff) > radKron) continue;
+	if (fabs(yDiff) > radKouter) continue;
 
 	psF32 *vPix = source->pixels->data.F32[row];
@@ -272,5 +277,5 @@
 
 	    psF32 xDiff = col - xCM;
-	    if (fabs(xDiff) > radKron) continue;
+	    if (fabs(xDiff) > radKouter) continue;
 
 	    // radKron is just a function of (xDiff, yDiff)
@@ -293,16 +298,28 @@
 	    }
 
+	    // use sigma (fixed by psf) not a radKron based value
+	    if (r < sigma) {
+		SumCore += pDiff;
+		VarCore += wDiff;
+		nCorePix ++;
+	    }
+
 	    if ((r > radKinner) && (r < radKron)) {
 		SumInner += pDiff;
+		nInner ++;
 	    }
 	    if ((r > radKron)  && (r < radKouter)) {
 		SumOuter += pDiff;
+		nOuter ++;
 	    }
 	}
     }
-    source->moments->KronFlux = Sum;
-    source->moments->KronFinner = SumInner;
-    source->moments->KronFouter = SumOuter;
-    source->moments->KronFluxErr = sqrt(Var);
+    // *** should I rescale these fluxes by pi R^2 / nNpix?
+    source->moments->KronCore    = SumCore       * M_PI * PS_SQR(sigma) / nCorePix;
+    source->moments->KronCoreErr = sqrt(VarCore) * M_PI * PS_SQR(sigma) / nCorePix;
+    source->moments->KronFlux    = Sum       * M_PI * PS_SQR(radKron) / nKronPix;
+    source->moments->KronFluxErr = sqrt(Var) * M_PI * PS_SQR(radKron) / nKronPix;
+    source->moments->KronFinner = SumInner * M_PI * (PS_SQR(radKron)   - PS_SQR(radKinner)) / nInner;
+    source->moments->KronFouter = SumOuter * M_PI * (PS_SQR(radKouter) -   PS_SQR(radKron)) / nOuter;
 
     psTrace ("psModules.objects", 4, "Mrf: %f  KronFlux: %f  Mxx: %f  Mxy: %f  Myy: %f  Mxxx: %f  Mxxy: %f  Mxyy: %f  Myyy: %f  Mxxxx: %f  Mxxxy: %f  Mxxyy: %f  Mxyyy: %f  Mxyyy: %f\n",
@@ -313,5 +330,5 @@
 
     psTrace ("psModules.objects", 3, "peak %f %f (%f = %f) Mx: %f  My: %f  Sum: %f  Mxx: %f  Mxy: %f  Myy: %f  sky: %f  Npix: %d\n",
-	     source->peak->xf, source->peak->yf, source->peak->flux, source->peak->SN, source->moments->Mx,   source->moments->My, Sum, source->moments->Mxx,   source->moments->Mxy,   source->moments->Myy, sky, source->moments->nPixels);
+	     source->peak->xf, source->peak->yf, source->peak->rawFlux, sqrt(source->peak->detValue), source->moments->Mx,   source->moments->My, Sum, source->moments->Mxx,   source->moments->Mxy,   source->moments->Myy, sky, source->moments->nPixels);
 
     return(true);
