Index: trunk/psastro/src/psastroChipAstrom.c
===================================================================
--- trunk/psastro/src/psastroChipAstrom.c	(revision 7014)
+++ trunk/psastro/src/psastroChipAstrom.c	(revision 7332)
@@ -41,30 +41,12 @@
 
 		// select the raw objects for this readout
-		psArray *rawstars = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.OBJECTS");
+		psArray *rawstars = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.RAWSTARS");
 		if (rawstars == NULL) { continue; }
 
-		// the refstars is a subset within range of this chip
-		psArray *refstars = psArrayAlloc (100);
+		// select the raw objects for this readout
+		psArray *refstars = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.REFSTARS");
+		if (refstars == NULL) { continue; }
 
-		// select the reference objects within range of this readout
-		// project the reference objects to this chip
-		for (int i = 0; i < refs->n; i++) {
-		    pmAstromObj *ref = refs->data[i];
-	
-		    p_psProject (ref->TP, ref->sky, fpa->projection);
-		    psPlaneDistortApply (ref->FP, fpa->fromTangentPlane, ref->TP, 0.0, 0.0);
-		    psPlaneTransformApply (ref->chip, chip->fromFPA, ref->FP);
-
-		    // XXX what is the X,Y range of the selected chip?
-		    // XXX for the moment, force these to be good for Megacam
-		    if (ref->chip->x < -500) continue;
-		    if (ref->chip->x > 2500) continue;
-		    if (ref->chip->y < -500) continue;
-		    if (ref->chip->y > 5000) continue;
-		    
-		    psArrayAdd (refstars, 100, ref);
-		}
 		psastroOneChip (fpa, chip, refstars, rawstars, recipe);
-		psFree (refstars);
 
 		// read WCS data from the corresponding header
