Index: trunk/psastro/src/psastroAstromGuess.c
===================================================================
--- trunk/psastro/src/psastroAstromGuess.c	(revision 10784)
+++ trunk/psastro/src/psastroAstromGuess.c	(revision 10830)
@@ -11,5 +11,4 @@
     bool newFPA = true;
     bool status = false;
-    bool isMosaic = false;
     double RAmin = NAN;
     double RAmax = NAN;
@@ -25,7 +24,4 @@
     DECmin = DECmax = -90;
     RAmin = RAmax = RAminSky = RAmaxSky = 0;
-
-    // is this a mosaic astrometry analysis?
-    psMetadataLookupStr (&isMosaic, config->arguments, "MOSASTRO");
 
     // select the current recipe
@@ -43,7 +39,10 @@
     }
 
-    double plateScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PLATE.SCALE");
-    if (!status) plateScale = 1.0;
-    plateScale = 1.0;
+    // physical pixel scale in microns per pixel
+    double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE");
+    if (!status) {
+	psError(PS_ERR_IO, false, "Failed to lookup pixel scale"); 
+	return false; 
+    } 
 
     pmFPAview *view = pmFPAviewAlloc (0);
@@ -57,5 +56,5 @@
         pmHDU *hdu = pmFPAviewThisHDU (view, fpa);
 
-        pmAstromReadWCS (fpa, chip, hdu->header, plateScale, isMosaic);
+        pmAstromReadWCS (fpa, chip, hdu->header, pixelScale);
         if (newFPA) {
             newFPA = false;
@@ -69,5 +68,4 @@
 
         // apply the new WCS guess data to all of the data in the readouts
-        // XXX should this go into a different function? this would separate WCS interpretation from application
         while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) {
             psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
@@ -85,5 +83,5 @@
 
                     psPlaneTransformApply (raw->FP, chip->toFPA, raw->chip);
-                    psPlaneDistortApply (raw->TP, fpa->toTPA, raw->FP, 0.0, 0.0);
+                    psPlaneTransformApply (raw->TP, fpa->toTPA, raw->FP);
                     psDeproject (raw->sky, raw->TP, fpa->toSky);
 
@@ -100,5 +98,5 @@
 			
                         psProject (tp, raw->sky, fpa->toSky);
-                        psPlaneDistortApply (fp, fpa->fromTPA, tp, 0.0, 0.0);
+                        psPlaneTransformApply (fp, fpa->fromTPA, tp);
                         psPlaneTransformApply (ch, chip->fromFPA, fp);
 			
