Index: trunk/psphot/src/psphotModelTest.c
===================================================================
--- trunk/psphot/src/psphotModelTest.c	(revision 13035)
+++ trunk/psphot/src/psphotModelTest.c	(revision 13900)
@@ -3,5 +3,5 @@
 
 // XXX consider this function : add more test information?
-bool psphotModelTest (pmReadout *readout, psMetadata *recipe) {
+bool psphotModelTest (pmReadout *readout, psMetadata *recipe, psMaskType maskVal, psMaskType mark) {
 
     bool status;
@@ -94,5 +94,5 @@
 
     // find the local sky
-    status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER);
+    status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark);
     if (!status) psAbort("pmSourceLocalSky error");
 
@@ -159,17 +159,17 @@
 
     // define the pixels used for the fit
-    psImageKeepCircle (source->maskObj, xObj, yObj, RADIUS, "OR", PM_MASK_MARK);
+    psImageKeepCircle (source->maskObj, xObj, yObj, RADIUS, "OR", mark);
 
     char *fitset = psMetadataLookupStr (&status, recipe, "TEST_FIT_SET");
     if (status) {
-        status = psphotFitSet (source, model, fitset, fitMode);
+        status = psphotFitSet (source, model, fitset, fitMode, maskVal);
         exit (0);
     }
 
-    status = pmSourceFitModel (source, model, fitMode);
+    status = pmSourceFitModel (source, model, fitMode, maskVal);
 
     // measure the source mags
     pmSourcePhotometryModel (&fitMag, model);
-    pmSourcePhotometryAper  (&obsMag, model, source->pixels, source->maskObj);
+    pmSourcePhotometryAper  (&obsMag, model, source->pixels, source->maskObj, maskVal);
     fprintf (stderr, "ap: %f, fit: %f, apmifit: %f\n", obsMag, fitMag, obsMag - fitMag);
 
@@ -178,5 +178,5 @@
 
     // subtract object, leave local sky
-    pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL);
+    pmModelSub (source->pixels, source->maskObj, model, PM_MODEL_OP_FULL, maskVal);
 
     fprintf (stderr, "output parameters: \n");
