Index: trunk/psModules/src/camera/pmCellSquish.c
===================================================================
--- trunk/psModules/src/camera/pmCellSquish.c	(revision 21104)
+++ trunk/psModules/src/camera/pmCellSquish.c	(revision 21183)
@@ -12,5 +12,5 @@
 
 
-bool pmCellSquish(pmCell *cell, psMaskType maskVal, bool useShifts)
+bool pmCellSquish(pmCell *cell, psImageMaskType maskVal, bool useShifts)
 {
     PS_ASSERT_PTR_NON_NULL(cell, false);
@@ -116,5 +116,5 @@
     psImage *squishImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); // Squished image
     psImageInit(squishImage, 0.0);
-    psImage *squishMask = psImageAlloc(numCols, numRows, PS_TYPE_MASK); // Squished mask
+    psImage *squishMask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); // Squished mask
     psImageInit(squishMask, 0);
 
@@ -159,5 +159,5 @@
                 squishImage->data.F32[ySquish][xSquish] += image->data.F32[y][x];
                 if (mask) {
-                    squishMask->data.PS_TYPE_MASK_DATA[ySquish][xSquish] |= mask->data.U8[y][x] & maskVal;
+                    squishMask->data.PS_TYPE_IMAGE_MASK_DATA[ySquish][xSquish] |= mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal;
                 }
             }
Index: trunk/psModules/src/camera/pmCellSquish.h
===================================================================
--- trunk/psModules/src/camera/pmCellSquish.h	(revision 21104)
+++ trunk/psModules/src/camera/pmCellSquish.h	(revision 21183)
@@ -7,5 +7,5 @@
 /// already have been read) and masks.
 bool pmCellSquish(pmCell *cell,         ///< Cell to have readouts combined
-                  psMaskType maskVal,   ///< Value to be masked
+                  psImageMaskType maskVal,   ///< Value to be masked
                   bool useShifts        ///< Use the shifts when squishing?
     );
Index: trunk/psModules/src/camera/pmFPABin.c
===================================================================
--- trunk/psModules/src/camera/pmFPABin.c	(revision 21104)
+++ trunk/psModules/src/camera/pmFPABin.c	(revision 21183)
@@ -9,5 +9,5 @@
 #include "pmFPABin.h"
 
-bool pmReadoutRebin(pmReadout *out, const pmReadout *in, psMaskType maskVal, int xBin, int yBin)
+bool pmReadoutRebin(pmReadout *out, const pmReadout *in, psImageMaskType maskVal, int xBin, int yBin)
 {
     PM_ASSERT_READOUT_NON_NULL(out, false);
@@ -50,5 +50,5 @@
             for (int y = yStart; y < yStop; y++) {
                 for (int x = xStart; x < xStop; x++) {
-                    if (inMask && (inMask->data.PS_TYPE_MASK_DATA[y][x] & maskVal)) {
+                    if (inMask && (inMask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal)) {
                         continue;
                     }
Index: trunk/psModules/src/camera/pmFPABin.h
===================================================================
--- trunk/psModules/src/camera/pmFPABin.h	(revision 21104)
+++ trunk/psModules/src/camera/pmFPABin.h	(revision 21183)
@@ -9,5 +9,5 @@
 bool pmReadoutRebin(pmReadout *out,     ///< Output readout
                     const pmReadout *in,///< Input readout
-                    psMaskType maskVal, ///< Value to mask
+                    psImageMaskType maskVal, ///< Value to mask
                     int xBin, int yBin  ///< Binning factors in x and y
     );
Index: trunk/psModules/src/camera/pmFPAMaskWeight.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 21104)
+++ trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 21183)
@@ -42,5 +42,5 @@
             continue;
         }
-        masks->data[i] = psImageAlloc(image->numCols, image->numRows, PS_TYPE_U8);
+        masks->data[i] = psImageAlloc(image->numCols, image->numRows, PS_TYPE_IMAGE_MASK);
         psImageInit(masks->data[i], 0);
     }
@@ -98,5 +98,5 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-bool pmReadoutSetMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
+bool pmReadoutSetMask(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -124,5 +124,5 @@
     if (!readout->mask) {
         // Generate a (throwaway) mask image, if required
-        readout->mask = psImageAlloc(image->numCols, image->numRows, PS_TYPE_U8);
+        readout->mask = psImageAlloc(image->numCols, image->numRows, PS_TYPE_IMAGE_MASK);
     }
     psImage *mask = readout->mask;      // The mask pixels
@@ -131,5 +131,5 @@
     // Dereference pointers for speed
     psF32 **imageData = image->data.F32;// The image
-    psU8  **maskData  = mask->data.U8;  // The mask
+    psImageMaskType **maskData = mask->data.PS_TYPE_IMAGE_MASK_DATA;  // The mask
 
     for (int i = 0; i < image->numRows; i++) {
@@ -153,5 +153,5 @@
 // pixels.  currently, it will set mask bits if (value <= BAD) or (value >= SATURATION)
 // should we optionally ignore these tests?
-bool pmReadoutGenerateMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
+bool pmReadoutGenerateMask(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -294,5 +294,5 @@
 }
 
-bool pmReadoutGenerateMaskWeight(pmReadout *readout, psMaskType satMask, psMaskType badMask, bool poisson)
+bool pmReadoutGenerateMaskWeight(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask, bool poisson)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -306,5 +306,5 @@
 }
 
-bool pmCellGenerateMaskWeight(pmCell *cell, psMaskType satMask, psMaskType badMask, bool poisson)
+bool pmCellGenerateMaskWeight(pmCell *cell, psImageMaskType satMask, psImageMaskType badMask, bool poisson)
 {
     PS_ASSERT_PTR_NON_NULL(cell, false);
@@ -321,5 +321,5 @@
 
 
-bool pmReadoutWeightRenormPixels(const pmReadout *readout, psMaskType maskVal,
+bool pmReadoutWeightRenormPixels(const pmReadout *readout, psImageMaskType maskVal,
                                  psStatsOptions meanStat, psStatsOptions stdevStat, psRandom *rng)
 {
@@ -363,5 +363,5 @@
 
 
-bool pmReadoutWeightRenormPhot(const pmReadout *readout, psMaskType maskVal, int num, float width,
+bool pmReadoutWeightRenormPhot(const pmReadout *readout, psImageMaskType maskVal, int num, float width,
                                psStatsOptions meanStat, psStatsOptions stdevStat, psRandom *rng)
 {
@@ -411,5 +411,5 @@
     psVector *source = psVectorAlloc(num, PS_TYPE_F32); // Measurements of fake sources
     psVector *guess = psVectorAlloc(num, PS_TYPE_F32); // Guess at significance
-    psVector *photMask = psVectorAlloc(num, PS_TYPE_MASK); // Mask for fluxes
+    psVector *photMask = psVectorAlloc(num, PS_TYPE_VECTOR_MASK); // Mask for fluxes
     for (int i = 0; i < num; i++) {
         // Coordinates of interest
@@ -433,5 +433,5 @@
             float yGauss = gauss->data.F32[v]; // Value of Gaussian in y
             for (int u = 0, x = xPix - size; u < fullSize; u++, x++) {
-                if (mask && mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal) {
+                if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) {
                     continue;
                 }
@@ -453,5 +453,5 @@
         }
 
-        photMask->data.PS_TYPE_MASK_DATA[i] = ((isfinite(sumNoise) && isfinite(sumSource) &&
+        photMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = ((isfinite(sumNoise) && isfinite(sumSource) &&
                                                 isfinite(sumWeight) && sumGauss > 0 && sumGauss2 > 0) ?
                                                0 : 0xFF);
@@ -493,5 +493,5 @@
         ratio->data.F32[i] = measuredSig / guess->data.F32[i];
         if (guess->data.F32[i] <= 0.0 || source->data.F32[i] <= 0.0 || !isfinite(ratio->data.F32[i])) {
-            photMask->data.PS_TYPE_MASK_DATA[i] = 0xFF;
+            photMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = 0xFF;
         }
         psTrace("psModules.camera", 9, "Ratio %d: %f, %f, %f\n",
@@ -523,5 +523,5 @@
 
 
-bool pmReadoutWeightRenorm(const pmReadout *readout, psMaskType maskVal, psStatsOptions meanStat,
+bool pmReadoutWeightRenorm(const pmReadout *readout, psImageMaskType maskVal, psStatsOptions meanStat,
                            psStatsOptions stdevStat, int width, psRandom *rng)
 {
@@ -591,5 +591,5 @@
 
 
-bool pmReadoutMaskNonfinite(pmReadout *readout, psMaskType maskVal)
+bool pmReadoutMaskNonfinite(pmReadout *readout, psImageMaskType maskVal)
 {
     PM_ASSERT_READOUT_NON_NULL(readout, false);
@@ -601,5 +601,5 @@
 
     if (!readout->mask) {
-        readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
+        readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
     }
     psImage *mask = readout->mask;      // Readout's mask
@@ -608,5 +608,5 @@
         for (int x = 0; x < numCols; x++) {
             if (!isfinite(image->data.F32[y][x]) || (weight && !isfinite(weight->data.F32[y][x]))) {
-                mask->data.PS_TYPE_MASK_DATA[y][x] |= maskVal;
+                mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskVal;
             }
         }
@@ -618,5 +618,5 @@
 
 
-bool pmReadoutMaskApply(pmReadout *readout, psMaskType maskVal)
+bool pmReadoutMaskApply(pmReadout *readout, psImageMaskType maskVal)
 {
     PM_ASSERT_READOUT_NON_NULL(readout, false);
@@ -625,5 +625,5 @@
 
     int numCols = readout->image->numCols, numRows = readout->image->numRows; // Size of image
-    psMaskType **maskData = readout->mask->data.PS_TYPE_MASK_DATA; // Dereference mask
+    psImageMaskType **maskData = readout->mask->data.PS_TYPE_IMAGE_MASK_DATA; // Dereference mask
     psF32 **imageData = readout->image->data.F32;// Dereference image
     psF32 **weightData = readout->weight ? readout->weight->data.F32 : NULL; // Dereference weight map
@@ -644,6 +644,6 @@
 
 
-bool pmReadoutInterpolateBadPixels(pmReadout *readout, psMaskType maskVal, psImageInterpolateMode mode,
-                                   float poorFrac, psMaskType maskPoor, psMaskType maskBad)
+bool pmReadoutInterpolateBadPixels(pmReadout *readout, psImageMaskType maskVal, psImageInterpolateMode mode,
+                                   float poorFrac, psImageMaskType maskPoor, psImageMaskType maskBad)
 {
     PM_ASSERT_READOUT_NON_NULL(readout, false);
@@ -667,14 +667,15 @@
     psVector *imagePix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_F32); // Corresponding values for image
     psVector *weightPix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_F32); // Corresponding values for weight
-    psVector *maskPix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_MASK); // Corresponding values for mask
+    psVector *maskPix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_IMAGE_MASK); // Corresponding values for mask
+    // NOTE: maskPix carries the actual image mask values -- do NOT use
+    // PS_TYPE_VECTOR_MASK here; it is storage, and is not treated as a vector mask
 
     long numBad = 0;                    // Number of bad pixels interpolated
     for (int y = 0; y < numRows; y++) {
         for (int x = 0; x < numCols; x++) {
-            if (mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal) {
+            if (mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) {
                 double imageValue, weightValue; // Image and weight value from interpolation
-                psMaskType maskValue = 0; // Mask value from interpolation
-                psImageInterpolateStatus status = psImageInterpolate(&imageValue, &weightValue, &maskValue,
-                                                                     x, y, interp);
+                psImageMaskType maskValue = 0; // Mask value from interpolation
+                psImageInterpolateStatus status = psImageInterpolate(&imageValue, &weightValue, &maskValue, x, y, interp);
                 if (status == PS_INTERPOLATE_STATUS_ERROR || status == PS_INTERPOLATE_STATUS_OFF) {
                     psError(PS_ERR_UNKNOWN, false, "Unable to interpolate readout at %d,%d", x, y);
@@ -697,5 +698,5 @@
                 imagePix->data.F32[numBad] = imageValue;
                 weightPix->data.F32[numBad] = weightValue;
-                maskPix->data.PS_TYPE_MASK_DATA[numBad] = maskValue;
+                maskPix->data.PS_TYPE_IMAGE_MASK_DATA[numBad] = maskValue;
                 numBad++;
             }
@@ -709,5 +710,5 @@
         image->data.F32[y][x] = imagePix->data.F32[i];
         weight->data.F32[y][x] = weightPix->data.F32[i];
-        mask->data.PS_TYPE_MASK_DATA[y][x] = maskPix->data.PS_TYPE_MASK_DATA[i];
+        mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = maskPix->data.PS_TYPE_IMAGE_MASK_DATA[i];
     }
 
Index: trunk/psModules/src/camera/pmFPAMaskWeight.h
===================================================================
--- trunk/psModules/src/camera/pmFPAMaskWeight.h	(revision 21104)
+++ trunk/psModules/src/camera/pmFPAMaskWeight.h	(revision 21183)
@@ -5,6 +5,6 @@
  * @author Eugene Magnier, IfA
  *
- * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
- * @date $Date: 2008-10-31 21:50:16 $
+ * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2009-01-27 06:39:38 $
  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -42,6 +42,6 @@
 /// iterating using pmReadoutReadNext, in which case the HDU can't be generated.
 bool pmReadoutSetMask(pmReadout *readout, ///< Readout for which to set mask
-                      psMaskType satMask, ///< Mask value to give saturated pixels
-                      psMaskType badMask  ///< Mask value to give bad (low) pixels
+                      psImageMaskType satMask, ///< Mask value to give saturated pixels
+                      psImageMaskType badMask  ///< Mask value to give bad (low) pixels
     );
 
@@ -62,6 +62,6 @@
 /// is suitable for output (complete with HDU entry).  This is intended for most operations.
 bool pmReadoutGenerateMask(pmReadout *readout, ///< Readout for which to generate mask
-                           psMaskType sat, ///< Mask value to give saturated pixels
-                           psMaskType bad ///< Mask value to give bad (low) pixels
+                           psImageMaskType sat, ///< Mask value to give saturated pixels
+                           psImageMaskType bad ///< Mask value to give bad (low) pixels
     );
 
@@ -79,6 +79,6 @@
 /// Calls pmReadoutGenerateMask and pmReadoutGenerateWeight for the readout
 bool pmReadoutGenerateMaskWeight(pmReadout *readout, ///< Readout for which to generate mask and weights
-                                 psMaskType sat, ///< Mask value to give saturated pixels
-                                 psMaskType bad, ///< Mask value to give bad (low) pixels
+                                 psImageMaskType sat, ///< Mask value to give saturated pixels
+                                 psImageMaskType bad, ///< Mask value to give bad (low) pixels
                                  bool poisson ///< Use poisson weights (in addition to read noise)?
                                 );
@@ -88,6 +88,6 @@
 /// Calls pmReadoutGenerateMaskWeight for each readout within the cell.
 bool pmCellGenerateMaskWeight(pmCell *cell, ///< Cell for which to generate mask and weights
-                              psMaskType sat, ///< Mask value to give saturated pixels
-                              psMaskType bad, ///< Mask value to give bad (low) pixels
+                              psImageMaskType sat, ///< Mask value to give saturated pixels
+                              psImageMaskType bad, ///< Mask value to give bad (low) pixels
                               bool poisson ///< Use poisson weights (in addition to read noise)?
                              );
@@ -98,5 +98,5 @@
 bool pmReadoutWeightRenormPixels(
     const pmReadout *readout,           ///< Readout to normalise
-    psMaskType maskVal,                 ///< Value to mask
+    psImageMaskType maskVal,                 ///< Value to mask
     psStatsOptions meanStat,            ///< Statistic to measure the mean (of the variance map)
     psStatsOptions stdevStat,           ///< Statistic to measure the stdev (of the image)
@@ -110,5 +110,5 @@
 bool pmReadoutWeightRenormPhot(
     const pmReadout *readout,           ///< Readout to normalise
-    psMaskType maskVal,                 ///< Value to mask
+    psImageMaskType maskVal,                 ///< Value to mask
     int num,                            ///< Number of instances to measure over the image
     float width,                        ///< Photometry width
@@ -123,5 +123,5 @@
 /// that patch corresponds.
 bool pmReadoutWeightRenorm(const pmReadout *readout, // Readout to normalise
-                           psMaskType maskVal, // Value to mask
+                           psImageMaskType maskVal, // Value to mask
                            psStatsOptions meanStat, // Statistic to measure the mean (of the variance map)
                            psStatsOptions stdevStat, // Statistic to measure the stdev (of the image)
@@ -136,5 +136,5 @@
 /// the provided value.
 bool pmReadoutMaskNonfinite(pmReadout *readout, ///< Readout to mask
-                            psMaskType maskVal ///< Mask value to give non-finite pixels
+                            psImageMaskType maskVal ///< Mask value to give non-finite pixels
     );
 
@@ -145,5 +145,5 @@
 /// sets masked areas to NAN in the image and weight.
 bool pmReadoutMaskApply(pmReadout *readout, ///< Readout to mask
-                        psMaskType maskVal ///< Mask value for which to apply mask
+                        psImageMaskType maskVal ///< Mask value for which to apply mask
     );
 
@@ -152,9 +152,9 @@
 /// Scan the mask image for bad pixels, and interpolate over them using the nominated options
 bool pmReadoutInterpolateBadPixels(pmReadout *readout, ///< Readout to work on
-                                   psMaskType maskVal, ///< Value to mask
+                                   psImageMaskType maskVal, ///< Value to mask
                                    psImageInterpolateMode mode, ///< Interpolation mode
                                    float poorFrac, ///< Maximum bad fraction of kernel for "poor" status
-                                   psMaskType maskPoor, ///< Mask value to give poor pixels
-                                   psMaskType maskBad ///< Mask value to give bad pixels
+                                   psImageMaskType maskPoor, ///< Mask value to give poor pixels
+                                   psImageMaskType maskBad ///< Mask value to give bad pixels
     );
 
Index: trunk/psModules/src/camera/pmFPAMosaic.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMosaic.c	(revision 21104)
+++ trunk/psModules/src/camera/pmFPAMosaic.c	(revision 21183)
@@ -471,6 +471,4 @@
         numImages++;
 
-        // Only implemented for F32 and U8 images so far.
-        assert(image->type.type == PS_TYPE_F32 || image->type.type == PS_TYPE_U8);
         // All input types must be the same
         if (type == 0) {
@@ -537,6 +535,14 @@
         if (xBinSource->data.S32[i] == xBinTarget && yBinSource->data.S32[i] == yBinTarget) {
             switch (type) {
+                COPY_WITH_PARITY_DIFFERENCE(U8);
+                COPY_WITH_PARITY_DIFFERENCE(U16);
+                COPY_WITH_PARITY_DIFFERENCE(U32);
+                COPY_WITH_PARITY_DIFFERENCE(U64);
+                COPY_WITH_PARITY_DIFFERENCE(S8);
+                COPY_WITH_PARITY_DIFFERENCE(S16);
+                COPY_WITH_PARITY_DIFFERENCE(S32);
+                COPY_WITH_PARITY_DIFFERENCE(S64);
                 COPY_WITH_PARITY_DIFFERENCE(F32);
-                COPY_WITH_PARITY_DIFFERENCE(U8);
+                COPY_WITH_PARITY_DIFFERENCE(F64);
               default:
                 psAbort("Should never get here.\n");
@@ -548,6 +554,14 @@
         // We have to do all of the hard work ourselves
         switch (type) {
-            FILL_IN(F32);
-            FILL_IN(U8);
+	    FILL_IN(U8);
+	    FILL_IN(U16);
+	    FILL_IN(U32);
+	    FILL_IN(U64);
+	    FILL_IN(S8);
+	    FILL_IN(S16);
+	    FILL_IN(S32);
+	    FILL_IN(S64);
+	    FILL_IN(F32);
+	    FILL_IN(F64);
           default:
             psAbort("Should never get here.\n");
@@ -730,5 +744,5 @@
                        const pmChip *chip, // Chip to mosaic
                        const pmCell *targetCell, // Cell to which to mosaic
-                       psMaskType blank // Mask value to give blank pixels
+                       psImageMaskType blank // Mask value to give blank pixels
                       )
 {
@@ -838,5 +852,5 @@
                       const pmChip *targetChip, // Chip to which to mosaic
                       const pmCell *targetCell, // Cell to which to mosaic
-                      psMaskType blank  // Mask value to give blank pixels
+                      psImageMaskType blank  // Mask value to give blank pixels
                      )
 {
@@ -994,5 +1008,5 @@
 // the mosaic image.
 
-bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy, psMaskType blank)
+bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy, psImageMaskType blank)
 {
     // Target exists, and has only a single cell
@@ -1225,5 +1239,5 @@
 
 
-bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy, psMaskType blank)
+bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy, psImageMaskType blank)
 {
     // Target exists, and has only a single chip with single cell
Index: trunk/psModules/src/camera/pmFPAMosaic.h
===================================================================
--- trunk/psModules/src/camera/pmFPAMosaic.h	(revision 21104)
+++ trunk/psModules/src/camera/pmFPAMosaic.h	(revision 21183)
@@ -4,6 +4,6 @@
  * @author Paul Price, IfA
  *
- * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-06-20 02:22:26 $
+ * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2009-01-27 06:39:38 $
  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -24,5 +24,5 @@
                   const pmChip *source, ///< Source chip whose cells will be mosaicked
                   bool deepCopy,        ///< Require a deep copy (disregard 'nice' chip)
-                  psMaskType blank      ///< Mask value to give blank pixels
+                  psImageMaskType blank      ///< Mask value to give blank pixels
     );
 
@@ -36,5 +36,5 @@
                  const pmFPA *source,   ///< FPA whose chips and cells will be mosaicked
                  bool deepCopy,         ///< Require a deep copy (disregard 'nice' chip)
-                 psMaskType blank       ///< Mask value to give blank pixels
+                 psImageMaskType blank       ///< Mask value to give blank pixels
                 );
 /// @}
Index: trunk/psModules/src/camera/pmFPARead.c
===================================================================
--- trunk/psModules/src/camera/pmFPARead.c	(revision 21104)
+++ trunk/psModules/src/camera/pmFPARead.c	(revision 21183)
@@ -35,5 +35,5 @@
 static psElemType pixelTypes[] = {
     PS_TYPE_F32,
-    PS_TYPE_MASK,
+    PS_TYPE_IMAGE_MASK,
     PS_TYPE_F32,
     0
Index: trunk/psModules/src/camera/pmFPA_JPEG.c
===================================================================
--- trunk/psModules/src/camera/pmFPA_JPEG.c	(revision 21104)
+++ trunk/psModules/src/camera/pmFPA_JPEG.c	(revision 21183)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-09-23 02:00:36 $
+ *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-01-27 06:39:38 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -157,5 +157,5 @@
     psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);
     stats->nSubsample = 10000;
-    psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
+    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     float mean = 0, delta = 0;          //
     if (!psImageBackground(stats, NULL, readout->image, readout->mask, maskVal, rng)) {
Index: trunk/psModules/src/camera/pmHDU.c
===================================================================
--- trunk/psModules/src/camera/pmHDU.c	(revision 21104)
+++ trunk/psModules/src/camera/pmHDU.c	(revision 21183)
@@ -167,5 +167,5 @@
                      const psArray *images, // Images to write
                      const psArray *masks, // Masks to use when writing
-                     psMaskType maskVal,// Value to mask
+                     psImageMaskType maskVal,// Value to mask
                      psFits *fits       // FITS file to which to write
                     )
@@ -222,5 +222,5 @@
     PS_ASSERT_PTR_NON_NULL(fits, false);
 
-    psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
+    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     return hduWrite(hdu, hdu->images, hdu->masks, maskVal, fits);
 }
@@ -240,5 +240,5 @@
     PS_ASSERT_PTR_NON_NULL(fits, false);
 
-    psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
+    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     return hduWrite(hdu, hdu->weights, hdu->masks, maskVal, fits);
 }
Index: trunk/psModules/src/camera/pmReadoutStack.c
===================================================================
--- trunk/psModules/src/camera/pmReadoutStack.c	(revision 21104)
+++ trunk/psModules/src/camera/pmReadoutStack.c	(revision 21183)
@@ -78,5 +78,5 @@
 
 // XXX for the moment, use col0, row0, numCols, numRows supplied from the outside
-bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psMaskType blank)
+bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psImageMaskType blank)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -94,5 +94,5 @@
 	// XXX is this an error?
         if (readout->mask) return false;
-	readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
+	readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
 	psImageInit(readout->mask, blank);
     }
@@ -163,5 +163,5 @@
 bool pmReadoutUpdateSize(pmReadout *readout, int minCols, int minRows,
                          int numCols, int numRows, bool mask, bool weight,
-                         psMaskType blank)
+                         psImageMaskType blank)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -191,9 +191,9 @@
     if (mask) {
         if (!readout->mask) {
-            readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
+            readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
             psImageInit(readout->mask, blank);
         }
         if (readout->mask->numCols < numCols || readout->mask->numRows < numRows) {
-            psImage *newMask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
+            psImage *newMask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
             psImageInit(newMask, blank);
             psImageOverlaySection(newMask, readout->mask, readout->col0, readout->row0, "=");
Index: trunk/psModules/src/camera/pmReadoutStack.h
===================================================================
--- trunk/psModules/src/camera/pmReadoutStack.h	(revision 21104)
+++ trunk/psModules/src/camera/pmReadoutStack.h	(revision 21183)
@@ -14,5 +14,5 @@
                          bool mask,     ///< Worry about the mask?
                          bool weight,   ///< Worry about the weight?
-                         psMaskType blank ///< Mask value to give to blank pixels
+                         psImageMaskType blank ///< Mask value to give to blank pixels
     );
 
@@ -47,5 +47,5 @@
 
 // XXX for the moment, use col0, row0, numCols, numRows supplied from the outside
-bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psMaskType blank);
+bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psImageMaskType blank);
 
 bool pmReadoutStackSetOutputSize(int *col0, int *row0, int *numCols, int *numRows, const psArray *inputs);
