Index: /trunk/psModules/src/camera/pmFPAMaskWeight.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 7431)
+++ /trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 7432)
@@ -34,5 +34,5 @@
             continue;
         }
-        masks->data[i] = psImageAlloc(image->numCols, image->numRows, PS_TYPE_F32);
+        masks->data[i] = psImageAlloc(image->numCols, image->numRows, PS_TYPE_U8);
     }
 
@@ -78,5 +78,5 @@
     long index = -1;                    // Index of the readout
     for (long i = 0; i < hdu->images->n && index == -1; i++) {
-        if (hdu->images->data[i] == readout->image) {
+        if (hdu->images->data[i] == readout->image->parent) {
             index = i;
         }
@@ -135,5 +135,5 @@
         }
 
-        psImage *mask = psImageSubset(hdu->images->data[index], *trimsec); // The mask pixels
+        psImage *mask = psImageSubset(hdu->masks->data[index], *trimsec); // The mask pixels
         if (!mask) {
             psString trimsecString = psRegionToString(*trimsec);
@@ -207,5 +207,5 @@
         }
 
-        psImage *weight = psImageSubset(hdu->images->data[index], *trimsec); // The weight pixels
+        psImage *weight = psImageSubset(hdu->weights->data[index], *trimsec); // The weight pixels
         if (!weight) {
             psString trimsecString = psRegionToString(*trimsec);
