Index: /branches/eam_branches/relastro.20100326/src/FitChip.c
===================================================================
--- /branches/eam_branches/relastro.20100326/src/FitChip.c	(revision 27489)
+++ /branches/eam_branches/relastro.20100326/src/FitChip.c	(revision 27490)
@@ -93,5 +93,5 @@
     }
 
-    fprintf (stderr, "scatter limit: %f based on %d detections; using %d of %d for fit\n", dRmax, Nscatter, fit[0].Npts, Nmatch);
+    // fprintf (stderr, "scatter limit: %f based on %d detections; using %d of %d for fit\n", dRmax, Nscatter, fit[0].Npts, Nmatch);
 
     // measure the fit, update the coords & object coordinates
Index: /branches/eam_branches/relastro.20100326/src/FixProblemImages.c
===================================================================
--- /branches/eam_branches/relastro.20100326/src/FixProblemImages.c	(revision 27489)
+++ /branches/eam_branches/relastro.20100326/src/FixProblemImages.c	(revision 27490)
@@ -6,4 +6,5 @@
 int FixProblemImages (SkyList *skylist) {
 
+  int Nbad;
   off_t i, Nimage;
   Image *image;
@@ -16,14 +17,25 @@
   image = getimages (&Nimage);
 
+  Nbad = 0;
   // first check on the dPos reported for each image
   for (i = 0; i < Nimage; i++) {
     double dPosSum, dPos;
     off_t nPos;
+
+    // check if this image should be fixed
+    if (badCoords(i)) {
+      Nbad ++;
+      continue;
+    }
+
     getOffsets (&dPosSum, &nPos, i);
     dPos = sqrt(dPosSum / nPos);
     if (dPos > 4.0) {
       setBadCoords (i);
+      Nbad ++;
     }
   }
+
+  fprintf (stderr, "fixing %d images\n", Nbad);
 
   for (i = 0; i < Nimage; i++) {
@@ -33,4 +45,6 @@
     // check if this image should be fixed
     if (!badCoords(i)) continue;
+
+    fprintf (stderr, "fixing %s\n", image[i].name);
 
     // I need a list of the catalogs for this image
Index: /branches/eam_branches/relastro.20100326/src/ImageOps.c
===================================================================
--- /branches/eam_branches/relastro.20100326/src/ImageOps.c	(revision 27489)
+++ /branches/eam_branches/relastro.20100326/src/ImageOps.c	(revision 27490)
@@ -369,4 +369,17 @@
     dD = 3600.0*(catalog[c].average[n].D - D);
 
+    // complain if the new location is far from the average location
+    if (fabs(dR) > 2.0) {
+      fprintf (stderr, "!");
+      setBadCoords (im); // report a failure for this image
+      return;
+    }
+    if (fabs(dD) > 2.0) {
+      fprintf (stderr, "*");
+      setBadCoords (im); // report a failure for this image
+      return;
+    }
+
+    // complain if the new location is far from the old location
     if (fabs(catalog[c].measure[m].dR - dR) > 2.0) {
       fprintf (stderr, "!");
Index: /branches/eam_branches/relastro.20100326/src/UpdateChips.c
===================================================================
--- /branches/eam_branches/relastro.20100326/src/UpdateChips.c	(revision 27489)
+++ /branches/eam_branches/relastro.20100326/src/UpdateChips.c	(revision 27490)
@@ -28,6 +28,7 @@
 
     // FitChip does iterative, clipped fitting
-    fprintf (stderr, "image %lld : Nstars: %lld\n", (long long) i, (long long) Nraw);
+    // fprintf (stderr, "image %lld : Nstars: %lld\n", (long long) i, (long long) Nraw);
     if (!FitChip (raw, ref, Nraw, &image[i].coords)) {
+      fprintf (stderr, "reject fit for image %s (%lld) : Nstars: %lld\n", image[i].name, (long long) i, (long long) Nraw);
       oldCoords = getCoords (i);
       memcpy (&image[i].coords, oldCoords, sizeof(Coords));
