Index: trunk/ppStack/src/ppStackReadout.c
===================================================================
--- trunk/ppStack/src/ppStackReadout.c	(revision 13512)
+++ trunk/ppStack/src/ppStackReadout.c	(revision 13513)
@@ -41,4 +41,5 @@
     psRandom *rng = psRandomAlloc(0, PS_RANDOM_TAUS); // Random number generator
     int fileNum = 0;                    // Number of file
+    float totExposure = 0.0;            // Total exposure time
     while ((item = psMetadataGetAndIncrement(inputIter))) {
         assert(item->type == PS_DATA_UNKNOWN);
@@ -70,4 +71,5 @@
             return false;
         }
+        totExposure += exposure;        // Total exposure time
         (void)psBinaryOp(ro->image, ro->image, "/", psScalarAlloc(exposure, PS_TYPE_F32));
         pmStackData *data = pmStackDataAlloc(ro, seeing ? seeing->data.F32[fileNum] : 0.0,
@@ -143,4 +145,9 @@
     }
 
+    // Restore image to counts using the total exposure time
+    (void)psBinaryOp(outRO->image, outRO->image, "*", psScalarAlloc(totExposure, PS_TYPE_F32));
+    psMetadataAddF32(outRO->parent->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE,
+                     "Summed exposure time (sec)", totExposure);
+
     outRO->data_exists = true;
     outRO->parent->data_exists = true;
