Index: trunk/Ohana/src/opihi/cmd.astro/fitpm.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/fitpm.c	(revision 37807)
+++ trunk/Ohana/src/opihi/cmd.astro/fitpm.c	(revision 39228)
@@ -1,21 +1,3 @@
 # include "astro.h"
-# define J2000 51544.5       /* Modified Julian date at standard epoch J2000 */
-
-# define ESCAPE(MSG,...) {			\
-    gprint (GP_ERR, MSG, __VA_ARGS__);		\
-    return FALSE; }
-
-typedef struct {
-  double Ro, dRo;
-  double Do, dDo;
-
-  double uR, duR;
-  double uD, duD;
-
-  double chisq;
-  int Nfit;
-} PMFit;
-
-int FitPMonly (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int VERBOSE);
 
 int fitpm (int argc, char **argv) {
@@ -122,5 +104,5 @@
   }
 
-  PMFit fit;
+  PlxFit fit;
   if (!FitPMonly (&fit, X, dX, Y, dY, t, n, VERBOSE)) {
     return FALSE;
@@ -158,5 +140,5 @@
 
 /* do we want an init function which does the alloc and a clear function to free? */
-int FitPMonly (PMFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int VERBOSE) {
+int FitPMonly (PlxFit *fit, double *X, double *dX, double *Y, double *dY, double *T, int Npts, int VERBOSE) {
 
   int i;
@@ -241,4 +223,7 @@
   fit[0].duD = sqrt(A[3][3]);
   
+  fit[0].p   = 0.0;
+  fit[0].dp  = NAN;
+
   // add up the chi square for the fit
   chisq = 0.0;
