Index: trunk/psModules/src/objects/pmPSF.c
===================================================================
--- trunk/psModules/src/objects/pmPSF.c	(revision 15983)
+++ trunk/psModules/src/objects/pmPSF.c	(revision 18554)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-01-02 20:41:55 $
+ *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-07-15 20:25:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -404,5 +404,5 @@
 
 // we generate the growth curve for the center of the image with the specified psf model
-bool pmGrowthCurveGenerate (pmReadout *readout, pmPSF *psf, bool ignore, psMaskType maskVal, psMaskType mark)
+bool pmGrowthCurveGenerate (pmReadout *readout, pmPSF *psf, bool ignore, psMaskType maskVal, psMaskType markVal)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -416,4 +416,7 @@
     // create template model
     pmModel *modelRef = pmModelAlloc(psf->type);
+
+    // maskVal is used to test for rejected pixels, and must include markVal
+    maskVal |= markVal;
 
     // use the center of the center pixel of the image
@@ -465,5 +468,5 @@
 
         // mask the given aperture and measure the apMag
-        psImageKeepCircle (mask, xc, yc, radius, "OR", mark);
+        psImageKeepCircle (mask, xc, yc, radius, "OR", markVal);
         if (!pmSourcePhotometryAper (&apMag, model, image, mask, maskVal)) {
             psError(PM_ERR_PHOTOM, false, "Measuring apMag for radius == %g", radius);
@@ -473,7 +476,5 @@
             break;
         }
-
-        // XXX since we re-mask on each pass, this could be dropped.
-        psImageKeepCircle (mask, xc, yc, radius, "AND", PS_NOT_U8(mark));
+        psImageKeepCircle (mask, xc, yc, radius, "AND", PS_NOT_U8(markVal));
 
         // the 'ignore' mode is for testing
