Index: trunk/psLib/src/image/psImageConvolve.c
===================================================================
--- trunk/psLib/src/image/psImageConvolve.c	(revision 3682)
+++ trunk/psLib/src/image/psImageConvolve.c	(revision 3702)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-07 20:27:41 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-15 00:12:08 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -398,6 +398,4 @@
         }
 
-        psImageWriteSection(paddedImage,0,0,0,NULL,0,"paddedImage.fits");
-
         // pad the kernel to the same size of paddedImage
         psImage* paddedKernel = psImageAlloc(paddedCols,paddedRows,PS_TYPE_KERNEL);
@@ -421,6 +419,4 @@
         }
 
-        psImageWriteSection(paddedKernel,0,0,0,NULL,0,"paddedKernel.fits");
-
         psImage* kernelFourier = psImageFFT(NULL, paddedKernel, PS_FFT_FORWARD);
         if (kernelFourier == NULL) {
@@ -440,5 +436,11 @@
 
         // convolution in fourier domain is just a pixel-wise multiplication
-        psBinaryOp(inFourier,inFourier,"*",kernelFourier);
+        for (int row = 0; row < paddedRows; row++) {
+            psC32* inRow = inFourier->data.C32[row];
+            psC32* kRow = kernelFourier->data.C32[row];
+            for (int col = 0; col < paddedCols; col++) {
+                inRow[col] *= kRow[col];
+            }
+        }
 
         psImage* complexOut = psImageFFT(NULL, inFourier,
@@ -451,10 +453,4 @@
         }
 
-        {
-            psImage* tmp = psImageReal(NULL,complexOut);
-            psImageWriteSection(tmp,0,0,0,NULL,0,"complexOut.fits");
-            psFree(tmp);
-        }
-
         // subset out the padded area now.
         psImage* complexOutSansPad = psImageSubset(complexOut,
@@ -463,5 +459,5 @@
 
         out = psImageRecycle(out,numCols,numRows,PS_TYPE_F32);
-        float factor = 1.0f/numCols/numRows;
+        float factor = 1.0f/(float)paddedCols/(float)paddedRows;
         for (psS32 row = 0; row < numRows; row++) {
             psF32* outRow = out->data.F32[row];
