Index: /trunk/psphot/src/psphotStackImageLoop.c
===================================================================
--- /trunk/psphot/src/psphotStackImageLoop.c	(revision 32703)
+++ /trunk/psphot/src/psphotStackImageLoop.c	(revision 32704)
@@ -10,4 +10,5 @@
 bool UpdateHeadersForFPA (pmConfig *config, pmFPAview *view);
 bool UpdateHeadersForChip (pmConfig *config, pmFPAview *view);
+bool UpdateHeadersForReadout (pmConfig *config, pmFPAview *view);
 
 bool psphotStackImageLoop (pmConfig *config) {
@@ -66,4 +67,7 @@
                     return false;
 		}
+
+		UpdateHeadersForReadout(config, view);
+
 		psMemDump("psphot");
 	    }
@@ -101,4 +105,33 @@
 }
 
+bool UpdateHeadersForReadout (pmConfig *config, pmFPAview *view) {
+
+    psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, PSPHOT_RECIPE);
+    bool useRaw = psMetadataLookupBool (NULL, recipe, "PSPHOT.STACK.USE.RAW");
+
+    int num = psphotFileruleCount(config, "PSPHOT.INPUT");
+
+    // loop over the available readouts
+    for (int i = 0; i < num; i++) {
+
+	// find the currently selected readout
+	pmFPAfile *output = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.OUTPUT.IMAGE", i); // File of interest
+	psAssert (output, "missing file?");
+
+	pmFPAfile *inputRaw = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.INPUT.RAW", i); // File of interest
+	pmFPAfile *inputCnv = pmFPAfileSelectSingle(config->files, "PSPHOT.STACK.INPUT.CNV", i); // File of interest
+	pmFPAfile *input = useRaw ? inputRaw : inputCnv;
+	psAssert (input, "missing input file");
+
+	// just copy the input headers to the output headers, then update version info
+	pmReadout *inReadout = pmFPAviewThisReadout(view, input->fpa); ///< Chip in the input
+	pmReadout *outReadout = pmFPAviewThisReadout(view, output->fpa); ///< Chip in the output
+
+	psMetadata *header = psMetadataLookupPtr (NULL, inReadout->analysis, "PSPHOT.HEADER");
+	psMetadataAdd (outReadout->analysis, PS_LIST_TAIL, "PSPHOT.HEADER",  PS_DATA_METADATA, "header stats", header);
+    }
+    return true;
+}
+
 bool UpdateHeadersForChip (pmConfig *config, pmFPAview *view) {
 
