Index: trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gstar.c	(revision 5945)
+++ trunk/Ohana/src/opihi/dvo/gstar.c	(revision 6642)
@@ -9,5 +9,5 @@
   double Mcat, Mrel;
   float *RA, *DEC;
-  int i, j, k, m, N, *N1, Nsec, NPTS;
+  int i, j, k, m, N, *N1, Nsec, NPTS, QUIET;
   int Nstars, found, GetMeasures, Nlo, Nhi;
   int SaveVectors;
@@ -17,7 +17,15 @@
   Catalog catalog;
   PhotCode *code;
+  int TimeFormat;
+  time_t TimeReference;
 
   if (!InitPhotcodes ()) return (FALSE);
   Nsec = GetPhotcodeNsecfilt ();
+
+  QUIET = FALSE;
+  if ((N = get_argument (argc, argv, "-q"))) {
+    QUIET = TRUE;
+    remove_argument (N, &argc, argv);
+  }
 
   NPTS = 0;
@@ -44,4 +52,6 @@
   }
   
+  GetTimeFormat (&TimeReference, &TimeFormat);
+
   Ra = atof (argv[1]);
   Dec = atof (argv[2]);
@@ -127,30 +137,32 @@
     if (r < Radius2) {
       k = N1[i];
-      fprintf (GetOutfile(), "star: %d\n", k);
-      fprintf (GetOutfile(), "%9.5f %9.5f %3d of %3d  %4.1f %5d\n", catalog.average[k].R_PS, catalog.average[k].D_PS, 
-	       catalog.average[k].Nm, catalog.average[k].Nn + catalog.average[k].Nm,
-	       0.01*catalog.average[k].Xp, catalog.average[k].code);
+      if (!QUIET) {
+	  fprintf (GetOutfile(), "star: %d\n", k);
+	  fprintf (GetOutfile(), "%9.5f %9.5f %3d of %3d  %4.1f %5d\n", catalog.average[k].R_PS, catalog.average[k].D_PS, 
+		   catalog.average[k].Nm, catalog.average[k].Nn + catalog.average[k].Nm,
+		   0.01*catalog.average[k].Xp, catalog.average[k].code);
       
-      /* filter names -- primary code is 0 in this function */
-      for (j = 0; j < Nsec + 1; j++) {
-	code = GetPhotcodebyNsec (j);
-	fprintf (GetOutfile (), "%s ", code[0].name);
+	  /* filter names -- primary code is 0 in this function */
+	  for (j = 0; j < Nsec + 1; j++) {
+	      code = GetPhotcodebyNsec (j);
+	      fprintf (GetOutfile (), "%s ", code[0].name);
+	  }
+	  fprintf (GetOutfile (), "\n");
+
+	  /* average mags */
+	  print_value (GetOutfile(), catalog.average[k].M_PS, catalog.average[k].M_PS);
+	  for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].M_PS, catalog.secfilt[j + Nsec*k].M_PS);
+	  fprintf (GetOutfile(), "\n");
+
+	  /* average mag errors */
+	  print_value (GetOutfile(), catalog.average[k].dM_PS, catalog.average[k].dM_PS);
+	  for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].dM_PS, catalog.secfilt[j + Nsec*k].dM_PS);
+	  fprintf (GetOutfile(), "\n");
+
+	  /* average mag chisq */
+	  print_value (GetOutfile(), pow (10.0, 0.01*catalog.average[k].Xm), catalog.average[k].Xm);
+	  for (j = 0; j < Nsec; j++) print_value (GetOutfile(), pow (10.0, 0.01*catalog.secfilt[j + Nsec*k].Xm), catalog.secfilt[j + Nsec*k].Xm);
+	  fprintf (GetOutfile(), "\n");
       }
-      fprintf (GetOutfile (), "\n");
-
-      /* average mags */
-      print_value (GetOutfile(), catalog.average[k].M_PS, catalog.average[k].M_PS);
-      for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].M_PS, catalog.secfilt[j + Nsec*k].M_PS);
-      fprintf (GetOutfile(), "\n");
-
-      /* average mag errors */
-      print_value (GetOutfile(), catalog.average[k].dM_PS, catalog.average[k].dM_PS);
-      for (j = 0; j < Nsec; j++) print_value (GetOutfile(), catalog.secfilt[j + Nsec*k].dM_PS, catalog.secfilt[j + Nsec*k].dM_PS);
-      fprintf (GetOutfile(), "\n");
-
-      /* average mag chisq */
-      print_value (GetOutfile(), pow (10.0, 0.01*catalog.average[k].Xm), catalog.average[k].Xm);
-      for (j = 0; j < Nsec; j++) print_value (GetOutfile(), pow (10.0, 0.01*catalog.secfilt[j + Nsec*k].Xm), catalog.secfilt[j + Nsec*k].Xm);
-      fprintf (GetOutfile(), "\n");
 
       if (GetMeasures || SaveVectors) {
@@ -161,5 +173,5 @@
 	  Mrel = PhotRel (&catalog.measure[m], &catalog.average[k], &catalog.secfilt[k*Nsec]);
 
-	  if (GetMeasures) {
+	  if (GetMeasures && !QUIET) {
 	    date = sec_to_date (catalog.measure[m].t);
 	    fprintf (GetOutfile(), "%6.3f %6.3f %5.3f  %20s  %5.2f %5.2f %2d %3x %3d %-20s\n", 
@@ -173,5 +185,5 @@
 	  if (SaveVectors) {
 	    vec1[0].elements[N] = Mcat;
-	    vec2[0].elements[N] = catalog.measure[m].t;
+	    vec2[0].elements[N] = TimeValue (catalog.measure[m].t, TimeReference, TimeFormat);
 	    vec3[0].elements[N] = catalog.measure[m].airmass_PS;
 	    vec4[0].elements[N] = catalog.measure[m].source;
