Index: trunk/psModules/src/astrom/pmAstrometryDistortion.c
===================================================================
--- trunk/psModules/src/astrom/pmAstrometryDistortion.c	(revision 12485)
+++ trunk/psModules/src/astrom/pmAstrometryDistortion.c	(revision 12519)
@@ -7,6 +7,6 @@
 *  @author EAM, IfA
 *
-*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-03-18 22:06:58 $
+*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2007-03-21 22:00:49 $
 *
 *  Copyright 2006 Institute for Astronomy, University of Hawaii
@@ -29,4 +29,5 @@
 #include "pmFPAExtent.h"
 #include "pmAstrometryObjects.h"
+#include "pmAstrometryRegions.h"
 #include "pmAstrometryDistortion.h"
 #include "pmKapaPlots.h"
@@ -317,15 +318,6 @@
     // reset the fromTPA terms here. choose an appropriate region based on the dimensions of
     // the complete FPA
-    psRegion *region = pmFPAExtent (fpa);
-    region->x0 *= pixelScale;
-    region->x1 *= pixelScale;
-    region->y0 *= pixelScale;
-    region->y1 *= pixelScale;
-    int xCenter = 0.5*(region->x0 + region->x1);
-    int yCenter = 0.5*(region->y0 + region->y1);
-    region->x0 -= xCenter;
-    region->x1 -= xCenter;
-    region->y0 -= yCenter;
-    region->y1 -= yCenter;
+    psRegion *region = pmAstromFPAExtent (fpa);
+
     psFree (fpa->fromTPA);
     fpa->fromTPA = psPlaneTransformInvert(NULL, fpa->toTPA, *region, 50);
