Index: trunk/pstamp/src/ppstampMakeStamp.c
===================================================================
--- trunk/pstamp/src/ppstampMakeStamp.c	(revision 20114)
+++ trunk/pstamp/src/ppstampMakeStamp.c	(revision 20148)
@@ -282,6 +282,5 @@
     pmFPAview *srcView = pmFPAviewAlloc(0);
     if (psArrayLength(inChip->cells) > 1) {
-        // we extract our postage stamp from a mosaic so that
-        // we don't have to manage extracting from multiple cells
+        // we extract our postage stamp from a mosaic
         pmFPAfile *mosaic = ppstampBuildMosaic(config, input, view);
         if (mosaic == NULL) {
@@ -327,4 +326,20 @@
             status = false;
             break;
+        }
+        if (readout->mask) {
+            outReadout->mask = extractStamp(readout->mask, extractRegion,  0);
+            if (!outReadout->mask) {
+                psError(PS_ERR_UNKNOWN, false, "failed to create postage stamp mask image\n");
+                status = false;
+                break;
+            }
+        }
+        if (readout->weight) {
+            outReadout->weight = extractStamp(readout->weight, extractRegion,  0);
+            if (!outReadout->weight) {
+                psError(PS_ERR_UNKNOWN, false, "failed to create postage stamp weight image\n");
+                status = false;
+                break;
+            }
         }
 
Index: trunk/pstamp/src/ppstampParseCamera.c
===================================================================
--- trunk/pstamp/src/ppstampParseCamera.c	(revision 20114)
+++ trunk/pstamp/src/ppstampParseCamera.c	(revision 20148)
@@ -8,8 +8,18 @@
 
 // Set up the ppstamp output Image file
-bool setupOutput(pmConfig *config, pmFPAfile *input)
+bool setupOutput(pmConfig *config, pmFPAfile *input, bool doMask, bool doWeight)
 {
     pmFPAfile *output = pmFPAfileDefineSkycell(config, NULL, "PPSTAMP.OUTPUT");
     output->save = true;
+
+    if (doMask) {
+        pmFPAfile *outMask = pmFPAfileDefineSkycell(config, output->fpa, "PPSTAMP.OUTPUT.MASK");
+        outMask->save = true;
+    }
+    if (doWeight) {
+        pmFPAfile *outWeight = pmFPAfileDefineSkycell(config, output->fpa, "PPSTAMP.OUTPUT.WEIGHT");
+        outWeight->save = true;
+    }
+
     return true;
 }
@@ -34,4 +44,25 @@
     }
 
+    bool doMask = false;
+    pmFPAfile *mask = pmFPAfileBindFromArgs (&status, input, config, "PPSTAMP.INPUT.MASK", "MASK");
+    if (!status) {
+        psError(PS_ERR_IO, false, "Failed to build FPA from PPSTAMP.INPUT.MASK");
+        return false;
+    }
+    if (mask) {
+        doMask = true;
+    }
+    bool doWeight = false;
+    pmFPAfile *weight = pmFPAfileBindFromArgs (&status, input, config, "PPSTAMP.INPUT.WEIGHT", "WEIGHT");
+    if (!status) {
+        psError(PS_ERR_IO, false, "Failed to build FPA from PPSTAMP.INPUT.WEIGHT");
+        return false;
+    }
+    if (weight) {
+        doWeight = true;
+    }
+        
+
+
     // XXX: create a filerule for PPSTAMP.ASTROM
     pmFPAfile *astrom = pmFPAfileDefineFromArgs(&status, config, "PSWARP.ASTROM", "ASTROM");
@@ -52,5 +83,5 @@
 
     // Set up the output target
-    if (!setupOutput(config, input)) {
+    if (!setupOutput(config, input, doMask, doWeight)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to setup output.");
         return false;
