Index: branches/eam_branches/ipp-20130419/pswarp/src/pswarpMaskStats.c
===================================================================
--- branches/eam_branches/ipp-20130419/pswarp/src/pswarpMaskStats.c	(revision 35524)
+++ branches/eam_branches/ipp-20130419/pswarp/src/pswarpMaskStats.c	(revision 35525)
@@ -32,14 +32,11 @@
     return false;
   }
-  psMetadataAddS32(stats, PS_LIST_TAIL,"MASKFRAC_NPIX", 0,
-                   "Number of valid pixels", Npix_valid);
-  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_STATIC", 0,
-                   "Fraction of pixels statically masked", (float) Npix_static / Npix_valid);
-  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_DYNAMIC", 0,
-                   "Fraction of pixels dynamically masked", (float) Npix_dynamic / Npix_valid);
-  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_MAGIC", 0,
-                   "Fraction of pixels magically masked", (float) Npix_magic / Npix_valid);
-  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_ADVISORY", 0,
-                   "Fraction of pixels masked as an advisory", (float) Npix_advisory / Npix_valid);
+
+  // XXX with multiple inputs (eg, output stacks -> exposure), these only represent the last input
+  psMetadataAddS32(stats, PS_LIST_TAIL,"MASKFRAC_NPIX",     PS_META_REPLACE, "Number of valid pixels", Npix_valid);
+  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_STATIC",   PS_META_REPLACE, "Fraction of pixels statically masked", (float) Npix_static / Npix_valid);
+  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_DYNAMIC",  PS_META_REPLACE, "Fraction of pixels dynamically masked", (float) Npix_dynamic / Npix_valid);
+  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_MAGIC",    PS_META_REPLACE, "Fraction of pixels magically masked", (float) Npix_magic / Npix_valid);
+  psMetadataAddF32(stats,PS_LIST_TAIL, "MASKFRAC_ADVISORY", PS_META_REPLACE, "Fraction of pixels masked as an advisory", (float) Npix_advisory / Npix_valid);
   return true;
 }
Index: branches/eam_branches/ipp-20130419/pswarp/src/pswarpOverlaps.c
===================================================================
--- branches/eam_branches/ipp-20130419/pswarp/src/pswarpOverlaps.c	(revision 35524)
+++ branches/eam_branches/ipp-20130419/pswarp/src/pswarpOverlaps.c	(revision 35525)
@@ -166,4 +166,6 @@
 bool pswarpFindOverlap (pmFPA *input, pmFPA *output, pswarpBounds *src, pswarpBounds *tgt) {
 
+    bool status = false;
+
     // we have the source and target bounds.  loop over all output elements and check if any of the source
     // elements overlap it.
@@ -204,14 +206,15 @@
 	    psArrayAdd (inputChips, 1, input->chips->data[i]);
 	}
-	chip->process = hasOverlap;
+	chip->process |= hasOverlap;
 	if (hasOverlap) {
+	    pmChipSelectCells (chip);
 	    // get the complete list of input cells for this set of input chips
 	    // pmConceptsAverageCells needs a psList (not a psArray)
-	    psList *inputCells = psListAlloc(NULL);
+	    psArray *inputCells = psArrayAllocEmpty(8);
 	    for (int nChip = 0; nChip < inputChips->n; nChip++) {
 		pmChip *inputChip = inputChips->data[nChip];
 		for (int nCell = 0; nCell < inputChip->cells->n; nCell++) {
 		    fprintf (stderr, "input %d, %d : output %d\n", nChip, nCell, j);
-		    psListAdd (inputCells, PS_LIST_TAIL, inputChip->cells->data[nCell]);
+		    psArrayAdd (inputCells, 8, inputChip->cells->data[nCell]);
 		}
 	    }
@@ -220,5 +223,13 @@
 	    for (int nCell = 0; nCell < chip->cells->n; nCell++) {
 		pmCell *outputCell = chip->cells->data[nCell];
-		psMetadataAddPtr(outputCell->analysis, PS_LIST_TAIL, "INPUT.CELLS", PS_DATA_LIST , "input cells touching this output cell", inputCells);
+		psList *outList = psMetadataLookupPtr(&status, outputCell->analysis, "INPUT.CELLS");
+		if (!outList) {
+		    outList = psListAlloc(NULL);
+		    psMetadataAddPtr(outputCell->analysis, PS_LIST_TAIL, "INPUT.CELLS", PS_DATA_LIST , "input cells touching this output cell", outList);
+		    psFree (outList);
+		}
+		for (int nCell = 0; nCell < inputCells->n; nCell ++) {
+		    psListAdd (outList, PS_LIST_TAIL, inputCells->data[nCell]);
+		}
 	    }
 	    psFree (inputCells);
Index: branches/eam_branches/ipp-20130419/pswarp/src/pswarpPixelsLit.c
===================================================================
--- branches/eam_branches/ipp-20130419/pswarp/src/pswarpPixelsLit.c	(revision 35524)
+++ branches/eam_branches/ipp-20130419/pswarp/src/pswarpPixelsLit.c	(revision 35525)
@@ -72,10 +72,10 @@
     }
 
-    // XXX need to add these in a container appropriate to the element
     if (stats) {
-        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMIN", 0, "Minimum valid x value", xMin);
-        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMAX", 0, "Maximum valid x value", xMax);
-        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMIN", 0, "Minimum valid y value", yMin);
-        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMAX", 0, "Maximum valid y value", yMax);
+	// XXX with multiple inputs (eg, output stacks -> exposure), these only represent the last input
+        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMIN", PS_META_REPLACE, "Minimum valid x value", xMin);
+        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.XMAX", PS_META_REPLACE, "Maximum valid x value", xMax);
+        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMIN", PS_META_REPLACE, "Minimum valid y value", yMin);
+        psMetadataAddS32(stats, PS_LIST_TAIL, "RANGE.YMAX", PS_META_REPLACE, "Maximum valid y value", yMax);
     }
 
