Index: trunk/psModules/src/objects/pmSource.c
===================================================================
--- trunk/psModules/src/objects/pmSource.c	(revision 6874)
+++ trunk/psModules/src/objects/pmSource.c	(revision 6905)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-17 18:01:05 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-04-19 20:29:57 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,5 @@
 #include "pmHDU.h"
 #include "pmFPA.h"
+#include "pmMaskBadPixels.h"
 #include "pmPeaks.h"
 #include "pmMoments.h"
@@ -164,4 +165,8 @@
         if (!status)
             SY_MAX = 10.0;
+        psF32 AR_MAX = psMetadataLookupF32 (&status, metadata, "MOMENTS_AR_MAX");
+        if (!status)
+            AR_MAX =  3.0;
+        psF32 AR_MIN = 1.0 / AR_MAX;
 
         // construct a sigma-plane image
@@ -185,5 +190,14 @@
 
             // Sx,Sy are limited at 0.  a peak at 0,0 is artificial
-            if ((fabs(tmpSrc->moments->Sx) < FLT_EPSILON) && (fabs(tmpSrc->moments->Sy) < FLT_EPSILON)) {
+            if (fabs(tmpSrc->moments->Sx) < 0.05) {
+                continue;
+            }
+            if (fabs(tmpSrc->moments->Sy) < 0.05) {
+                continue;
+            }
+            if ((tmpSrc->moments->Sx / tmpSrc->moments->Sy) > AR_MAX) {
+                continue;
+            }
+            if ((tmpSrc->moments->Sx / tmpSrc->moments->Sy) < AR_MIN) {
                 continue;
             }
@@ -341,5 +355,5 @@
         // inner = psRegionForSquare (tmpSrc->peak->x - tmpSrc->mask->col0, tmpSrc->peak->y - tmpSrc->mask->row0, 2);
         inner = psRegionForSquare (tmpSrc->peak->x, tmpSrc->peak->y, 2);
-        int Nsatpix = psImageCountPixelMask (tmpSrc->mask, inner, PM_SOURCE_MASK_SATURATED);
+        int Nsatpix = psImageCountPixelMask (tmpSrc->mask, inner, PM_MASK_SAT);
 
         // saturated star (size consistent with PSF or larger)
Index: trunk/psModules/src/objects/pmSource.h
===================================================================
--- trunk/psModules/src/objects/pmSource.h	(revision 6874)
+++ trunk/psModules/src/objects/pmSource.h	(revision 6905)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA; GLG, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-17 18:01:05 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-04-19 20:29:57 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -20,5 +20,6 @@
  * outside of the PSPHOT code.  Perhaps we can set up a registered set of mask
  * values with specific meanings that other functions can add to or define?
- */
+ 
+ * XXX We will only use the PM_MASK_xxx mask values
 typedef enum {
     PM_SOURCE_MASK_CLEAR     = 0x00,
@@ -27,4 +28,5 @@
     PM_SOURCE_MASK_MARKED    = 0x08,
 } psphotMaskValues;
+*/
 
 /** pmSourceType enumeration
