Index: trunk/psphot/src/pmFootprint.c
===================================================================
--- trunk/psphot/src/pmFootprint.c	(revision 13350)
+++ trunk/psphot/src/pmFootprint.c	(revision 13351)
@@ -863,4 +863,54 @@
 /************************************************************************************************************/
 /*
+ * Grow a psArray of pmFootprints isotropically by r pixels, returning a new psArray of new pmFootprints
+ */
+psArray *pmGrowFootprintArray(const psArray *footprints, // footprints to grow
+			      int r) {	// how much to grow each footprint
+    assert (footprints->n == 0 || pmIsFootprint(footprints->data[0]));
+
+    if (footprints->n == 0) {		// we don't know the size of the footprint's region
+	return psArrayAlloc(0);
+    }
+    /*
+     * We'll insert the footprints into an image, then convolve with a disk,
+     * then extract a footprint from the result --- this is magically what we want.
+     */
+    psImage *idImage = pmSetFootprintArrayIDs(footprints, true);
+    if (r <= 0) {
+	r = 1;				// r == 1 => no grow
+    }
+    psKernel *circle = psKernelAlloc(-r, r, -r, r);
+    assert (circle->image->numRows == 2*r + 1 && circle->image->numCols == circle->image->numRows);
+    for (int i = 0; i <= r; i++) {
+	for (int j = 0; j <= r; j++) {
+	    if (i*i + j*j <= r*r) {
+		circle->kernel[i][j] = 
+		    circle->kernel[i][-j] = 
+		    circle->kernel[-i][j] = 
+		    circle->kernel[-i][-j] = 1;
+	    }
+	}
+    }
+
+    psImage *grownIdImage = psImageConvolveDirect(idImage, circle);
+    psFree(circle);	
+
+    psArray *grown = pmFindFootprints(grownIdImage, 0.5, 1);
+    assert (grown != NULL);
+    psFree(idImage); psFree(grownIdImage);
+    /*
+     * Now assign the peaks appropriately.  We could do this more efficiently
+     * using idImage (which we just freed), but this is easy and probably fast enough
+     */
+    const psArray *peaks = pmFootprintArrayToPeaks(footprints);
+    pmPeaksAssignToFootprints(grown, peaks);
+    psFree((psArray *)peaks);
+
+    return grown;
+    
+}
+
+/************************************************************************************************************/
+/*
  * Merge together two psArrays of pmFootprints neither of which is damaged.
  *
@@ -911,5 +961,5 @@
     /*
      * Now assign the peaks appropriately.  We could do this more efficiently
-     * using idImage (which we just freed), but this is easy any probably fast enough
+     * using idImage (which we just freed), but this is easy and probably fast enough
      */
     const psArray *peaks;
Index: trunk/psphot/src/pmFootprint.h
===================================================================
--- trunk/psphot/src/pmFootprint.h	(revision 13350)
+++ trunk/psphot/src/pmFootprint.h	(revision 13351)
@@ -35,4 +35,5 @@
                                     int row, int col);
 
+psArray *pmGrowFootprintArray(const psArray *footprints, int r);
 psArray *pmMergeFootprintArrays(const psArray *footprints1, const psArray *footprints2);
 
Index: trunk/psphot/src/psphotReadout.c
===================================================================
--- trunk/psphot/src/psphotReadout.c	(revision 13350)
+++ trunk/psphot/src/psphotReadout.c	(revision 13351)
@@ -65,4 +65,11 @@
     if (useFootprints) {
        psArray *footprints = psphotFindPeaks (readout, recipe, useFootprints, 1);
+       int growRadius = psMetadataLookupS32(None, recipe, "FOOTPRINT_GROW_RADIUS");
+       if (growRadius > 0) {
+	   psArray *tmp = pmGrowFootprintArray(footprints, growRadius);
+	   psFree(footprints);
+	   footprints = tmp;
+       }
+
        peaks = pmFootprintArrayToPeaks(footprints);
        psFree(footprints);
@@ -170,4 +177,11 @@
        psArray *newFootprints = psphotFindPeaks (readout, recipe, useFootprints, 2);
 
+       int growRadius = psMetadataLookupS32(None, recipe, "FOOTPRINT_GROW_RADIUS_2");
+       if (growRadius > 0) {
+	   psArray *tmp = pmGrowFootprintArray(newFootprints, growRadius);
+	   psFree(newFootprints);
+	   newFootprints = tmp;
+       }
+
        psphotCullPeaks(readout->image, readout->weight, recipe, newFootprints);
 
