Index: trunk/Ohana/src/opihi/cmd.astro/csystem.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/csystem.c	(revision 41269)
+++ trunk/Ohana/src/opihi/cmd.astro/csystem.c	(revision 41305)
@@ -12,4 +12,14 @@
   Vector *uxvec = NULL;
   Vector *uyvec = NULL;
+
+  int Quiet = FALSE;
+  if ((N = get_argument (argc, argv, "-q"))) {
+    Quiet = TRUE;
+    remove_argument (N, &argc, argv);
+  }
+  if ((N = get_argument (argc, argv, "-quiet"))) {
+    Quiet = TRUE;
+    remove_argument (N, &argc, argv);
+  }
 
   // transform proper motions at the same time
@@ -84,7 +94,45 @@
 
     if (uXname) {
-      gprint (GP_LOG, "%10.6f %10.6f @ %10.6f %10.6f\n", x, y, ux, uy);
+      if (!Quiet) {
+	gprint (GP_LOG, "%10.6f %10.6f @ %10.6f %10.6f\n", x, y, ux, uy);
+	switch (output) {
+	  case COORD_CELESTIAL:
+	    set_variable ("uR", ux);
+	    set_variable ("uD", uy);
+	    break;
+	  case COORD_ECLIPTIC:
+	    set_variable ("uL", ux);
+	    set_variable ("uB", uy);
+	    break;
+	  case COORD_GALACTIC:
+	  case COORD_GALACTIC_REID_2004:
+	    set_variable ("uLon", ux);
+	    set_variable ("uLat", uy);
+	    break;
+	  default:
+	    break;
+	}
+      }
     } else {
-      gprint (GP_LOG, "%10.6f %10.6f\n", x, y);
+      if (!Quiet) {
+	gprint (GP_LOG, "%10.6f %10.6f\n", x, y);
+      }
+    }
+    switch (output) {
+      case COORD_CELESTIAL:
+	set_variable ("RA", x);
+	set_variable ("DEC", y);
+	break;
+      case COORD_ECLIPTIC:
+	set_variable ("Lambda", x);
+	set_variable ("Beta", y);
+	break;
+      case COORD_GALACTIC:
+      case COORD_GALACTIC_REID_2004:
+	set_variable ("gLon", x);
+	set_variable ("gLat", y);
+	break;
+      default:
+	break;
     }
     free (transform);
@@ -154,4 +202,9 @@
   gprint (GP_ERR, " e.g.   : csystem C G R D -pm uR uD -> R D will contain glon, glat; uR, uD will contain uL, uB\n");
   gprint (GP_ERR, " e.g.   : csystem C G R D -pmback uL uB -> R D will contain glon, glat; uL, uB will contain uR, uD\n");
+  gprint (GP_ERR, "        :  if input values are vectors, their values are replaced with the transformed values\n");
+  gprint (GP_ERR, "        :  if input values are scalars, the transformed coordinates are printed (disable with -q)\n");
+  gprint (GP_ERR, "        :    and the following output variables will be set (names depend on output system)\n");
+  gprint (GP_ERR, "        :  output positions (RA, DEC), (Lambda, Beta), (gLon, gLat)\n");
+  gprint (GP_ERR, "        :  output motions   (uR, uD),  (uL, uB),       (uLon, uLat)\n");
   return FALSE;
 }
Index: trunk/Ohana/src/opihi/cmd.astro/mkgauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/mkgauss.c	(revision 41269)
+++ trunk/Ohana/src/opihi/cmd.astro/mkgauss.c	(revision 41305)
@@ -10,4 +10,10 @@
   double x, y, r, f, Xo, Yo;
   Buffer *buf;
+
+  int Normalize = FALSE;
+  if ((N = get_argument (argc, argv, "-norm"))) {
+    Normalize = TRUE;
+    remove_argument (N, &argc, argv);
+  }    
 
   // this should be Nx/2, Ny/2 if not set
@@ -60,4 +66,6 @@
   /* f = exp (-r), r = (x^2 / 2Sx) + (y^2 / 2Sy) + Sxy*x*y */
 
+  double Io = Normalize ? 1.0 / (2.0 * M_PI * Sig_x * Sig_y) : 1.0;
+
   in = (float *) buf[0].matrix.buffer;
   for (j = 0; j < Ny; j++) {
@@ -67,5 +75,5 @@
       y = j - Yo;
       r = 0.5*x*x/Sx + 0.5*y*y/Sy + x*y*Sxy;
-      f = exp (-r);
+      f = Io * exp (-r);
       *in += f;
     }
