Index: trunk/pswarp/src/pswarpDefine.c
===================================================================
--- trunk/pswarp/src/pswarpDefine.c	(revision 11281)
+++ trunk/pswarp/src/pswarpDefine.c	(revision 12505)
@@ -4,6 +4,22 @@
 bool pswarpDefine (pmConfig *config) {
 
-    // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
+    bool status;
+    psMetadata *recipe = NULL;
+
+    // load the pixel scale from the PSASTRO recipe
+    recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
+    if (!recipe) {
+	psError(PSWARP_ERR_CONFIG, false, "Can't find PSASTRO recipe needed for pixel scale!\n");
+	return false;
+    }
+    // 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; 
+    } 
+
+    // load the PSWARP recipe
+    recipe  = psMetadataLookupPtr (NULL, config->recipes, PSWARP_RECIPE);
     if (!recipe) {
 	psError(PSWARP_ERR_CONFIG, true, "Can't find PSWARP recipe!\n");
@@ -36,9 +52,7 @@
     }
     if (bilevelAstrometry) {
-      pmAstromReadBilevelMosaic (skycell->fpa, phu->header);
+      pmAstromReadBilevelMosaic (skycell->fpa, phu->header, pixelScale);
       pmAstromReadBilevelChip (chip, hdu->header); 
     } else {
-      // XXX get pixelScale from recipes.  does it matter?
-      float pixelScale = 13.5;
       pmAstromReadWCS (skycell->fpa, chip, hdu->header, pixelScale);
     }
