Index: trunk/psastro/src/psastroChooseRefstars.c
===================================================================
--- trunk/psastro/src/psastroChooseRefstars.c	(revision 24806)
+++ trunk/psastro/src/psastroChooseRefstars.c	(revision 26259)
@@ -134,9 +134,17 @@
 
 		psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.REFSTARS", PS_DATA_ARRAY, "astrometry matches", refstars);
+
+		// generate a reduced subset excluding the clumps
+		// XXX do we need both REFSTARS and SUBSET? 
+		psArray *subset = psastroRemoveClumpsIterate(refstars, 150, 3);
+		psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.REFSTARS.SUBSET", PS_DATA_ARRAY, "astrometry objects", subset);
+
 		psFree (refstars);
+		psFree (subset);
 		psFree (extent);
 
 		if (matchLumFunc) {
-		    // in this case, no PSASTRO.REFSTARS is added to readout->analysis
+		    // limit the total magnitude range of PSASTRO.REFSTARS.SUBSET based on
+		    // overlapping luminosity functions
 		    if (!psastroRefstarSubset (readout)) {
 			psError(PSASTRO_ERR_DATA, false, "Can't determine an appropriate refstar subset\n");
