Index: /branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/UpdateObjects.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/UpdateObjects.c	(revision 35605)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/UpdateObjects.c	(revision 35606)
@@ -90,4 +90,7 @@
 
       XVERB = FALSE;
+      fitAve.chisq = NAN;
+      fitPM.chisq = NAN;
+      fitPAR.chisq = NAN;
 
       if (catalog[i].average[j].Nmeasure == 0) {
@@ -198,5 +201,5 @@
       Trange = Tmax - Tmin;
       if (Trange < PM_DT_MIN) mode = FIT_AVERAGE;
-      if ((mode == FIT_PM_ONLY) && (N < PM_TOOFEW)) mode = FIT_AVERAGE;
+      if (((mode == FIT_PM_ONLY) || (mode == FIT_PM_AND_PAR)) && (N <= PM_TOOFEW)) mode = FIT_AVERAGE;
 
       if (FIT_TARGET == TARGET_HIGH_SPEED) {
@@ -265,6 +268,9 @@
 	float parRange = hypot (dXRange, dYRange);
 	
-	if (parRange >= PAR_FACTOR_MIN) {
+# define PAR_TOOFEW 5
+	if ((parRange >= PAR_FACTOR_MIN) && (N > PAR_TOOFEW)) {
 	  FitPMandPar (&fitPAR, X, dX, Y, dY, T, pX, pY, N, XVERB);
+	  if (XVERB) fprintf (stderr, "fitted PM+PAR:  %f - %f : %f %f : %f %f : %f %f : %f vs %f vs %f\n", Tmin, Tmax, fitPAR.Ro, fitPAR.Do, fitPAR.uR, fitPAR.uD, fitPAR.p, fitPAR.dp, fitPAR.chisq, fitPM.chisq, fitAve.chisq);
+
 	  XY_to_RD (&fitPAR.Ro, &fitPAR.Do, fitPAR.Ro, fitPAR.Do, &coords);
 	  catalog[i].average[j].flags |= ID_STAR_FIT_PAR;
@@ -315,5 +321,5 @@
 	break;
       }
-      if (XVERB) fprintf (stderr, "%f %f -> %f %f (%f,%f) pm=(%f %f)\n",
+      if (XVERB) fprintf (stderr, "%f %f -> %f %f (%f,%f) pm=(%f %f) plx=(%f +/- %f)\n",
 			  catalog[i].average[j].R, 
 			  catalog[i].average[j].D, 
@@ -321,6 +327,5 @@
 			  3600*(catalog[i].average[j].R - fit.Ro), 
 			  3600*(catalog[i].average[j].D - fit.Do),
-			  fit.uR,
-			  fit.uD);
+			  fit.uR, fit.uD, fit.p, fit.dp);
 
       // make sure that the fit succeeded
