Index: trunk/ppStack/src/ppStackLoop.c
===================================================================
--- trunk/ppStack/src/ppStackLoop.c	(revision 19411)
+++ trunk/ppStack/src/ppStackLoop.c	(revision 19475)
@@ -771,4 +771,6 @@
     }
 
+    psThreadPoolFinalize();
+
     memDump("final");
 
@@ -786,13 +788,29 @@
     // Close up
     bool wcsDone = false;           // Have we done the WCS?
+    psList *fpaList = psListAlloc(NULL); // List of input FPAs, for concept averaging
+    psList *cellList = psListAlloc(NULL); // List of input cells, for concept averaging
+    float totExposure = 0.0;            // Total exposure time
     for (int i = 0; i < num; i++) {
         if (!inputMask->data.U8[i]) {
             continue;
         }
+        ppStackThread *thread = stack->threads->data[0]; // Representative stack
+        pmReadout *inRO = thread->readouts->data[i]; // Template readout
+        if (!inRO) {
+            continue;
+        }
+        float exposure = psMetadataLookupF32(NULL, inRO->parent->concepts, "CELL.EXPOSURE"); // Exposure time
+        if (!isfinite(exposure)) {
+            psWarning("CELL.EXPOSURE not set for readout %d", i);
+        } else {
+            totExposure += exposure;
+        }
+
+        psListAdd(cellList, PS_LIST_TAIL, inRO->parent);
+        psListAdd(fpaList, PS_LIST_TAIL, inRO->parent->parent->parent);
+
         if (!wcsDone) {
             // Copy astrometry over
             wcsDone = true;
-            ppStackThread *thread = stack->threads->data[0]; // Representative stack
-            pmReadout *inRO = thread->readouts->data[i]; // Template readout
             if (inRO) {
                 pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU
@@ -838,4 +856,18 @@
     psFree(weightNames);
 
+    // Copy concepts
+    pmCell *outCell = outRO->parent;    // Output cell
+    pmChip *outChip = outCell->parent;  // Output chip
+    pmFPA *outFPA = outChip->parent;    // Output FPA
+    psMetadataAddF32(outCell->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE,
+                     "Summed exposure time (sec)", totExposure);
+    psMetadataAddF32(outFPA->concepts, PS_LIST_TAIL, "FPA.EXPOSURE", PS_META_REPLACE,
+                     "Summed exposure time (sec)", totExposure);
+
+    pmConceptsAverageFPAs(outFPA, fpaList);
+    pmConceptsAverageCells(outCell, cellList, NULL, NULL, true);
+    psFree(fpaList);
+    psFree(cellList);
+
     psFree(inputMask);
     psFree(stack);
