Index: trunk/ppStack/src/ppStackReadout.c
===================================================================
--- trunk/ppStack/src/ppStackReadout.c	(revision 14278)
+++ trunk/ppStack/src/ppStackReadout.c	(revision 14298)
@@ -10,4 +10,5 @@
 
 #define ARRAY_BUFFER 16                 // Number to add to array at a time
+#define WCS_TOLERANCE 0.001             // Tolerance for WCS
 
 bool ppStackReadout(pmConfig *config, const pmFPAview *view)
@@ -26,4 +27,5 @@
     pmCell *outCell = pmFPAfileThisCell(config->files, view, "PPSTACK.OUTPUT"); // Output cell
     pmReadout *outRO = pmReadoutAlloc(outCell); // Output readout
+    pmFPA *outFPA = outCell->parent->parent; // Output FPA
 
     int num = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs
@@ -39,4 +41,5 @@
     int fileNum = 0;                    // Number of file
     float totExposure = 0.0;            // Total exposure time
+    pmReadout *templateRO = NULL;       // Template readout, for copy WCS
     while ((fileItem = psMetadataGetAndIncrement(fileIter))) {
         assert(fileItem->type == PS_DATA_UNKNOWN);
@@ -89,4 +92,8 @@
             ro->mask = psImageAlloc(ro->image->numCols, ro->image->numRows, PS_TYPE_MASK);
             psImageInit(ro->mask, 0);
+        }
+
+        if (fileNum == 0) {
+            templateRO = ro;
         }
 
@@ -170,6 +177,27 @@
 
     outRO->data_exists = true;
-    outRO->parent->data_exists = true;
-    outRO->parent->parent->data_exists = true;
+    outCell->data_exists = true;
+    outCell->parent->data_exists = true;
+
+    // Copy astrometry over
+    pmFPA *templateFPA = templateRO->parent->parent->parent; // Template FPA
+    pmHDU *templateHDU = templateFPA->hdu; // Template HDU
+    pmHDU *outHDU = outFPA->hdu; // Output HDU
+    if (!outHDU || !templateHDU) {
+        psWarning("Unable to find HDU at FPA level to copy astrometry.");
+    } else {
+        if (!pmAstromReadWCS(outFPA, outCell->parent, templateHDU->header, 1.0)) {
+            psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry from input FPA.");
+            psFree(stack);
+            psFree(outRO);
+            return false;
+        }
+        if (!pmAstromWriteWCS(outHDU->header, outFPA, outCell->parent, WCS_TOLERANCE)) {
+            psError(PS_ERR_UNKNOWN, false, "Unable to write WCS astrometry to output FPA.");
+            psFree(stack);
+            psFree(outRO);
+            return false;
+        }
+    }
 
     psFree(stack);
