Index: trunk/psModules/src/objects/pmResiduals.c
===================================================================
--- trunk/psModules/src/objects/pmResiduals.c	(revision 21352)
+++ trunk/psModules/src/objects/pmResiduals.c	(revision 21363)
@@ -4,6 +4,6 @@
  *
  * @author EAM, IfA
- * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- * @date $Date: 2009-01-27 06:39:38 $
+ * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2009-02-06 02:31:25 $
  * Copyright 2004 IfA, University of Hawaii
  */
@@ -23,5 +23,5 @@
     psFree (resid->Rx);
     psFree (resid->Ry);
-    psFree (resid->weight);
+    psFree (resid->variance);
     psFree (resid->mask);
     return;
@@ -42,5 +42,5 @@
     resid->Rx  = psImageAlloc (nX, nY, PS_TYPE_F32);
     resid->Ry  = psImageAlloc (nX, nY, PS_TYPE_F32);
-    resid->weight = psImageAlloc (nX, nY, PS_TYPE_F32);
+    resid->variance = psImageAlloc (nX, nY, PS_TYPE_F32);
     resid->mask   = psImageAlloc (nX, nY, PM_TYPE_RESID_MASK);
 
@@ -49,5 +49,5 @@
     resid->xBin = xBin;
     resid->yBin = yBin;
-    resid->xCenter = 0.5*(nX - 1); 
+    resid->xCenter = 0.5*(nX - 1);
     resid->yCenter = 0.5*(nY - 1);
     return resid;
Index: trunk/psModules/src/objects/pmResiduals.h
===================================================================
--- trunk/psModules/src/objects/pmResiduals.h	(revision 21352)
+++ trunk/psModules/src/objects/pmResiduals.h	(revision 21363)
@@ -4,6 +4,6 @@
  *
  * @author EAM, IfA
- * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- * @date $Date: 2009-01-27 06:39:38 $
+ * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2009-02-06 02:31:25 $
  * Copyright 2004 IfA, University of Hawaii
  */
@@ -14,5 +14,5 @@
 /// @{
 
-/** residual tables for sources 
+/** residual tables for sources
  */
 typedef struct {
@@ -20,5 +20,5 @@
     psImage *Rx;
     psImage *Ry;
-    psImage *weight;
+    psImage *variance;
     psImage *mask;
     int xBin;
@@ -31,5 +31,5 @@
 bool psMemCheckResiduals(psPtr ptr);
 
-// macros to abstract the resid mask type : these values must be consistent 
+// macros to abstract the resid mask type : these values must be consistent
 #define PM_TYPE_RESID_MASK PS_TYPE_U8        /**< the psElemType to use for mask image */
 #define PM_TYPE_RESID_MASK_DATA U8           /**< the data member to use for mask image */
Index: trunk/psModules/src/objects/pmSource.c
===================================================================
--- trunk/psModules/src/objects/pmSource.c	(revision 21352)
+++ trunk/psModules/src/objects/pmSource.c	(revision 21363)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-02-06 01:09:50 $
+ *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:31:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -44,5 +44,5 @@
     psFree(tmp->peak);
     psFree(tmp->pixels);
-    psFree(tmp->weight);
+    psFree(tmp->variance);
     psFree(tmp->maskObj);
     psFree(tmp->maskView);
@@ -66,5 +66,5 @@
 
     psFree (source->pixels);
-    psFree (source->weight);
+    psFree (source->variance);
     psFree (source->maskObj);
     psFree (source->maskView);
@@ -73,5 +73,5 @@
 
     source->pixels = NULL;
-    source->weight = NULL;
+    source->variance = NULL;
     source->maskObj = NULL;
     source->maskView = NULL;
@@ -101,5 +101,5 @@
     source->peak = NULL;
     source->pixels = NULL;
-    source->weight = NULL;
+    source->variance = NULL;
     source->maskObj = NULL;
     source->maskView = NULL;
@@ -144,5 +144,5 @@
     }
     // this copy is used to allow multiple fit attempts on the
-    // same object.  the pixels, weight, and mask arrays all point to
+    // same object.  the pixels, variance, and mask arrays all point to
     // the same original subarrays.  the peak and moments point at
     // the original values.
@@ -167,5 +167,5 @@
     // We want a new view, but pointing at the same pixels.
     source->pixels   = psImageCopyView(NULL, in->pixels);
-    source->weight   = psImageCopyView(NULL, in->weight);
+    source->variance   = psImageCopyView(NULL, in->variance);
     source->maskView = in->maskView ? psImageCopyView(NULL, in->maskView) : NULL;
 
@@ -199,6 +199,6 @@
     // these images are subset images of the equivalent parents
     mySource->pixels = psImageSubset(readout->image, srcRegion);
-    if (readout->weight) {
-        mySource->weight = psImageSubset(readout->weight, srcRegion);
+    if (readout->variance) {
+        mySource->variance = psImageSubset(readout->variance, srcRegion);
     }
     if (readout->mask) {
@@ -237,5 +237,5 @@
 
     extend |= (mySource->pixels == NULL);
-    extend |= (mySource->weight == NULL);
+    extend |= (mySource->variance == NULL);
     extend |= (mySource->maskObj == NULL);
     extend |= (mySource->maskView == NULL);
@@ -245,9 +245,9 @@
         // re-create the subimage
         psFree (mySource->pixels);
-        psFree (mySource->weight);
+        psFree (mySource->variance);
         psFree (mySource->maskView);
 
         mySource->pixels   = psImageSubset(readout->image,  newRegion);
-        mySource->weight   = psImageSubset(readout->weight, newRegion);
+        mySource->variance   = psImageSubset(readout->variance, newRegion);
         mySource->maskView = psImageSubset(readout->mask,   newRegion);
         mySource->region   = newRegion;
@@ -670,5 +670,5 @@
     pmSource->peak
     pmSource->pixels
-    pmSource->weight
+    pmSource->variance
     pmSource->mask
 
@@ -737,5 +737,5 @@
 
         psF32 *vPix = source->pixels->data.F32[row];
-        psF32 *vWgt = source->weight->data.F32[row];
+        psF32 *vWgt = source->variance->data.F32[row];
         psImageMaskType *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row];
 
@@ -924,5 +924,5 @@
         if (mode & PM_MODEL_OP_NOISE) {
             // XXX need to scale by the gain...
-            target = source->weight->data.F32;
+            target = source->variance->data.F32;
         }
 
@@ -946,5 +946,5 @@
     psImage *target = source->pixels;
     if (mode & PM_MODEL_OP_NOISE) {
-        target = source->weight;
+        target = source->variance;
     }
 
Index: trunk/psModules/src/objects/pmSource.h
===================================================================
--- trunk/psModules/src/objects/pmSource.h	(revision 21352)
+++ trunk/psModules/src/objects/pmSource.h	(revision 21363)
@@ -3,6 +3,6 @@
  * @author EAM, IfA; GLG, MHPCC
  *
- * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- * @date $Date: 2009-01-27 06:39:38 $
+ * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2009-02-06 02:31:25 $
  * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
@@ -72,5 +72,5 @@
     pmPeak  *peak;                      ///< Description of peak pixel.
     psImage *pixels;                    ///< Rectangular region including object pixels.
-    psImage *weight;                    ///< Image variance.
+    psImage *variance;                    ///< Image variance.
     psImage *maskObj;                   ///< unique mask for this object which marks included pixels associated with objects.
     psImage *maskView;                  ///< view into global image mask for this object region
@@ -210,5 +210,5 @@
     psMetadata *metadata,               ///< Contains classification parameters
     pmPSFClump clump,                   ///< Statistics about the PSF clump
-    psImageMaskType maskSat		///< Mask value for saturated pixels
+    psImageMaskType maskSat             ///< Mask value for saturated pixels
 );
 
Index: trunk/psModules/src/objects/pmSourceExtendedPars.c
===================================================================
--- trunk/psModules/src/objects/pmSourceExtendedPars.c	(revision 21352)
+++ trunk/psModules/src/objects/pmSourceExtendedPars.c	(revision 21363)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-12-08 02:51:14 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:31:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -71,5 +71,5 @@
     psFree(profile->radius);
     psFree(profile->flux);
-    psFree(profile->weight);
+    psFree(profile->variance);
     return;
 }
@@ -82,5 +82,5 @@
     profile->radius = NULL;
     profile->flux = NULL;
-    profile->weight = NULL;
+    profile->variance = NULL;
 
     return profile;
Index: trunk/psModules/src/objects/pmSourceExtendedPars.h
===================================================================
--- trunk/psModules/src/objects/pmSourceExtendedPars.h	(revision 21352)
+++ trunk/psModules/src/objects/pmSourceExtendedPars.h	(revision 21363)
@@ -3,6 +3,6 @@
  * @author EAM, IfA
  *
- * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- * @date $Date: 2008-01-02 20:39:04 $
+ * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2009-02-06 02:31:25 $
  * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
@@ -17,5 +17,5 @@
   psVector *radius;
   psVector *flux;
-  psVector *weight;
+  psVector *variance;
 } pmSourceRadialProfile;
 
Index: trunk/psModules/src/objects/pmSourceFitModel.c
===================================================================
--- trunk/psModules/src/objects/pmSourceFitModel.c	(revision 21352)
+++ trunk/psModules/src/objects/pmSourceFitModel.c	(revision 21363)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-01-27 06:39:38 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:31:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -62,5 +62,5 @@
     PS_ASSERT_PTR_NON_NULL(source->pixels, false);
     PS_ASSERT_PTR_NON_NULL(source->maskObj, false);
-    PS_ASSERT_PTR_NON_NULL(source->weight, false);
+    PS_ASSERT_PTR_NON_NULL(source->variance, false);
 
     psBool fitStatus = true;
@@ -84,6 +84,6 @@
                 continue;
             }
-            // skip zero-weight points
-            if (source->weight->data.F32[i][j] == 0) {
+            // skip zero-variance points
+            if (source->variance->data.F32[i][j] == 0) {
                 continue;
             }
@@ -102,8 +102,8 @@
 
             // psMinimizeLMChi2 takes wt = 1/dY^2.  suggestion from RHL is to use the local sky
-            // as weight to avoid the bias from systematic errors here we would just use the
+            // as variance to avoid the bias from systematic errors here we would just use the
             // source sky variance
             if (PM_SOURCE_FIT_MODEL_PIX_WEIGHTS) {
-                yErr->data.F32[nPix] = 1.0 / source->weight->data.F32[i][j];
+                yErr->data.F32[nPix] = 1.0 / source->variance->data.F32[i][j];
             } else {
                 yErr->data.F32[nPix] = 1.0 / PM_SOURCE_FIT_MODEL_WEIGHT;
Index: trunk/psModules/src/objects/pmSourceFitSet.c
===================================================================
--- trunk/psModules/src/objects/pmSourceFitSet.c	(revision 21352)
+++ trunk/psModules/src/objects/pmSourceFitSet.c	(revision 21363)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-01-27 06:39:38 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:31:25 $
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  *
@@ -55,12 +55,12 @@
 
     if (!fitSets) {
-	fitSets = psArrayAlloc (PS_MAX (1, nThreads));
-    }
-
-    // the allocated elements should be NULL on psArrayAlloc, 
-    // and a previously allocated array of fitSets should have been cleared 
+        fitSets = psArrayAlloc (PS_MAX (1, nThreads));
+    }
+
+    // the allocated elements should be NULL on psArrayAlloc,
+    // and a previously allocated array of fitSets should have been cleared
     // before pmSourceFitSetInit is called
     for (int i = 0; i < fitSets->n; i++) {
-	psAssert (fitSets->data[i] == NULL, "failure to init or clear fitSets?");
+        psAssert (fitSets->data[i] == NULL, "failure to init or clear fitSets?");
     }
     return true;
@@ -125,10 +125,10 @@
     // we do not need to lock to do this....
     for (int i = 0; i < fitSets->n; i++) {
-	thisSet = fitSets->data[i];
-	if (!thisSet) continue;
-	if (thisSet->thread == id) {
-	    break;
-	}
-	thisSet = NULL;
+        thisSet = fitSets->data[i];
+        if (!thisSet) continue;
+        if (thisSet->thread == id) {
+            break;
+        }
+        thisSet = NULL;
     }
     psAssert (thisSet == NULL, "pmSourceFitSetDataSet() called but previous entry not cleared");
@@ -137,11 +137,11 @@
 
     pthread_mutex_lock (&fitSetInitMutex);
-	  
+
     // find an entry that is NULL and place it there
     for (int i = 0; i < fitSets->n; i++) {
-	if (fitSets->data[i]) continue;
-	fitSets->data[i] = thisSet;
-	pthread_mutex_unlock (&fitSetInitMutex);
-	return thisSet;
+        if (fitSets->data[i]) continue;
+        fitSets->data[i] = thisSet;
+        pthread_mutex_unlock (&fitSetInitMutex);
+        return thisSet;
     }
     pthread_mutex_unlock (&fitSetInitMutex);
@@ -160,10 +160,10 @@
     pmSourceFitSetData *thisSet = NULL;
     for (int i = 0; i < fitSets->n; i++) {
-	thisSet = fitSets->data[i];
-	if (!thisSet) continue;
-	if (thisSet->thread == id) {
-	    break;
-	}
-	thisSet = NULL;
+        thisSet = fitSets->data[i];
+        if (!thisSet) continue;
+        if (thisSet->thread == id) {
+            break;
+        }
+        thisSet = NULL;
     }
     psAssert (thisSet != NULL, "pmSourceFitSetDataGet() called, but no entry found");
@@ -184,10 +184,10 @@
     pmSourceFitSetData *thisSet = NULL;
     for (i = 0; i < fitSets->n; i++) {
-	thisSet = fitSets->data[i];
-	if (!thisSet) continue;
-	if (thisSet->thread == id) {
-	    break;
-	}
-	thisSet = NULL;
+        thisSet = fitSets->data[i];
+        if (!thisSet) continue;
+        if (thisSet->thread == id) {
+            break;
+        }
+        thisSet = NULL;
     }
     psAssert (thisSet != NULL, "pmSourceFitSetDataClear() called, but no entry found");
@@ -256,14 +256,14 @@
         psVector *derivOne = set->derivSet->data[i];
 
-	// one or the other (param or deriv) must be set
-	assert ((deriv != NULL) || (param != NULL));
-
-	// if we are setting derive, derivOne and paramOne must be same length
+        // one or the other (param or deriv) must be set
+        assert ((deriv != NULL) || (param != NULL));
+
+        // if we are setting derive, derivOne and paramOne must be same length
         assert ((deriv == NULL) || (paramOne->n == derivOne->n));
-	
+
         for (int j = 0; j < paramOne->n; j++, n++) {
-	    if (param) {
-		param->data.F32[n] = paramOne->data.F32[j];
-	    }
+            if (param) {
+                param->data.F32[n] = paramOne->data.F32[j];
+            }
             if (deriv) {
                 deriv->data.F32[n] = derivOne->data.F32[j];
@@ -275,5 +275,5 @@
 
 // distribute parameters from single param and deriv vectors into FitSet models
-bool pmSourceFitSetSplit (pmSourceFitSetData *set, const psVector *deriv, const psVector *param) 
+bool pmSourceFitSetSplit (pmSourceFitSetData *set, const psVector *deriv, const psVector *param)
 {
     PS_ASSERT_VECTOR_NON_NULL(param, false);
@@ -301,5 +301,5 @@
 
 // set the model parameters for this fit set
-bool pmSourceFitSetValues (pmSourceFitSetData *set, const psVector *dparam, 
+bool pmSourceFitSetValues (pmSourceFitSetData *set, const psVector *dparam,
                            const psVector *param, pmSource *source,
                            psMinimization *myMin, int nPix, bool fitStatus)
@@ -420,9 +420,9 @@
 
     for (int i = 0; i < modelSet->n; i++) {
-	pmModel *model = modelSet->data[i];
-	int nParams = pmModelClassParameterCount (model->type);
-	for (int j = 0; j < nParams; j++) {
-	    fprintf (file, "%d %d  : %f %f\n", i, j, model->params->data.F32[j], model->dparams->data.F32[j]);
-	}
+        pmModel *model = modelSet->data[i];
+        int nParams = pmModelClassParameterCount (model->type);
+        for (int j = 0; j < nParams; j++) {
+            fprintf (file, "%d %d  : %f %f\n", i, j, model->params->data.F32[j], model->dparams->data.F32[j]);
+        }
     }
     return true;
@@ -435,5 +435,5 @@
         psVector *derivOne = set->derivSet->data[i];
         for (int j = 0; j < paramOne->n; j++) {
-	    fprintf (file, "%d %d  : %f %f\n", i, j, paramOne->data.F32[j], derivOne->data.F32[j]);
+            fprintf (file, "%d %d  : %f %f\n", i, j, paramOne->data.F32[j], derivOne->data.F32[j]);
         }
     }
@@ -450,5 +450,5 @@
     PS_ASSERT_PTR_NON_NULL(source->pixels, false);
     PS_ASSERT_PTR_NON_NULL(source->maskObj, false);
-    PS_ASSERT_PTR_NON_NULL(source->weight, false);
+    PS_ASSERT_PTR_NON_NULL(source->variance, false);
 
     bool fitStatus = true;
@@ -471,6 +471,6 @@
                 continue;
             }
-            // skip zero-weight points
-            if (source->weight->data.F32[i][j] == 0) {
+            // skip zero-variance points
+            if (source->variance->data.F32[i][j] == 0) {
                 continue;
             }
@@ -489,8 +489,8 @@
 
             // psMinimizeLMChi2 takes wt = 1/dY^2.  suggestion from RHL is to use the local sky
-            // as weight to avoid the bias from systematic errors here we would just use the
+            // as variance to avoid the bias from systematic errors here we would just use the
             // source sky variance
             if (PM_SOURCE_FIT_MODEL_PIX_WEIGHTS) {
-                yErr->data.F32[nPix] = 1.0 / source->weight->data.F32[i][j];
+                yErr->data.F32[nPix] = 1.0 / source->variance->data.F32[i][j];
             } else {
                 yErr->data.F32[nPix] = 1.0 / PM_SOURCE_FIT_MODEL_WEIGHT;
@@ -543,5 +543,5 @@
         psFree (params);
         psFree(constraint);
-	pmSourceFitSetDataClear(); // frees thisSet and removes if from the array of fitSets
+        pmSourceFitSetDataClear(); // frees thisSet and removes if from the array of fitSets
         return(false);
     }
Index: trunk/psModules/src/objects/pmSourceMoments.c
===================================================================
--- trunk/psModules/src/objects/pmSourceMoments.c	(revision 21352)
+++ trunk/psModules/src/objects/pmSourceMoments.c	(revision 21363)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-01-27 06:39:38 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:31:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -47,5 +47,5 @@
     pmSource->peak
     pmSource->pixels
-    pmSource->weight (optional)
+    pmSource->variance (optional)
     pmSource->mask (optional)
 
@@ -99,5 +99,5 @@
 
         psF32 *vPix = source->pixels->data.F32[row];
-        psF32 *vWgt = source->weight->data.F32[row];
+        psF32 *vWgt = source->variance->data.F32[row];
         psImageMaskType *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row];
 
@@ -110,5 +110,5 @@
                 vMsk++;
             }
-	    if (isnan(*vPix)) continue;
+            if (isnan(*vPix)) continue;
 
             psF32 xDiff = col - xPeak;
@@ -189,5 +189,5 @@
 
         psF32 *vPix = source->pixels->data.F32[row];
-        psF32 *vWgt = source->weight->data.F32[row];
+        psF32 *vWgt = source->variance->data.F32[row];
         psImageMaskType  *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row];
 
@@ -200,5 +200,5 @@
                 vMsk++;
             }
-	    if (isnan(*vPix)) continue;
+            if (isnan(*vPix)) continue;
 
             psF32 xDiff = col - xCM;
@@ -206,6 +206,6 @@
 
             // radius is just a function of (xDiff, yDiff)
-	    psF32 r2  = PS_SQR(xDiff) + PS_SQR(yDiff);
-	    psF32 r  = sqrt(r2);
+            psF32 r2  = PS_SQR(xDiff) + PS_SQR(yDiff);
+            psF32 r  = sqrt(r2);
             if (r > radius) continue;
 
@@ -278,5 +278,5 @@
 
     psTrace ("psModules.objects", 4, "Mxx: %f  Mxy: %f  Myy: %f  Mxxx: %f  Mxxy: %f  Mxyy: %f  Myyy: %f  Mxxxx: %f  Mxxxy: %f  Mxxyy: %f  Mxyyy: %f  Mxyyy: %f\n",
-             source->moments->Mxx,   source->moments->Mxy,   source->moments->Myy, 
+             source->moments->Mxx,   source->moments->Mxy,   source->moments->Myy,
              source->moments->Mxxx,  source->moments->Mxxy,  source->moments->Mxyy,  source->moments->Myyy,
              source->moments->Mxxxx, source->moments->Mxxxy, source->moments->Mxxyy, source->moments->Mxyyy, source->moments->Myyyy);
@@ -286,8 +286,8 @@
 
     if (source->moments->Mxx < 0) {
-	fprintf (stderr, "error: neg second moment??\n");
+        fprintf (stderr, "error: neg second moment??\n");
     }
     if (source->moments->Myy < 0) {
-	fprintf (stderr, "error: neg second moment??\n");
+        fprintf (stderr, "error: neg second moment??\n");
     }
 
@@ -341,5 +341,5 @@
 
         psF32 *vPix = source->pixels->data.F32[row];
-        psF32 *vWgt = source->weight->data.F32[row];
+        psF32 *vWgt = source->variance->data.F32[row];
         psImageMaskType  *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row];
 
@@ -352,5 +352,5 @@
                 vMsk++;
             }
-	    if (isnan(*vPix)) continue;
+            if (isnan(*vPix)) continue;
 
             psF32 xDiff = col - xPeak;
@@ -407,5 +407,5 @@
     }
 
-# if (PS_TRACE_ON) 
+# if (PS_TRACE_ON)
     float Sxx = PS_MAX(X2/Sum - PS_SQR(x), 0);
     float Sxy = XY / Sum;
Index: trunk/psModules/src/objects/pmSourcePhotometry.c
===================================================================
--- trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 21352)
+++ trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 21363)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA; GLG, MHPCC
  *
- *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-01-27 06:39:38 $
+ *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:31:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -446,5 +446,5 @@
     assert (Pj != NULL);
 
-    const psImage *Wi = Mi->weight;
+    const psImage *Wi = Mi->variance;
     if (!unweighted_sum) {
         assert (Wi != NULL);
@@ -511,5 +511,5 @@
     assert (Pj != NULL);
 
-    const psImage *Wi = Mi->weight;
+    const psImage *Wi = Mi->variance;
     if (!unweighted_sum) {
         assert (Wi != NULL);
@@ -567,5 +567,5 @@
     const psImage *Pi = Mi->pixels;
     assert (Pi != NULL);
-    const psImage *Wi = Mi->weight;
+    const psImage *Wi = Mi->variance;
     if (!unweighted_sum) {
         assert (Wi != NULL);
@@ -612,5 +612,5 @@
 # endif
 
-bool pmSourceChisq (pmModel *model, psImage *image, psImage *mask, psImage *weight,
+bool pmSourceChisq (pmModel *model, psImage *image, psImage *mask, psImage *variance,
                     psImageMaskType maskVal)
 {
@@ -618,5 +618,5 @@
     PS_ASSERT_PTR_NON_NULL(image, false);
     PS_ASSERT_PTR_NON_NULL(mask, false);
-    PS_ASSERT_PTR_NON_NULL(weight, false);
+    PS_ASSERT_PTR_NON_NULL(variance, false);
 
     double dC = 0.0;
@@ -626,7 +626,7 @@
             if (mask->data.PS_TYPE_IMAGE_MASK_DATA[j][i] & maskVal)
                 continue;
-            if (weight->data.F32[j][i] <= 0)
-                continue;
-            dC += PS_SQR (image->data.F32[j][i]) / weight->data.F32[j][i];
+            if (variance->data.F32[j][i] <= 0)
+                continue;
+            dC += PS_SQR (image->data.F32[j][i]) / variance->data.F32[j][i];
             Npix ++;
         }
@@ -648,5 +648,5 @@
     const psImage *Pi = Mi->modelFlux;
     assert (Pi != NULL);
-    const psImage *Wi = Mi->weight;
+    const psImage *Wi = Mi->variance;
     if (!unweighted_sum) {
         assert (Wi != NULL);
@@ -706,5 +706,5 @@
     assert (Pj != NULL);
 
-    const psImage *Wi = Mi->weight;
+    const psImage *Wi = Mi->variance;
     if (!unweighted_sum) {
         assert (Wi != NULL);
@@ -770,5 +770,5 @@
     assert (Pj != NULL);
 
-    const psImage *Wi = Mi->weight;
+    const psImage *Wi = Mi->variance;
     if (!unweighted_sum) {
         assert (Wi != NULL);
Index: trunk/psModules/src/objects/pmSourceSky.c
===================================================================
--- trunk/psModules/src/objects/pmSourceSky.c	(revision 21352)
+++ trunk/psModules/src/objects/pmSourceSky.c	(revision 21363)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-01-27 06:39:38 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:31:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -113,5 +113,5 @@
     psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);
     PS_ASSERT_PTR_NON_NULL(source, false);
-    PS_ASSERT_IMAGE_NON_NULL(source->weight, false);
+    PS_ASSERT_IMAGE_NON_NULL(source->variance, false);
     PS_ASSERT_IMAGE_NON_NULL(source->maskObj, false);
     PS_ASSERT_PTR_NON_NULL(source->peak, false);
@@ -127,5 +127,5 @@
     }
 
-    psImage *image = source->weight;
+    psImage *image = source->variance;
     psImage *mask  = source->maskObj;
     pmPeak *peak  = source->peak;
