Index: trunk/psastro/src/psastroUtils.c
===================================================================
--- trunk/psastro/src/psastroUtils.c	(revision 10880)
+++ trunk/psastro/src/psastroUtils.c	(revision 11472)
@@ -80,7 +80,15 @@
 
     // XXX this region needs to be defined more intelligently
-    psRegion region = {0, 0, 2000, 4500};
+    // psRegion *region = pmChipExtent (chip);
+    psRegion *region = psRegionAlloc (0, 2000, 0, 2000);
+
     psFree (chip->fromFPA);
-    chip->fromFPA = psPlaneTransformInvert (NULL, chip->toFPA, region, 20);
+    chip->fromFPA = psPlaneTransformInvert (NULL, chip->toFPA, *region, 20);
+
+//    PS_POLY_PRINT_2D(chip->toFPA->x);
+//    PS_POLY_PRINT_2D(chip->toFPA->y);
+
+//    PS_POLY_PRINT_2D(chip->fromFPA->x);
+//    PS_POLY_PRINT_2D(chip->fromFPA->y);
 
     for (int i = 0; i < rawstars->n; i++) {
@@ -97,4 +105,5 @@
     }
 
+    psFree (region);
     return true;
 }
