Index: trunk/magic/remove/src/streaksastrom.c
===================================================================
--- trunk/magic/remove/src/streaksastrom.c	(revision 27861)
+++ trunk/magic/remove/src/streaksastrom.c	(revision 27862)
@@ -375,11 +375,62 @@
 }
 
+static void chipToSky(pmAstromObj *pt, pmFPA *fpa, pmChip *chip)
+{
+    // chip to FP
+    psPlaneTransformApply(pt->FP, chip->toFPA, pt->chip);
+    // FP to TP to sky
+    psPlaneTransformApply(pt->TP, fpa->toTPA, pt->FP);
+    psDeproject(pt->sky, pt->TP, fpa->toSky);
+}
+
+
 bool
 linearizeTransforms(strkAstrom *astrom)
 {
-    if (!pmAstromLinearizeTransforms((pmFPA *) astrom->fpa, (pmChip *) astrom->chip, NULL, NULL, NULL, 0, 0)) {
-        psErrorStackPrint(stderr, "linear fit to astrometry failed. ignoring\n");
+    pmFPA  *inFPA  = (pmFPA *) astrom->fpa;
+    pmChip *inChip = (pmChip *) astrom->chip;
+
+    // compute ra and dec of chip center
+    pmAstromObj *center = pmAstromObjAlloc();
+    center->chip->x = (double) astrom->numCols / 2.;
+    center->chip->xErr = 0;
+    center->chip->y = (double) astrom->numRows / 2.;
+    center->chip->yErr = 0;
+
+    chipToSky(center, inFPA, inChip);
+
+    psRegion bounds = {0, astrom->numCols - 1, 0, astrom->numRows - 1 };
+
+    // create skeleton containers for the linearized transforms;
+    pmFPA  outFPA;
+    pmChip outChip;
+
+    memset(&outFPA, 0, sizeof(outFPA));
+    memset(&outChip, 0, sizeof(outChip));
+
+    outFPA.toSky = psProjectionAlloc (center->sky->r, center->sky->d, inFPA->toSky->Xs, inFPA->toSky->Ys, PS_PROJ_TAN);
+
+    psFree(center);
+
+    if (!pmAstromLinearizeToSky(inFPA, inChip, &outFPA, &outChip, &bounds)) {
+        psError(PS_ERR_UNKNOWN, false, "Failed to linearize astrometry\n");
         return false;
     }
-    return true;
-}
+
+    psFree(inFPA->toSky);
+    inFPA->toSky = outFPA.toSky;
+
+    psFree(inFPA->toTPA);
+    inFPA->toTPA = outFPA.toTPA;
+
+    psFree(inFPA->fromTPA);
+    inFPA->fromTPA = outFPA.fromTPA;
+
+    psFree(inChip->toFPA)
+    inChip->toFPA = outChip.toFPA;
+
+    psFree(inChip->fromFPA);
+    inChip->fromFPA = outChip.fromFPA;
+
+    return true;
+}
Index: trunk/psModules/src/astrom/pmAstrometryWCS.c
===================================================================
--- trunk/psModules/src/astrom/pmAstrometryWCS.c	(revision 27861)
+++ trunk/psModules/src/astrom/pmAstrometryWCS.c	(revision 27862)
@@ -972,4 +972,8 @@
     // FPA  -> TPA : identidy
 
+    // NOTE: streaksremove's linearizeTransform function passes pointers to skeleton outFPA and outChip structs
+    // Only outFPA->toSky is valid. No other memebers in these structs should be read. The resulting output transforms
+    // are copied to inFPA and inChip by the caller.
+
     int nSamples = 10;  // 10 samples in each dimension
 
