Index: trunk/psModules/src/objects/pmSource.c
===================================================================
--- trunk/psModules/src/objects/pmSource.c	(revision 23989)
+++ trunk/psModules/src/objects/pmSource.c	(revision 24317)
@@ -480,14 +480,14 @@
 
         if (!psVectorStats (stats, tmpSx, NULL, NULL, 0)) {
-	    psError(PS_ERR_UNKNOWN, false, "failed to measure Sx stats");
+            psError(PS_ERR_UNKNOWN, false, "failed to measure Sx stats");
             return (emptyClump);
-	}
+        }
         psfClump.X  = stats->clippedMean;
         psfClump.dX = stats->clippedStdev;
 
         if (!psVectorStats (stats, tmpSy, NULL, NULL, 0)) {
-	    psError(PS_ERR_UNKNOWN, false, "failed to measure Sy stats");
+            psError(PS_ERR_UNKNOWN, false, "failed to measure Sy stats");
             return (emptyClump);
-	}
+        }
         psfClump.Y  = stats->clippedMean;
         psfClump.dY = stats->clippedStdev;
@@ -549,12 +549,12 @@
         pmSource *source = (pmSource *) sources->data[i];
 
-	// psf clumps are found for image subregions:
-	// skip sources not in this region 
+        // psf clumps are found for image subregions:
+        // skip sources not in this region
         if (source->peak->x <  region->x0) continue;
         if (source->peak->x >= region->x1) continue;
         if (source->peak->y <  region->y0) continue;
-	if (source->peak->y >= region->y1) continue;
-
-	// should be set by pmSourceAlloc
+        if (source->peak->y >= region->y1) continue;
+
+        // should be set by pmSourceAlloc
         psAssert (source->type == PM_SOURCE_TYPE_UNKNOWN, "source type was not init-ed?");
 
@@ -562,5 +562,5 @@
         if (!source->moments) {
             source->type = PM_SOURCE_TYPE_STAR;
-	    psAssert (source->mode & noMoments, "why is this source missing moments?");
+            psAssert (source->mode & noMoments, "why is this source missing moments?");
             Nstar++;
             continue;
@@ -596,36 +596,38 @@
         }
 
-        // likely defect (too small to be stellar) (push out to 3 sigma)
-        // low S/N objects which are small are probably stellar
-        // only set candidate defects if
-        // XXX these limits are quite arbitrary
-        if ((sigX < 0.05) || (sigY < 0.05)) {
-            source->type = PM_SOURCE_TYPE_DEFECT;
-            source->mode |= PM_SOURCE_MODE_DEFECT;
-            Ncr ++;
-            continue;
-        }
-
-        // likely unsaturated extended source (too large to be stellar)
-        if ((sigX > (clump.X + 3*clump.dX)) || (sigY > (clump.Y + 3*clump.dY))) {
-            source->type = PM_SOURCE_TYPE_EXTENDED;
-            Next ++;
-            continue;
-        }
-
-        // the rest are probable stellar objects
-        starsn_moments->data.F32[starsn_moments->n] = source->moments->SN;
-        starsn_moments->n ++;
-        starsn_peaks->data.F32[starsn_peaks->n] = source->peak->SN;
-        starsn_peaks->n ++;
-        Nstar ++;
-
-        // PSF star (within 1.5 sigma of clump center, S/N > limit)
-        psF32 radius = hypot ((sigX-clump.X)/clump.dX, (sigY-clump.Y)/clump.dY);
-        if ((source->moments->SN > PSF_SN_LIM) && (radius < PSF_CLUMP_NSIGMA)) {
-            source->type = PM_SOURCE_TYPE_STAR;
-            source->mode |= PM_SOURCE_MODE_PSFSTAR;
-            Npsf ++;
-            continue;
+        // The following determinations require the use of moments
+        if (!(source->mode & noMoments)) {
+            // likely defect (too small to be stellar) (push out to 3 sigma)
+            // low S/N objects which are small are probably stellar
+            // XXX these limits are quite arbitrary
+            if (sigX < 0.05 || sigY < 0.05) {
+                source->type = PM_SOURCE_TYPE_DEFECT;
+                source->mode |= PM_SOURCE_MODE_DEFECT;
+                Ncr ++;
+                continue;
+            }
+
+            // likely unsaturated extended source (too large to be stellar)
+            if (sigX > clump.X + 3*clump.dX || sigY > clump.Y + 3*clump.dY) {
+                source->type = PM_SOURCE_TYPE_EXTENDED;
+                Next ++;
+                continue;
+            }
+
+            // the rest are probable stellar objects
+            starsn_moments->data.F32[starsn_moments->n] = source->moments->SN;
+            starsn_moments->n ++;
+            starsn_peaks->data.F32[starsn_peaks->n] = source->peak->SN;
+            starsn_peaks->n ++;
+            Nstar ++;
+
+            // PSF star (within 1.5 sigma of clump center, S/N > limit)
+            psF32 radius = hypot ((sigX-clump.X)/clump.dX, (sigY-clump.Y)/clump.dY);
+            if ((source->moments->SN > PSF_SN_LIM) && (radius < PSF_CLUMP_NSIGMA)) {
+                source->type = PM_SOURCE_TYPE_STAR;
+                source->mode |= PM_SOURCE_MODE_PSFSTAR;
+                Npsf ++;
+                continue;
+            }
         }
 
@@ -642,8 +644,8 @@
 
         if (!psVectorStats (stats, starsn_moments, NULL, NULL, 0)) {
-	    psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
-	    psFree (stats);
-	    psFree (starsn_peaks);
-	    return false;
+            psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
+            psFree (stats);
+            psFree (starsn_peaks);
+            return false;
         }
         psLogMsg ("pmObjects", 3, "SN range (moments): %f - %f\n", stats->min, stats->max);
@@ -656,8 +658,8 @@
         stats = psStatsAlloc (PS_STAT_MIN | PS_STAT_MAX);
         if (!psVectorStats (stats, starsn_peaks, NULL, NULL, 0)) {
-	    psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
-	    psFree (stats);
-	    psFree (starsn_peaks);
-	    return false;
+            psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
+            psFree (stats);
+            psFree (starsn_peaks);
+            return false;
         }
         psLogMsg ("psModules.objects", 3, "SN range (peaks)  : %f - %f (%ld)\n",
