Index: branches/simmosaic_branches/psastro/src/psastroChipAstrom.c
===================================================================
--- branches/simmosaic_branches/psastro/src/psastroChipAstrom.c	(revision 24860)
+++ branches/simmosaic_branches/psastro/src/psastroChipAstrom.c	(revision 27839)
@@ -56,9 +56,9 @@
 
                 // select the raw objects for this readout
-                psArray *rawstars = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.RAWSTARS");
+                psArray *rawstars = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.RAWSTARS.SUBSET");
                 if (rawstars == NULL) { continue; }
 
                 // select the raw objects for this readout
-                psArray *refstars = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.REFSTARS");
+                psArray *refstars = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.REFSTARS.SUBSET");
                 if (refstars == NULL) { continue; }
 
@@ -66,6 +66,5 @@
                 if ((rawstars->n < 4) || (refstars->n < 4)) {
                     readout->data_exists = false;
-                    psLogMsg ("psastro", 3, "insufficient rawstars (%ld) or refstars (%ld)",
-                              rawstars->n, refstars->n);
+                    psLogMsg ("psastro", 3, "insufficient rawstars (%ld) or refstars (%ld)", rawstars->n, refstars->n);
                     continue;
                 }
@@ -87,5 +86,5 @@
                 }
                 // XXX update the header with info to reflect the failure
-                if (!psastroOneChipFit (fpa, chip, refstars, rawstars, recipe, updates)) {
+                if (!psastroOneChipFit (fpa, chip, readout, refstars, rawstars, recipe, updates)) {
                     readout->data_exists = false;
                     psLogMsg ("psastro", 3, "failed to find a solution\n");
@@ -97,5 +96,6 @@
                 // write the elapsed time here; this will be updated in psastroMosaicAstrometry, if called
                 psMetadataAddF32 (updates, PS_LIST_TAIL, "DT_ASTR", PS_META_REPLACE, "elapsed psastro time", psTimerMark ("psastroAnalysis"));
-
+		
+		fpa->wcsCDkeys = psMetadataLookupBool(&status, recipe , "PSASTRO.WCS.USECDKEYS");
                 pmAstromWriteWCS (updates, fpa, chip, NONLIN_TOL);
 
