Index: trunk/psphot/src/psphotFitSet.c
===================================================================
--- trunk/psphot/src/psphotFitSet.c	(revision 12792)
+++ trunk/psphot/src/psphotFitSet.c	(revision 13035)
@@ -1,5 +1,5 @@
 # include "psphotInternal.h"
 
-// XXX this is not used in main psphot code
+// This is not used in main psphot code (only in psphotModelTest.c)
 bool psphotFitSet (pmSource *source, pmModel *oneModel, char *fitset, pmSourceFitMode mode) {
 
@@ -24,4 +24,5 @@
     }
 
+    // XXX pmSourceFitSet must cache the modelFlux?
     pmSourceFitSet (source, modelSet, mode);
 
@@ -32,5 +33,5 @@
     for (int i = 0; i < modelSet->n; i++) {
         pmModel *model = modelSet->data[i];
-        pmModelSub (source->pixels, source->mask, model, false, false);
+        pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
 
         fprintf (stderr, "output parameters (obj %d):\n", i);
@@ -42,5 +43,5 @@
     // write out
     psphotSaveImage (NULL, source->pixels, "resid.fits");
-    psphotSaveImage (NULL, source->mask, "mask.fits");
+    psphotSaveImage (NULL, source->maskObj, "mask.fits");
     return true;
 }
