Index: trunk/Ohana/src/opihi/dvo/skycoverage.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/skycoverage.c	(revision 27260)
+++ trunk/Ohana/src/opihi/dvo/skycoverage.c	(revision 27262)
@@ -8,7 +8,7 @@
   int i, N, Nimage, status, TimeSelect, ByName, xs, ys;
   time_t tzero, tend;
-  double pixscale, dX, dY, Npts, r, d, Xi, Yi, Xs, Ys, x[2], y[2], trange, RaCenter;
+  double pixscale, dX, dY, Npts, r, d, Xi, Yi, Xs, Ys, x[2], y[2], trange, RaCenter, DecCenter;
   Image *image;
-  char name[256];
+  char name[256], projection[16];
   float *V;
   int Nx, Ny;
@@ -33,7 +33,27 @@
 
   RaCenter = 0.0;
-  if ((N = get_argument (argc, argv, "-ra-center"))) {
+  DecCenter = 0.0;
+  if ((N = get_argument (argc, argv, "-center"))) {
     remove_argument (N, &argc, argv);
     RaCenter = atof (argv[N]);
+    remove_argument (N, &argc, argv);
+    DecCenter = atof (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+
+  Nx = 0;
+  Ny = 0;
+  if ((N = get_argument (argc, argv, "-size"))) {
+    remove_argument (N, &argc, argv);
+    Nx = atof (argv[N]);
+    remove_argument (N, &argc, argv);
+    Ny = atof (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
+
+  pixscale = 1.0;
+  if ((N = get_argument (argc, argv, "-scale"))) {
+    remove_argument (N, &argc, argv);
+    pixscale = atof (argv[N]);
     remove_argument (N, &argc, argv);
   }
@@ -45,4 +65,22 @@
     remove_argument (N, &argc, argv);
     ByName = TRUE;
+  }
+
+  strcpy (projection, "DEC--AIT");
+  if ((N = get_argument (argc, argv, "-proj"))) {
+    remove_argument (N, &argc, argv);
+    if (!strcasecmp(argv[N], "TAN")) {
+	strcpy (projection, "DEC--TAN");
+    }	
+    if (!strcasecmp(argv[N], "SIN")) {
+	strcpy (projection, "DEC--SIN");
+    }	
+    if (!strcasecmp(argv[N], "GLS")) {
+	strcpy (projection, "DEC--GLS");
+    }	
+    if (!strcasecmp(argv[N], "PAR")) {
+	strcpy (projection, "DEC--PAR");
+    }	
+    remove_argument (N, &argc, argv);
   }
 
@@ -100,10 +138,13 @@
   }
  
-  if (argc != 4) {
-    gprint (GP_ERR, "USAGE: skycoverage (buffer) (pixscale) (Npts)\n");
-    gprint (GP_ERR, "  options: [-time start range] [-trange start stop] [-name name] [-photcode name] [+mosaic] [-mosaic] [-ra-center RA]\n");
-    gprint (GP_ERR, "       (buffer) saves bitmapped AIT plot\n");
-    gprint (GP_ERR, "       (pixscale) specifies the pixel size in degrees\n");
+  if (argc != 3) {
+    gprint (GP_ERR, "USAGE: skycoverage (buffer) (Npts)\n");
+    gprint (GP_ERR, "  options: [-scale pixscale] [-center ra dec] [-size Nx Nx] [-proj projection] [-time start range] [-trange start stop] [-name name] [-photcode name] [+mosaic] [-mosaic]\n");
+    gprint (GP_ERR, "       (buffer) saves bitmapped image\n");
     gprint (GP_ERR, "       (Npts) gives the number of test points per image in each dimension\n");
+    gprint (GP_ERR, "       -scale (pixscale)  : specifies the pixel size in degrees [1.0]\n");
+    gprint (GP_ERR, "       -center (ra) (dec) : specifies the center of the field [0.0, 0.0]\n");
+    gprint (GP_ERR, "       -size (Nx) (Ny)    : specifies the size of the image [360/scale, 180/scale]\n");
+    gprint (GP_ERR, "       -proj (projection) : specifies the projection choice [AIT]\n");
     gprint (GP_ERR, "       note: we need 64800 / (pixscale)^2 pixels to represent the sky\n");
     return (FALSE);
@@ -111,9 +152,10 @@
   
   if ((buf = SelectBuffer (argv[1], ANYBUFFER, TRUE)) == NULL) return (FALSE);
-  pixscale = atof(argv[2]);
-  Npts     = atof(argv[3]);
-
-  Nx = 360/pixscale;
-  Ny = 180/pixscale;
+  Npts = atof(argv[2]);
+
+  if (!Nx || !Ny) {
+    Nx = 360/pixscale;
+    Ny = 180/pixscale;
+  }
 
   gfits_free_matrix (&buf[0].matrix);
@@ -123,8 +165,8 @@
 
   coords.crval1 = RaCenter;
-  coords.crval2 = 0;
+  coords.crval2 = DecCenter;
   coords.crpix1 = 0.5*Nx;
   coords.crpix2 = 0.5*Ny;
-  strcpy (coords.ctype, "DEC--AIT");
+  strcpy (coords.ctype, projection);
   coords.pc1_1 = -1.0;
   coords.pc2_2 = +1.0;
