Index: /trunk/Ohana/src/opihi/cmd.astro/fitplx.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.astro/fitplx.c	(revision 39233)
+++ /trunk/Ohana/src/opihi/cmd.astro/fitplx.c	(revision 39234)
@@ -54,4 +54,5 @@
     gprint (GP_ERR, "  -outlier-tests Nsamples dPsigMax : run Nsample bootstrap-resamples to define the path deviations and reject based on dPsigMax\n");
     gprint (GP_ERR, "  -dPsig vec : save path deviations in vec\n");
+    gprint (GP_ERR, "  -mask mask : excluded points are marked with a 0 mask value\n");
     return (FALSE);
   }
@@ -102,8 +103,9 @@
   PlxFit fit; memset (&fit, 0, sizeof(PlxFit));
 
-  // determine dPsig for detections based on Noutlier attempts
+  // determine dPsig for detections based on Noutlier attempts (mask is updated to mark the bad stars, mask == 0)
   if (Noutlier) {
     int clipRetry = TRUE;
     for (i = 0; clipRetry && (i < 3); i++) {
+      // XXX NOTE This will segfault is mask is not supplied:
       clipRetry = !PlxOutlierClip (&fitdata, mask, Noutlier, dPsigMax, dPvec, VERBOSE);
 
@@ -117,5 +119,5 @@
   for (i = 0; (VERBOSE == 2) && (i < fitdata.Npts); i++) {
     int n = fitdata.index[i];
-    int maskValue = mask ? mask[n] : 0;
+    int maskValue = mask ? mask[n] : 1;
     fprintf (stderr, "%f %f : %f %d : %f %f %f\n", R[n], D[n], T[n], maskValue, fitdata.t[i], fitdata.X[i], fitdata.Y[i]);
   }
