Index: trunk/Ohana/src/opihi/cmd.astro/region.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/region.c	(revision 41341)
+++ trunk/Ohana/src/opihi/cmd.astro/region.c	(revision 41515)
@@ -165,14 +165,39 @@
 got_ctype:
   
-  graphmode.coords.crval1 = Ra;
-  graphmode.coords.crval2 = Dec;
-
-  float pc1_1 = (graphmode.flipeast)  ? -1 : 1;
-  float pc2_2 = (graphmode.flipnorth) ? -1 : 1;
-
-  graphmode.coords.pc1_1 =  cos(Angle*RAD_DEG)*pc1_1;
-  graphmode.coords.pc1_2 =  sin(Angle*RAD_DEG)*pc2_2;
-  graphmode.coords.pc2_1 = -sin(Angle*RAD_DEG)*pc1_1;
-  graphmode.coords.pc2_2 =  cos(Angle*RAD_DEG)*pc2_2;
+  // set the rotation
+  {
+    float pc1_1 = (graphmode.flipeast)  ? -1 : 1;
+    float pc2_2 = (graphmode.flipnorth) ? -1 : 1;
+
+    graphmode.coords.pc1_1 =  cos(Angle*RAD_DEG)*pc1_1;
+    graphmode.coords.pc1_2 =  sin(Angle*RAD_DEG)*pc2_2;
+    graphmode.coords.pc2_1 = -sin(Angle*RAD_DEG)*pc1_1;
+    graphmode.coords.pc2_2 =  cos(Angle*RAD_DEG)*pc2_2;
+  }
+
+  // determine central pixel for projection:
+  {
+    // PSEUDOCYL modes need center R,D to be 0,0 and center pixel to be adjusted
+    OhanaProjection proj = GetProjection (graphmode.coords.ctype);
+    OhanaProjectionMode mode = GetProjectionMode (proj);
+
+    graphmode.coords.crpix1 = 0.0;
+    graphmode.coords.crpix2 = 0.0;
+
+    if (mode == PROJ_MODE_PSEUDOCYL) {
+      graphmode.coords.crval1 = Ra;
+      graphmode.coords.crval2 = 0.0;
+    } else {
+      graphmode.coords.crval1 = Ra;
+      graphmode.coords.crval2 = Dec;
+    }
+
+    if (mode == PROJ_MODE_PSEUDOCYL) {
+      double Xc, Yc;
+      RD_to_XY (&Xc, &Yc, Ra, Dec, &graphmode.coords);
+      graphmode.coords.crpix2 = -Yc;
+      fprintf (stderr, "center pixel is %f, %f\n", Xc, Yc);
+    }
+  }
 
   // ask kapa for coordinate limits, to get the right aspect ratio 
