Index: trunk/psModules/src/objects/pmSource.c
===================================================================
--- trunk/psModules/src/objects/pmSource.c	(revision 20937)
+++ trunk/psModules/src/objects/pmSource.c	(revision 21183)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-12-08 02:51:14 $
+ *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-01-27 06:39:38 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -171,5 +171,5 @@
 
     // the maskObj is a unique mask array; create a new mask image
-    source->maskObj = in->maskObj ? psImageCopy (NULL, in->maskObj, PS_TYPE_MASK) : NULL;
+    source->maskObj = in->maskObj ? psImageCopy (NULL, in->maskObj, PS_TYPE_IMAGE_MASK) : NULL;
 
     source->type = in->type;
@@ -205,5 +205,5 @@
         mySource->maskView = psImageSubset(readout->mask,  srcRegion);
         // the object mask is a copy, and used to define the source pixels
-        mySource->maskObj = psImageCopy(NULL, mySource->maskView, PS_TYPE_MASK);
+        mySource->maskObj = psImageCopy(NULL, mySource->maskView, PS_TYPE_IMAGE_MASK);
     }
     mySource->region   = srcRegion;
@@ -255,5 +255,5 @@
         // re-copy the main mask pixels.  NOTE: the user will need to reset the object mask
         // pixels (eg, with psImageKeepCircle)
-        mySource->maskObj = psImageCopy (mySource->maskObj, mySource->maskView, PS_TYPE_MASK);
+        mySource->maskObj = psImageCopy (mySource->maskObj, mySource->maskView, PS_TYPE_IMAGE_MASK);
 
         // drop the old modelFlux pixels and force the user to re-create
@@ -505,5 +505,5 @@
 *****************************************************************************/
 
-bool pmSourceRoughClass(psRegion *region, psArray *sources, psMetadata *recipe, pmPSFClump clump, psMaskType maskSat)
+bool pmSourceRoughClass(psRegion *region, psArray *sources, psMetadata *recipe, pmPSFClump clump, psImageMaskType maskSat)
 {
     psTrace("psModules.objects", 5, "---- begin ----");
@@ -738,5 +738,5 @@
         psF32 *vPix = source->pixels->data.F32[row];
         psF32 *vWgt = source->weight->data.F32[row];
-        psU8  *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.U8[row];
+        psImageMaskType *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row];
 
         for (psS32 col = 0; col < source->pixels->numCols ; col++, vPix++, vWgt++) {
@@ -848,5 +848,5 @@
 # endif
 // construct a realization of the source model
-bool pmSourceCacheModel (pmSource *source, psMaskType maskVal) {
+bool pmSourceCacheModel (pmSource *source, psImageMaskType maskVal) {
     PS_ASSERT_PTR_NON_NULL(source, false);
     // select appropriate model
@@ -867,5 +867,5 @@
 // construct a realization of the source model
 // XXX this function should optionally save an existing psf image from modelFlux
-bool pmSourceCachePSF (pmSource *source, psMaskType maskVal) {
+bool pmSourceCachePSF (pmSource *source, psImageMaskType maskVal) {
     PS_ASSERT_PTR_NON_NULL(source, false);
 
@@ -885,5 +885,5 @@
 
 // should we call pmSourceCacheModel if it does not exist?
-bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add, psMaskType maskVal, int dx, int dy)
+bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add, psImageMaskType maskVal, int dx, int dy)
 {
     PS_ASSERT_PTR_NON_NULL(source, false);
@@ -915,7 +915,7 @@
         }
 
-        psU8 **mask = NULL;
+        psImageMaskType **mask = NULL;
         if (source->maskObj) {
-            mask = source->maskObj->data.U8;
+            mask = source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA;
         }
 
@@ -957,17 +957,17 @@
 }
 
-bool pmSourceAdd (pmSource *source, pmModelOpMode mode, psMaskType maskVal) {
+bool pmSourceAdd (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal) {
     return pmSourceOp (source, mode, true, maskVal, 0, 0);
 }
 
-bool pmSourceSub (pmSource *source, pmModelOpMode mode, psMaskType maskVal) {
+bool pmSourceSub (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal) {
     return pmSourceOp (source, mode, false, maskVal, 0, 0);
 }
 
-bool pmSourceAddWithOffset (pmSource *source, pmModelOpMode mode, psMaskType maskVal, int dx, int dy) {
+bool pmSourceAddWithOffset (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal, int dx, int dy) {
     return pmSourceOp (source, mode, true, maskVal, dx, dy);
 }
 
-bool pmSourceSubWithOffset (pmSource *source, pmModelOpMode mode, psMaskType maskVal, int dx, int dy) {
+bool pmSourceSubWithOffset (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal, int dx, int dy) {
     return pmSourceOp (source, mode, false, maskVal, dx, dy);
 }
