Index: /trunk/ippconfig/recipes/psastro.config
===================================================================
--- /trunk/ippconfig/recipes/psastro.config	(revision 37419)
+++ /trunk/ippconfig/recipes/psastro.config	(revision 37420)
@@ -170,5 +170,7 @@
 # report and reject stars with reported magnitudes less than this value. These non physical
 # magnitudes are errors in the reference catalog (this value is sky magnitude, not instrumental)
+# -- and now also for greater than a sky magnitude (should be 24-25?)
 REFSTAR_CLAMP_MAG_MIN           F32 -3.0
+REFSTAR_CLAMP_MAG_MAX           F32 30.0
 
 EXTRACT_MAX_MAG                 F32 -15.0
Index: /trunk/psastro/src/psastroChooseRefstars.c
===================================================================
--- /trunk/psastro/src/psastroChooseRefstars.c	(revision 37419)
+++ /trunk/psastro/src/psastroChooseRefstars.c	(revision 37420)
@@ -66,4 +66,8 @@
     psF32 clampMagMin = psMetadataLookupF32 (&status, recipe, "REFSTAR_CLAMP_MAG_MIN");
     if (!status) clampMagMin = -5.0;
+    //MEH test
+    psF32 clampMagMax = psMetadataLookupF32 (&status, recipe, "REFSTAR_CLAMP_MAG_MAX");
+    if (!status) clampMagMax = 30.0;
+
 
     // de-activate all files except PSASTRO.REFSTARS
@@ -110,4 +114,10 @@
                     if (ref->Mag < clampMagMin) {
                         psWarning("Skipping refstar with abusrd magnitude %f ra: %f dec: %f\n",
+                            ref->Mag, RAD_TO_DEG(ref->sky->r), RAD_TO_DEG(ref->sky->d));
+                        goto skip;
+                    }
+		    //MEH test
+                    if (ref->Mag > clampMagMax) {
+                        psWarning("Skipping by clamp refstar with faint magnitude %f ra: %f dec: %f\n",
                             ref->Mag, RAD_TO_DEG(ref->sky->r), RAD_TO_DEG(ref->sky->d));
                         goto skip;
