Index: trunk/Ohana/src/addstar/include/skycells.h
===================================================================
--- trunk/Ohana/src/addstar/include/skycells.h	(revision 31238)
+++ trunk/Ohana/src/addstar/include/skycells.h	(revision 31239)
@@ -65,4 +65,5 @@
 int    NMAX;
 int    NX_SUB, NY_SUB;
+int    X_PARITY;
 double SCALE;
 double PADDING;
Index: trunk/Ohana/src/addstar/src/args_skycells.c
===================================================================
--- trunk/Ohana/src/addstar/src/args_skycells.c	(revision 31238)
+++ trunk/Ohana/src/addstar/src/args_skycells.c	(revision 31239)
@@ -188,4 +188,9 @@
     remove_argument (N, &argc, argv);
     OVERLAP_DEC  = atof (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+  X_PARITY = 1;
+  if ((N = get_argument (argc, argv, "-skyparity"))) {
+    X_PARITY = -1;
     remove_argument (N, &argc, argv);
   }
@@ -224,5 +229,7 @@
   fprintf (stderr, "  -nx Nx                      : subdivide skycell projection in x by Nx\n");
   fprintf (stderr, "  -ny Ny                      : subdivide skycell projection in y by Ny\n");
+  fprintf (stderr, "  -overlap Or Od              : overlap between skycells (arcseconds)\n");
   fprintf (stderr, "  -projection-number Np       : set projection-number (local mode only)\n");
+  fprintf (stderr, "  -skyparity                  : set wcs for skycells so that east is to the left\n");
   fprintf (stderr, "  -help                       : this list\n");
   fprintf (stderr, "  -h                          : this list\n\n");
Index: trunk/Ohana/src/addstar/src/sky_tessalation.c
===================================================================
--- trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 31238)
+++ trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 31239)
@@ -318,5 +318,6 @@
   memset (image, 0, sizeof(Image));
   image[0].coords = *refcoords;
-  image[0].coords.pc1_1 = image[0].coords.pc2_2 = 1.0;
+  image[0].coords.pc1_1 = 1.0 * X_PARITY;
+  image[0].coords.pc2_2 = 1.0;
   image[0].coords.pc1_2 = image[0].coords.pc2_1 = 0.0;
 
@@ -468,5 +469,5 @@
 
   if (FIX_NS) {
-    rectangle[0].coords.pc1_1 = +1.0;
+    rectangle[0].coords.pc1_1 = +1.0 * X_PARITY;
     rectangle[0].coords.pc1_2 = +0.0;
     rectangle[0].coords.pc2_1 = -0.0;
@@ -475,7 +476,7 @@
     ycr = yc*cos(angle) + xc*sin(angle); 
   } else {
-    rectangle[0].coords.pc1_1 = +cos(angle);
+    rectangle[0].coords.pc1_1 = +cos(angle) * X_PARITY;
     rectangle[0].coords.pc1_2 = +sin(angle);
-    rectangle[0].coords.pc2_1 = -sin(angle);
+    rectangle[0].coords.pc2_1 = -sin(angle) * X_PARITY;
     rectangle[0].coords.pc2_2 = +cos(angle);
     xcr = xc;
@@ -514,12 +515,12 @@
   angle = 0.0;
   if (FIX_NS) {
-    rectangle[0].coords.pc1_1 = +1.0;
+    rectangle[0].coords.pc1_1 = +1.0 * X_PARITY;
     rectangle[0].coords.pc1_2 = +0.0;
     rectangle[0].coords.pc2_1 = -0.0;
     rectangle[0].coords.pc2_2 = +1.0;
   } else {
-    rectangle[0].coords.pc1_1 = +cos(angle);
+    rectangle[0].coords.pc1_1 = +cos(angle) * X_PARITY;
     rectangle[0].coords.pc1_2 = +sin(angle);
-    rectangle[0].coords.pc2_1 = -sin(angle);
+    rectangle[0].coords.pc2_1 = -sin(angle) * X_PARITY;
     rectangle[0].coords.pc2_2 = +cos(angle);
   }
@@ -626,5 +627,5 @@
     ring[i].coords.crval2 = dec;
 
-    ring[i].coords.pc1_1 = +1.0;
+    ring[i].coords.pc1_1 = +1.0 * X_PARITY;
     ring[i].coords.pc1_2 = +0.0;
     ring[i].coords.pc2_1 = -0.0;
