Index: /trunk/psastro/src/psastroOneChip.c
===================================================================
--- /trunk/psastro/src/psastroOneChip.c	(revision 10788)
+++ /trunk/psastro/src/psastroOneChip.c	(revision 10789)
@@ -2,4 +2,6 @@
 
 bool psastroOneChip (pmFPA *fpa, pmChip *chip, psArray *refstars, psArray *rawstars, psMetadata *recipe, psMetadata *updates) {
+
+    bool status;
 
     // find initial offset / rotation
@@ -30,9 +32,19 @@
     }
 
+    int nX = psMetadataLookupS32 (&status, recipe, "PSASTRO.CHIP.NX");
+    if (!status) nX = 1;
+
+    int nY = psMetadataLookupS32 (&status, recipe, "PSASTRO.CHIP.NY");
+    if (!status) nY = 1;
+
+    psPlaneTransform *toFPAout = psPlaneTransformAlloc (nX, nY);
+
     // improved fit for astrometric terms
-    if (!pmAstromMatchFit (chip->toFPA, rawstars, refstars, match, recipe, updates)) {
+    if (!pmAstromMatchFit (toFPAout, rawstars, refstars, match, recipe, updates)) {
 	psError(PSASTRO_ERR_DATA, false, "failed to find a valid fitted match solution\n");
         return false;
     }
+    psFree (chip->toFPA);
+    chip->toFPA = toFPAout;
 
     // write results
