Index: /trunk/magic/remove/src/streaksastrom.c
===================================================================
--- /trunk/magic/remove/src/streaksastrom.c	(revision 24715)
+++ /trunk/magic/remove/src/streaksastrom.c	(revision 24716)
@@ -377,9 +377,12 @@
 }
 
-void
+bool
 linearizeTransforms(strkAstrom *astrom)
 {
     if (!pmAstromLinearizeTransforms((pmFPA *) astrom->fpa, (pmChip *) astrom->chip)) {
-        streaksExit("linear fit to astrometry failed\n", PS_EXIT_UNKNOWN_ERROR);
-    }
-}
+        // streaksExit("linear fit to astrometry failed\n", PS_EXIT_UNKNOWN_ERROR);
+        psError(PS_ERR_UNKNOWN, false, "linear fit to astrometry failed ignoring");
+        return false;
+    }
+    return true;
+}
Index: /trunk/magic/remove/src/streaksastrom.h
===================================================================
--- /trunk/magic/remove/src/streaksastrom.h	(revision 24715)
+++ /trunk/magic/remove/src/streaksastrom.h	(revision 24716)
@@ -30,5 +30,5 @@
 extern bool skyToCell(strkPt *, strkAstrom *astrom, double ra, double dec);
 extern bool cellToSky(strkPt *, strkAstrom *astrom, double x, double y);
-extern void linearizeTransforms(strkAstrom *astrom);
+extern bool linearizeTransforms(strkAstrom *astrom);
 
 extern bool SkyToLocal(strkPt *outPt, strkAstrom *astrom, double ra, double dec);
Index: /trunk/magic/remove/src/streaksremove.c
===================================================================
--- /trunk/magic/remove/src/streaksremove.c	(revision 24715)
+++ /trunk/magic/remove/src/streaksremove.c	(revision 24716)
@@ -483,5 +483,8 @@
     if (sf->bilevelAstrometry) {
 
-        linearizeTransforms(sf->astrom);
+        if (!linearizeTransforms(sf->astrom)) {
+            // fit failed, leave the astrometry unchanged
+            return;
+        }
 
         if (!pmAstromWriteWCS(sf->outImage->header, sf->inAstrom->fpa, sf->chip, 0.001)) {
