Index: trunk/psphot/src/psphotSourceFits.c
===================================================================
--- trunk/psphot/src/psphotSourceFits.c	(revision 19869)
+++ trunk/psphot/src/psphotSourceFits.c	(revision 19881)
@@ -218,5 +218,5 @@
     if (source->type == PM_SOURCE_TYPE_DEFECT) return false;
     if (source->type == PM_SOURCE_TYPE_SATURATED) return false;
-    if (source->moments->SN < EXT_MIN_SN) return false;
+    if (source->peak->SN < EXT_MIN_SN) return false;
 
     // recalculate the source moments using the larger extended-source moments radius
@@ -331,8 +331,12 @@
     maskVal |= markVal;
 
+    // XXX this is really poor: if we don't have moments for the source, we have no guess.
+    // force the measurement?
+    psAssert (source->moments, "moments are re-calculated for any extended source");
+	
     // make a guess at the position of the two sources
-    moments.x2 = source->moments->Sx;
-    moments.y2 = source->moments->Sy;
-    moments.xy = source->moments->Sxy;
+    moments.x2 = source->moments->Mxx;
+    moments.xy = source->moments->Mxy;
+    moments.y2 = source->moments->Myy;
     axes = psEllipseMomentsToAxes (moments, 20.0);
 
@@ -380,6 +384,6 @@
     psphotCheckRadiusEXT (readout, source, EXT, markVal);
 
-    if ((source->moments->Sx < 1e-3) || (source->moments->Sx < 1e-3)) {
-        psTrace ("psphot", 5, "problem source: moments: %f %f\n", source->moments->Sx, source->moments->Sy);
+    if ((source->moments->Mxx < 1e-3) || (source->moments->Myy < 1e-3)) {
+        psTrace ("psphot", 5, "problem source: moments: %f %f\n", source->moments->Mxx, source->moments->Myy);
     }
 
