Index: /branches/eam_branches/ipp-20140717/Ohana/src/opihi/cmd.astro/cplot.c
===================================================================
--- /branches/eam_branches/ipp-20140717/Ohana/src/opihi/cmd.astro/cplot.c	(revision 37226)
+++ /branches/eam_branches/ipp-20140717/Ohana/src/opihi/cmd.astro/cplot.c	(revision 37227)
@@ -4,5 +4,5 @@
   
   double ra_prev = 0;
-  int i, kapa, Npts, status, leftside;
+  int i, kapa, Npts, status, leftside, valid, size;
   opihi_flt *x, *y, *r, *d, Rmin, Rmax, Rmid;
   Vector Xvec, Yvec, *xvec, *yvec;
@@ -11,6 +11,9 @@
   if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE;
 
-  if (argc != 3) {
+  valid  = (argc == 3);
+  valid |= (argc > 4) && !strcmp (argv[3], "where");
+  if (!valid) {
     gprint (GP_ERR, "USAGE: cplot <ra> <dec> [style]\n");
+    gprint (GP_ERR, "   OR: cplot <ra> <dec> [style] where (condition)\n");
     return (FALSE);
   }
@@ -32,4 +35,26 @@
   }
 
+  // tvec is used for logical test (truth vector)
+  Vector *tvec = NULL;
+  if (argc > 4) {
+    char *out = dvomath (argc - 4, &argv[4], &size, 1);
+    if (out == NULL) {
+      print_error ();
+      return FALSE;
+    }
+    if ((tvec = SelectVector (out, OLDVECTOR, TRUE)) == NULL) {
+      gprint (GP_ERR, " invalid logic result\n");
+      DeleteNamedVector (out);
+      free (out);
+      return (FALSE);
+    }
+  }
+
+  if (tvec && tvec[0].Nelements != yvec[0].Nelements) {
+    gprint (GP_ERR, "logic test vector not the same length as data vectors\n");
+    DeleteVector (tvec);
+    return (FALSE);
+  }
+
   SetVector (&Xvec, OPIHI_FLT, xvec[0].Nelements);
   SetVector (&Yvec, OPIHI_FLT, xvec[0].Nelements);
@@ -42,4 +67,9 @@
   Npts = 0;
   for (i = 0; i < Xvec.Nelements; i++, r++, d++) {
+    if (tvec) {
+      int skip = (tvec->type == OPIHI_FLT) ? (tvec->elements.Flt[i] == 0.0) : (tvec->elements.Int[i] == 0.0);
+      if (skip) continue;
+    }
+
     double ra = ohana_normalize_angle (*r);
     while (ra < Rmin) ra += 360.0;
@@ -88,4 +118,6 @@
   free (Yvec.elements.Ptr);
     
+  if (tvec) DeleteVector (tvec);
+
   return (TRUE);
 }
Index: /branches/eam_branches/ipp-20140717/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- /branches/eam_branches/ipp-20140717/Ohana/src/opihi/dvo/gstar.c	(revision 37226)
+++ /branches/eam_branches/ipp-20140717/Ohana/src/opihi/dvo/gstar.c	(revision 37227)
@@ -627,5 +627,5 @@
 	      gprint (GP_LOG, "%5.3f ", catalog.measure[Nv].psfQF);
 	      gprint (GP_LOG, "%7.1f ", catalog.measure[Nv].psfChisq);
-	      gprint (GP_LOG, "%3.1f ", catalog.measure[Nv].crNsigma);
+	      // gprint (GP_LOG, "%3.1f ", catalog.measure[Nv].crNsigma);
 	      gprint (GP_LOG, "%4.1f ", catalog.measure[Nv].extNsigma);
 	      gprint (GP_LOG, "%5.1f ", FromShortDegrees(catalog.measure[Nv].theta));
