Index: trunk/psLib/src/imageops/psImageInterpolate.c
===================================================================
--- trunk/psLib/src/imageops/psImageInterpolate.c	(revision 16338)
+++ trunk/psLib/src/imageops/psImageInterpolate.c	(revision 16351)
@@ -7,6 +7,6 @@
  *  @author Paul Price, IfA
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-11-17 00:39:29 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-02-07 04:03:22 $
  *
  *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
@@ -312,13 +312,9 @@
         #define KERNEL_VARIANCE_CASE(TYPE) \
             case PS_TYPE_##TYPE: { \
-                double sumKernel2 = 0.0; /* Sum of kernel squares */ \
                 for (int j = 0, yPix = yCentral - (yNum - 1) / 2; j < yNum; j++, yPix++) { \
                     for (int i = 0, xPix = xCentral - (xNum - 1) / 2; i < xNum; i++, xPix++) { \
-                        double kernel2 = PS_SQR(kernel[j][i]); /* Kernel squared */ \
-                        sumKernel2 += kernel2; \
-                        *varianceValue += kernel2 * variance->data.TYPE[yPix][xPix]; \
+                        *varianceValue += PS_SQR(kernel[j][i]) * variance->data.TYPE[yPix][xPix]; \
                     } \
                 } \
-                *varianceValue /= sumKernel2; /* Normalise so that sum of kernel squares is unity */ \
                 break; \
             }
@@ -546,18 +542,11 @@
         #define SEPARATE_VARIANCE_CASE(TYPE) \
           case PS_TYPE_##TYPE: { \
-            double ySumKernel2 = 0.0; /* Sum of kernel squared in y */ \
             for (int j = 0, yPix = yCentral - (yNum - 1) / 2; j < yNum; j++, yPix++) { \
                 double xInterpValue = 0.0; /* Interpolation in x */ \
-                double xSumKernel2 = 0.0; /* Sum of kernel squared in x */ \
                 for (int i = 0, xPix = xCentral - (xNum - 1) / 2; i < xNum; i++, xPix++) { \
-                    double kernel2 = PS_SQR(xKernel[i]); /* Kernel squared */ \
-                    xSumKernel2 += kernel2; \
-                    xInterpValue += kernel2 * variance->data.TYPE[yPix][xPix]; \
+                    xInterpValue += PS_SQR(xKernel[i]) * variance->data.TYPE[yPix][xPix]; \
                 } \
-                double kernel2 = PS_SQR(yKernel[j]); /* Kernel squared */ \
-                ySumKernel2 += xSumKernel2 * kernel2; \
-                *varianceValue += xInterpValue * kernel2; /* Interpolating in y */ \
+                *varianceValue += xInterpValue * PS_SQR(yKernel[j]); /* Interpolating in y */ \
             } \
-            *varianceValue /= ySumKernel2; /* Normalise so that sum of kernel squares is unity */ \
             break; \
           }
@@ -604,9 +593,9 @@
         PS_ASSERT_IMAGE_NON_NULL(mask, PS_INTERPOLATE_STATUS_ERROR);
         PS_ASSERT_IMAGE_TYPE(mask, PS_TYPE_MASK, PS_INTERPOLATE_STATUS_ERROR);
-	if ((image->numCols != mask->numCols) || (image->numRows != mask->numRows)) { 
-	  psAbort ("programming error");
-	}
+        if ((image->numCols != mask->numCols) || (image->numRows != mask->numRows)) {
+          psAbort ("programming error");
+        }
         PS_ASSERT_IMAGES_SIZE_EQUAL(mask, image, PS_INTERPOLATE_STATUS_ERROR);
-	// XXX these should probably be asserts, not PS_ASSERTS
+        // XXX these should probably be asserts, not PS_ASSERTS
     }
 
