Index: trunk/psastro/src/psastroChipAstrom.c
===================================================================
--- trunk/psastro/src/psastroChipAstrom.c	(revision 27639)
+++ trunk/psastro/src/psastroChipAstrom.c	(revision 31333)
@@ -60,4 +60,16 @@
 
                 // select the raw objects for this readout
+                psArray *gridrawstars = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.GRID.RAWSTARS.SUBSET");
+                if (gridrawstars == NULL) {
+                    gridrawstars = rawstars;
+                } else {
+                    // the absolute minimum number of stars is 4 (for order = 1)
+                    if (gridrawstars->n < 4) {
+                        readout->data_exists = false;
+                        psLogMsg ("psastro", 3, "insufficient gird rawstars (%ld)", gridrawstars->n);
+                        continue;
+                    }
+                }
+
                 psArray *refstars = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.REFSTARS.SUBSET");
                 if (refstars == NULL) { continue; }
@@ -80,5 +92,5 @@
 
                 // XXX update the header with info to reflect the failure
-                if (!psastroOneChipGrid (fpa, chip, refstars, rawstars, recipe, updates)) {
+                if (!psastroOneChipGrid (fpa, chip, refstars, gridrawstars, recipe, updates)) {
                     readout->data_exists = false;
                     psLogMsg ("psastro", 3, "failed to find a solution\n");
