Index: trunk/psModules/src/camera/pmFPAMaskWeight.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 9830)
+++ trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 10075)
@@ -210,4 +210,9 @@
     psImage *image = readout->image;    // The image pixels
     readout->weight = (psImage*)psBinaryOp(readout->weight, image, "/", psScalarAlloc(gain, PS_TYPE_F32));
+
+    // a negative weight is non-sensical. if the image value drops below 1, the weight must be 1.
+    readout->weight = (psImage*)psUnaryOp(readout->weight, readout->weight, "abs");
+    readout->weight = (psImage*)psBinaryOp(readout->weight, readout->weight, "max", psScalarAlloc(1, PS_TYPE_F32));
+
     readout->weight = (psImage*)psBinaryOp(readout->weight, readout->weight, "+",
                                            psScalarAlloc(readnoise*readnoise/gain/gain, PS_TYPE_F32));
