Index: /tags/ipp-20120802/ippconfig/recipes/psastro.config
===================================================================
--- /tags/ipp-20120802/ippconfig/recipes/psastro.config	(revision 34301)
+++ /tags/ipp-20120802/ippconfig/recipes/psastro.config	(revision 34302)
@@ -167,4 +167,8 @@
 CROSSTALK_MASK       BOOL FALSE
 
+# 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)
+REFSTAR_CLAMP_MAG_MIN           F32 -3.0
+
 EXTRACT_MAX_MAG                 F32 -15.0
 
Index: /tags/ipp-20120802/psastro/src/psastroChooseRefstars.c
===================================================================
--- /tags/ipp-20120802/psastro/src/psastroChooseRefstars.c	(revision 34301)
+++ /tags/ipp-20120802/psastro/src/psastroChooseRefstars.c	(revision 34302)
@@ -62,4 +62,6 @@
 
     int nMax = psMetadataLookupS32 (&status, recipe, "PSASTRO.MAX.NREF");
+    psF32 clampMagMin = psMetadataLookupS32 (&status, recipe, "REFSTAR_CLAMP_MAG_MIN");
+    if (!status) clampMagMin = -5;
 
     // de-activate all files except PSASTRO.REFSTARS
@@ -103,4 +105,10 @@
                 for (int i = 0; i < refs->n; i++) {
                     pmAstromObj *ref = pmAstromObjCopy(refs->data[index->data.S32[i]]);
+
+                    if (ref->Mag < clampMagMin) {
+                        psWarning("Skipping refstar with abusrd magnintude %f ra: %f dec: %f\n",
+                            ref->Mag, RAD_TO_DEG(ref->sky->r), RAD_TO_DEG(ref->sky->d));
+                        goto skip;
+                    }
 
                     psProject (ref->TP, ref->sky, fpa->toSky);
