Index: trunk/psphot/src/psphotFitSourcesLinear.c
===================================================================
--- trunk/psphot/src/psphotFitSourcesLinear.c	(revision 21183)
+++ trunk/psphot/src/psphotFitSourcesLinear.c	(revision 21366)
@@ -68,5 +68,5 @@
 
         // if (source->type == PM_SOURCE_TYPE_STAR &&
-	if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue;
+        if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue;
 
         if (final) {
@@ -76,8 +76,8 @@
         }
 
-	// generate model for sources without, or skip if we can't
-	if (!source->modelFlux) {
-	    if (!pmSourceCacheModel (source, maskVal)) continue;
-	}
+        // generate model for sources without, or skip if we can't
+        if (!source->modelFlux) {
+            if (!pmSourceCacheModel (source, maskVal)) continue;
+        }
 
         // save the original coords
@@ -96,5 +96,5 @@
 
     // vectors to store stats for each object
-    // psVector *weight = psVectorAlloc (fitSources->n, PS_TYPE_F32);
+    // psVector *variance = psVectorAlloc (fitSources->n, PS_TYPE_F32);
     psVector *errors = psVectorAlloc (fitSources->n, PS_TYPE_F32);
 
@@ -128,5 +128,5 @@
         psSparseVectorElement (sparse, i, f);
 
-        // add the per-source weights (border region)
+        // add the per-source variances (border region)
         switch (SKY_FIT_ORDER) {
           case 1:
@@ -208,5 +208,5 @@
         pmSource *source = fitSources->data[i];
         pmModel *model = pmSourceGetModel (NULL, source);
-        pmSourceChisq (model, source->pixels, source->maskObj, source->weight, maskVal);
+        pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal);
     }
     psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "get chisqs: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem);
@@ -253,5 +253,5 @@
     // accumulate the image statistics from the masked regions
     psF32 **image  = readout->image->data.F32;
-    psF32 **weight = readout->weight->data.F32;
+    psF32 **variance = readout->variance->data.F32;
     psImageMaskType  **mask   = readout->mask->data.PS_TYPE_IMAGE_MASK_DATA;
 
@@ -268,5 +268,5 @@
                 wt = 1.0;
             } else {
-                wt = weight[j][i];
+                wt = variance[j][i];
             }
             f = image[j][i];
