Index: trunk/psphot/src/psphotReplaceUnfit.c
===================================================================
--- trunk/psphot/src/psphotReplaceUnfit.c	(revision 20453)
+++ trunk/psphot/src/psphotReplaceUnfit.c	(revision 21183)
@@ -2,5 +2,5 @@
 
 // replace the flux for sources which failed
-bool psphotReplaceUnfitSources (psArray *sources, psMaskType maskVal) {
+bool psphotReplaceUnfitSources (psArray *sources, psImageMaskType maskVal) {
 
     pmSource *source;
@@ -31,5 +31,5 @@
 
     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
-    psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
+    psImageMaskType maskVal = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
     assert (maskVal);
 
@@ -55,5 +55,5 @@
 
     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
-    psMaskType maskVal = psMetadataLookupU8(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
+    psImageMaskType maskVal = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
     assert (maskVal);
 
@@ -72,5 +72,5 @@
 
 // add source, if the source has been subtracted; do not modify state
-bool psphotAddWithTest (pmSource *source, bool useState, psMaskType maskVal) {
+bool psphotAddWithTest (pmSource *source, bool useState, psImageMaskType maskVal) {
 
     // what is current state? (true : add; false : sub)
@@ -83,5 +83,5 @@
 
 // sub source, if the source has been added; do not modify state
-bool psphotSubWithTest (pmSource *source, bool useState, psMaskType maskVal) {
+bool psphotSubWithTest (pmSource *source, bool useState, psImageMaskType maskVal) {
 
     // what is current state? (true : sub; false : add)
@@ -94,5 +94,5 @@
 
 // add or sub source to match recorded state: supply current state as true (add) or false (sub)
-bool psphotSetState (pmSource *source, bool curState, psMaskType maskVal) {
+bool psphotSetState (pmSource *source, bool curState, psImageMaskType maskVal) {
 
     // what is desired state? (true : add; false : sub)
