Index: trunk/psModules/src/objects/pmSourcePhotometry.c
===================================================================
--- trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 19905)
+++ trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 20077)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA; GLG, MHPCC
  *
- *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-10-06 13:03:40 $
+ *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-10-13 01:59:05 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -141,7 +141,19 @@
     }
 
-    if (!isfinite(SN) || (SN < AP_MIN_SN)) {
+    // measure the contribution of included pixels
+    if (mode & PM_SOURCE_PHOT_WEIGHT) {
+        pmSourcePixelWeight (&source->pixWeight, model, source->pixels, source->maskObj, maskVal);
+    }
+
+    // measure the aperture magnitude, if (SN > AP_MIN_SN)
+    if (!isfinite(SN)) {
         psTrace ("psModules.objects", 3, "fail mag : bad SN: %f (limit: %f)", SN, AP_MIN_SN);
         return false;
+    }
+
+    // measure the aperture magnitude, if (SN > AP_MIN_SN)
+    if (SN < AP_MIN_SN) {
+        psTrace ("psModules.objects", 3, "skip ap mag : SN < limit : %f vs %f)", SN, AP_MIN_SN);
+        return true;
     }
 
@@ -230,9 +242,4 @@
     }
 
-    // measure the contribution of included pixels
-    if (mode & PM_SOURCE_PHOT_WEIGHT) {
-        pmSourcePixelWeight (&source->pixWeight, model, source->pixels, source->maskObj, maskVal);
-    }
-
     // measure object aperture photometry
     status = pmSourcePhotometryAper  (&source->apMag, model, flux, mask, maskVal);
