Index: /branches/pap_branch_20090128/pswarp/src/pswarpArguments.c
===================================================================
--- /branches/pap_branch_20090128/pswarp/src/pswarpArguments.c	(revision 21224)
+++ /branches/pap_branch_20090128/pswarp/src/pswarpArguments.c	(revision 21225)
@@ -80,7 +80,7 @@
     }
 
-    // the mask and weight entries are optional (build from gain?)
+    // the mask and variance entries are optional (build from gain?)
     pmConfigFileSetsMD (config->arguments, &argc, argv, "MASK",   "-mask",   "-masklist");
-    pmConfigFileSetsMD (config->arguments, &argc, argv, "WEIGHT", "-weight", "-weightlist");
+    pmConfigFileSetsMD (config->arguments, &argc, argv, "VARIANCE", "-variance", "-variancelist");
 
     if (argc != 3) {
Index: /branches/pap_branch_20090128/pswarp/src/pswarpDefineSkycell.c
===================================================================
--- /branches/pap_branch_20090128/pswarp/src/pswarpDefineSkycell.c	(revision 21224)
+++ /branches/pap_branch_20090128/pswarp/src/pswarpDefineSkycell.c	(revision 21225)
@@ -63,5 +63,5 @@
     // determine camera if not specified already
     // XXX EAM : this operation should be defined as a pmConfig function (pmConfigCopy?)
-    skyConfig = pmConfigAlloc(0, NULL);
+    skyConfig = pmConfigAlloc();
     skyConfig->user = psMemIncrRefCounter(config->user);
     skyConfig->system = psMemIncrRefCounter(config->system);
Index: /branches/pap_branch_20090128/pswarp/src/pswarpParseCamera.c
===================================================================
--- /branches/pap_branch_20090128/pswarp/src/pswarpParseCamera.c	(revision 21224)
+++ /branches/pap_branch_20090128/pswarp/src/pswarpParseCamera.c	(revision 21225)
@@ -45,11 +45,11 @@
     }
 
-    pmFPAfile *inWeight = pmFPAfileBindFromArgs(&status, input, config, "PSWARP.WEIGHT", "WEIGHT");
+    pmFPAfile *inVariance = pmFPAfileBindFromArgs(&status, input, config, "PSWARP.VARIANCE", "VARIANCE");
     if (!status) {
         psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
         return NULL;
     }
-    if (!inWeight) {
-        psLogMsg ("pswarp", 3, "no weight supplied\n");
+    if (!inVariance) {
+        psLogMsg ("pswarp", 3, "no variance supplied\n");
     }
 
@@ -78,11 +78,11 @@
     outMask->save = true;
 
-    if (inWeight) {
-        pmFPAfile *outWeight = pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.WEIGHT");
-        if (!outWeight) {
-            psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT.WEIGHT");
+    if (inVariance) {
+        pmFPAfile *outVariance = pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.VARIANCE");
+        if (!outVariance) {
+            psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT.VARIANCE");
             return false;
         }
-        outWeight->save = true;
+        outVariance->save = true;
     }
 
Index: /branches/pap_branch_20090128/pswarp/src/pswarpSetMaskBits.c
===================================================================
--- /branches/pap_branch_20090128/pswarp/src/pswarpSetMaskBits.c	(revision 21224)
+++ /branches/pap_branch_20090128/pswarp/src/pswarpSetMaskBits.c	(revision 21225)
@@ -8,30 +8,30 @@
 // updated in the config metadata.
 
-bool pswarpSetMaskBits (pmConfig *config) {
-
-    psMaskType maskIn = 0x00;			// mask for the input image
-    psMaskType markIn = 0x00;			// mark for the input image
-    psMaskType maskOut = 0x00;			// mask for the output image
-    psMaskType markOut = 0x00;			// mark for the output image
+bool pswarpSetMaskBits (pmConfig *config)
+{
+    psImageMaskType maskIn = 0x00;      // mask for the input image
+    psImageMaskType markIn = 0x00;      // mark for the input image
+    psImageMaskType maskOut = 0x00;     // mask for the output image
+    psImageMaskType markOut = 0x00;     // mark for the output image
 
     // this function sets the required single-image mask bits
     if (!pmConfigMaskSetBits (&maskIn, &markIn, config)) {
-	psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values");
-	return false;
+        psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values");
+        return false;
     }
 
     // mask for non-linear flat regions (default to DETECTOR if not defined)
-    psMaskType badMask = pmConfigMaskGet("BAD.WARP", config); 
+    psMaskType badMask = pmConfigMaskGet("BAD.WARP", config);
     if (!badMask) {
-	badMask = 0x01;
-	pmConfigMaskSet (config, "BAD.WARP", badMask);
+        badMask = 0x01;
+        pmConfigMaskSet (config, "BAD.WARP", badMask);
     }
     maskOut |= badMask;
 
     // mask for non-linear flat regions (default to DETECTOR if not defined)
-    psMaskType poorMask = pmConfigMaskGet("POOR.WARP", config); 
+    psMaskType poorMask = pmConfigMaskGet("POOR.WARP", config);
     if (!poorMask) {
-	poorMask = 0x02;
-	pmConfigMaskSet (config, "POOR.WARP", poorMask);
+        poorMask = 0x02;
+        pmConfigMaskSet (config, "POOR.WARP", poorMask);
     }
     maskOut |= poorMask;
@@ -42,14 +42,14 @@
     int nBits = sizeof(psMaskType) * 8;
     for (int i = 0; !markOut && (i < nBits); i++) {
-	if (maskOut & markOut) {
-	    markOut >>= 1;
-	} else {
-	    markOut = markOut;
-	}
+        if (maskOut & markOut) {
+            markOut >>= 1;
+        } else {
+            markOut = markOut;
+        }
     }
 
     if (!markOut) {
-	psError (PS_ERR_UNKNOWN, true, "Unable to define the MARK bit mask: all bits taken!");
-	return false;
+        psError (PS_ERR_UNKNOWN, true, "Unable to define the MARK bit mask: all bits taken!");
+        return false;
     }
 
Index: /branches/pap_branch_20090128/pswarp/src/pswarpTransformReadout.c
===================================================================
--- /branches/pap_branch_20090128/pswarp/src/pswarpTransformReadout.c	(revision 21224)
+++ /branches/pap_branch_20090128/pswarp/src/pswarpTransformReadout.c	(revision 21225)
@@ -71,11 +71,11 @@
     // Interpolation options : move these from the arguments to explicit assignments
     psImageInterpolation *interp = psImageInterpolationAlloc(interpolationMode, input->image,
-                                                             input->weight, input->mask, maskIn,
+                                                             input->variance, input->mask, maskIn,
                                                              NAN, NAN, maskBad, maskPoor, poorFrac,
                                                              numKernels);
 
-    if (input->weight && !output->weight) {
-        output->weight = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
-        psImageInit(output->weight, NAN);
+    if (input->variance && !output->variance) {
+        output->variance = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
+        psImageInit(output->variance, NAN);
     }
     if ((input->mask || maskPoor || maskBad) && !output->mask) {
Index: /branches/pap_branch_20090128/pswarp/src/pswarpTransformTile.c
===================================================================
--- /branches/pap_branch_20090128/pswarp/src/pswarpTransformTile.c	(revision 21224)
+++ /branches/pap_branch_20090128/pswarp/src/pswarpTransformTile.c	(revision 21225)
@@ -48,5 +48,5 @@
     // Dereference images for convenience
     psF32 **outImageData     = args->output->image->data.F32;
-    psF32 **outVarData       = (args->output->weight) ? args->output->weight->data.F32 : NULL;
+    psF32 **outVarData       = (args->output->variance) ? args->output->variance->data.F32 : NULL;
     psMaskType **outMaskData = (args->output->mask)   ? args->output->mask->data.PS_TYPE_MASK_DATA : NULL;
     psMaskType **inMaskData  = (args->input->mask)    ? args->input->mask->data.PS_TYPE_MASK_DATA : NULL;
@@ -82,5 +82,5 @@
             // psImagePixelInterpolate determines the value at pixel coordinate (x,y) in child coordinates
             double imageValue, varValue; // Value of image and variance map
-            psMaskType maskValue = inMaskData ? inMaskData[(int)yIn][(int)xIn] : 0; // Value of mask
+            psImageMaskType maskValue = inMaskData ? inMaskData[(int)yIn][(int)xIn] : 0; // Value of mask
             if (!psImageInterpolate(&imageValue, &varValue, &maskValue, xIn, yIn, args->interp)) {
                 psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
