Index: trunk/ppSub/src/ppSubReadoutSubtract.c
===================================================================
--- trunk/ppSub/src/ppSubReadoutSubtract.c	(revision 21360)
+++ trunk/ppSub/src/ppSubReadoutSubtract.c	(revision 21374)
@@ -6,6 +6,6 @@
  *
  *  @author IfA
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-02-06 01:37:17 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 03:20:02 $
  *  Copyright 2009 Institute for Astronomy, University of Hawaii
  */
@@ -28,9 +28,9 @@
     pmReadout *subtrahend = NULL;
     if (reverse) {
-	minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
-	subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
+        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
+        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
     } else {
-	minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
-	subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
+        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
+        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
     }
 
@@ -53,9 +53,9 @@
     // Do the actual subtraction
     pmReadout *outRO = pmFPAfileThisReadout(config->files, view, "PPSUB.OUTPUT");
-    outRO->image = (psImage *) psBinaryOp(outRO->image, minuend->image, "-", subtrahend->image);
-    if (minuend->weight && subtrahend->weight) {
-        outRO->weight = (psImage *) psBinaryOp(outRO->weight, minuend->weight, "+", subtrahend->weight);
+    outRO->image = (psImage*)psBinaryOp(outRO->image, minuend->image, "-", subtrahend->image);
+    if (minuend->variance && subtrahend->variance) {
+        outRO->variance = (psImage*)psBinaryOp(outRO->variance, minuend->variance, "+", subtrahend->variance);
     }
-    outRO->mask = (psImage *) psBinaryOp(outRO->mask, minuend->mask, "|", subtrahend->mask);
+    outRO->mask = (psImage*)psBinaryOp(outRO->mask, minuend->mask, "|", subtrahend->mask);
 
     outRO->data_exists = true;
@@ -83,6 +83,6 @@
     if (!outHDU || !inHDU) {
         psError(PS_ERR_UNKNOWN, false, "Unable to find HDU at FPA level to copy astrometry.");
-	return false;
-    } 
+        return false;
+    }
 
     // Copy astrometry over
@@ -90,10 +90,10 @@
     if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry from input FPA.");
-	return false;
-    } 
+        return false;
+    }
 
     if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to write WCS astrometry to output FPA.");
-	return false;
+        return false;
     }
 
