Index: trunk/psModules/src/objects/pmSource.c
===================================================================
--- trunk/psModules/src/objects/pmSource.c	(revision 20233)
+++ trunk/psModules/src/objects/pmSource.c	(revision 20249)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-10-09 00:58:39 $
+ *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-10-18 00:48:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -279,7 +279,4 @@
     psTrace("psModules.objects", 5, "---- begin ----\n");
 
-// XXX This should be in the recipe
-#define SCALE 0.1                       // Scale of splane
-
     psArray *peaks  = NULL;
     pmPSFClump errorClump = {-1.0, -1.0, 0.0, 0.0};
@@ -294,4 +291,8 @@
     if (!status) {
         PSF_CLUMP_SN_LIM = 0;
+    }
+    float PSF_CLUMP_GRID_SCALE = psMetadataLookupF32(&status, recipe, "PSF_CLUMP_GRID_SCALE");
+    if (!status) {
+        PSF_CLUMP_GRID_SCALE = 0.1;
     }
 
@@ -316,5 +317,5 @@
 
         // construct a sigma-plane image
-        int numCols = SX_MAX / SCALE, numRows = SY_MAX / SCALE; // Size of sigma-plane image
+        int numCols = SX_MAX / PSF_CLUMP_GRID_SCALE, numRows = SY_MAX / PSF_CLUMP_GRID_SCALE; // Size of sigma-plane image
         psTrace("psModules.objects", 10, "sigma-plane dimensions: %dx%d\n", numCols, numRows);
         psImage *splane = psImageAlloc(numCols, numRows, PS_TYPE_F32); // sigma-plane image
@@ -373,5 +374,5 @@
 
             // for the moment, force splane dimensions to be 10x10 image pix
-            int binX = Mxx / SCALE, binY = Myy /  SCALE; // Position on splane
+            int binX = Mxx / PSF_CLUMP_GRID_SCALE, binY = Myy /  PSF_CLUMP_GRID_SCALE; // Position on splane
             psAssert(binX >= 0 && binX < numCols && binY >= 0 && binY < numRows, "We checked it already");
 
@@ -428,8 +429,8 @@
 
         // define section window for clump
-        minSx = clump->x * SCALE - 0.2;
-        maxSx = clump->x * SCALE + 0.2;
-        minSy = clump->y * SCALE - 0.2;
-        maxSy = clump->y * SCALE + 0.2;
+        minSx = clump->x * PSF_CLUMP_GRID_SCALE - 2.0*PSF_CLUMP_GRID_SCALE;
+        maxSx = clump->x * PSF_CLUMP_GRID_SCALE + 2.0*PSF_CLUMP_GRID_SCALE;
+        minSy = clump->y * PSF_CLUMP_GRID_SCALE - 2.0*PSF_CLUMP_GRID_SCALE;
+        maxSy = clump->y * PSF_CLUMP_GRID_SCALE + 2.0*PSF_CLUMP_GRID_SCALE;
 
         tmpSx = psVectorAllocEmpty (sources->n, PS_TYPE_F32);
