Index: /branches/dvo-mods-2007-02/Ohana/src/libdvo/src/coordops.update.c
===================================================================
--- /branches/dvo-mods-2007-02/Ohana/src/libdvo/src/coordops.update.c	(revision 12069)
+++ /branches/dvo-mods-2007-02/Ohana/src/libdvo/src/coordops.update.c	(revision 12070)
@@ -86,4 +86,9 @@
       case PROJ_ZEA:
       case PROJ_ZPL:
+	if (R > 2*DEG_RAD) {
+	  *ra = L;
+	  *dec = M;
+	  return (FALSE);
+	}
 	stht = 1 - 0.5*SQ(R*RAD_DEG);
 	ctht = sqrt (1 - stht*stht);
@@ -110,5 +115,5 @@
   
   /**** Other Conventional Projections ****/
-  if (mode == PROJ_MODE_ZENITHAL) {
+  if (mode == PROJ_MODE_PSEUDOCLY) {
     switch (proj) {
       case PROJ_AIT:
@@ -119,5 +124,5 @@
       delta = DEG_RAD * asin (RAD_DEG*M*Z);
       break;
-
+      
       case PROJ_GLS:
 	/* L,M in degrees, alpha,delta in degrees */
@@ -213,29 +218,31 @@
 
   /**** Other Standard Projections ****/
-  if (PseudoCyl) {
-    if (!strcmp(type, "-AIT")) {
-      phi = RAD_DEG*(ra - coords[0].crval1);
-      theta = RAD_DEG*(dec - coords[0].crval2);
-      P = 1.0 + cos (theta) * cos (0.5*phi);
-      if (P != 0.0) {
-	A =  DEG_RAD * sqrt (2.0 / P);
-	L =  2.0 * A * cos (theta) * sin (0.5*phi);
-	M =  A * sin (theta);
-      } else { 
-	L =  0.0;
-	M =  0.0;
-      }	
-    }
-    if (!strcmp(type, "-GLS")) {
-      phi = ra - coords[0].crval1;
-      theta = dec - coords[0].crval2;
-      L = phi * cos(RAD_DEG * theta);
-      M = theta;
-    }
-    if (!strcmp(type, "-PAR")) {
-      phi = ra - coords[0].crval1;
-      theta = dec - coords[0].crval2;
-      L = phi * (2.0*cos(2*RAD_DEG*theta/3.0) - 1);
-      M = 180.0 * sin (RAD_DEG*theta/3.0);
+  if (mode == PROJ_MODE_PSEUDOCYL) {
+    switch (proj) {
+      case PROJ_AIT:
+	phi = RAD_DEG*(ra - coords[0].crval1);
+	theta = RAD_DEG*(dec - coords[0].crval2);
+	P = 1.0 + cos (theta) * cos (0.5*phi);
+	if (P != 0.0) {
+	  A =  DEG_RAD * sqrt (2.0 / P);
+	  L =  2.0 * A * cos (theta) * sin (0.5*phi);
+	  M =  A * sin (theta);
+	} else { 
+	  L =  0.0;
+	  M =  0.0;
+	}	
+	break;
+      case PROJ_GLS:
+	phi = ra - coords[0].crval1;
+	theta = dec - coords[0].crval2;
+	L = phi * cos(RAD_DEG * theta);
+	M = theta;
+	break;
+      case PROJ_PAR:
+	phi = ra - coords[0].crval1;
+	theta = dec - coords[0].crval2;
+	L = phi * (2.0*cos(2*RAD_DEG*theta/3.0) - 1);
+	M = 180.0 * sin (RAD_DEG*theta/3.0);
+	break;
     }
   }
@@ -261,5 +268,4 @@
       dL = (L - Lo);
       dM = (M - Mo);
-      // fprintf (stderr, "%d: %f,%f : %f,%f : %f,%f : %f,%f\n", i, L, M, X, Y, Lo, Mo, dL, dM);
 
       X += determ * (coords[0].pc2_2*dL - coords[0].pc1_2*dM);
@@ -273,5 +279,4 @@
 
   return (status);
-  
 }
 
@@ -651,5 +656,5 @@
     case PROJ_GLS:
     case PROJ_PAR:
-      return PROJ_MODEEUDOCLY;
+      return PROJ_MODE_PSEUDOCLY;
   }
   return PROJ_MODE_NONE;
