Index: trunk/Ohana/src/opihi/Makefile.Common
===================================================================
--- trunk/Ohana/src/opihi/Makefile.Common	(revision 6678)
+++ trunk/Ohana/src/opihi/Makefile.Common	(revision 6683)
@@ -27,4 +27,7 @@
 	@if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi
 	@echo ""
+	@echo "current: $^"
+	@echo "current: $*"
+	@echo "current: $@"
 	rm -f $@
 	cp $^ $@
Index: trunk/Ohana/src/opihi/dvo/calextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/calextract.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/calextract.c	(revision 6683)
@@ -63,8 +63,8 @@
     catalog.filename = skylist[0].filename[Nr];
     switch (lock_catalog (&catalog, LCK_SOFT)) {
-    case 2:
-      unlock_catalog (&catalog);
-    case 0:
-      continue;
+      case 2:
+	unlock_catalog (&catalog);
+      case 0:
+	continue;
     }
     catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
@@ -99,6 +99,6 @@
       vec[Nm ][0].elements[N] = M2;
       vec[NC ][0].elements[N] = color;
-      vec[NR ][0].elements[N] = catalog.average[i].R_PS;
-      vec[ND ][0].elements[N] = catalog.average[i].D_PS;
+      vec[NR ][0].elements[N] = catalog.average[i].R;
+      vec[ND ][0].elements[N] = catalog.average[i].D;
       vec[Nd1][0].elements[N] = ExtractAverages (code[0], mode[0], &catalog.average[i], &catalog.secfilt[i*Nsec], &catalog.measure[m], AVE_dMAG);
       vec[Nd2][0].elements[N] = dM2;
@@ -133,5 +133,5 @@
   return (FALSE);
 
- escape:
+escape:
   
   if (RegionName != NULL) free (RegionName);
Index: trunk/Ohana/src/opihi/dvo/calmextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 6683)
@@ -76,8 +76,8 @@
     catalog.filename = skylist[0].filename[Nr];
     switch (lock_catalog (&catalog, LCK_SOFT)) {
-    case 2:
-      unlock_catalog (&catalog);
-    case 0:
-      continue;
+      case 2:
+	unlock_catalog (&catalog);
+      case 0:
+	continue;
     }
     catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
@@ -134,6 +134,6 @@
 	vec[Nc ][0].elements[N] = color;
 	vec[Ns ][0].elements[N] = Nstar;
-	vec[NR ][0].elements[N] = catalog.average[i].R_PS;
-	vec[ND ][0].elements[N] = catalog.average[i].D_PS;
+	vec[NR ][0].elements[N] = catalog.average[i].R;
+	vec[ND ][0].elements[N] = catalog.average[i].D;
       }
       Nstar ++; 
@@ -160,5 +160,5 @@
   return (FALSE);
 
- escape:
+escape:
   
   FreeImageSelection ();
Index: trunk/Ohana/src/opihi/dvo/compare.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/compare.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/compare.c	(revision 6683)
@@ -3,5 +3,5 @@
 
 void compare (Catalog *catlog1, Catalog *catlog2, 
-	 Vector *rvec,  Vector *dvec,  Vector *mvec, Vector *drvec, Vector *ddvec, Vector *dmvec, double radius) {
+	      Vector *rvec,  Vector *dvec,  Vector *mvec, Vector *drvec, Vector *ddvec, Vector *dmvec, double radius) {
 
   int i, j, first_j, Nmatch, NMATCH;
@@ -19,5 +19,5 @@
   for (i = j = 0; (i < catlog1[0].Naverage) && (j < catlog2[0].Naverage);) {
     
-    dX = catlog1[0].average[i].R_PS - catlog2[0].average[j].R_PS;
+    dX = catlog1[0].average[i].R - catlog2[0].average[j].R;
 
     if (!(i % 100))
@@ -32,14 +32,14 @@
       first_j = j;
       for (j = first_j; (fabs (dX) < radius) && (j < catlog2[0].Naverage); j++) {
-	dX = catlog1[0].average[i].R_PS - catlog2[0].average[j].R_PS;
-	dY = catlog1[0].average[i].D_PS - catlog2[0].average[j].D_PS;
+	dX = catlog1[0].average[i].R - catlog2[0].average[j].R;
+	dY = catlog1[0].average[i].D - catlog2[0].average[j].D;
 	dR = hypot (dX, dY);
 	if (dR < radius) {
-	   rvec[0].elements[Nmatch] = catlog1[0].average[i].R_PS;
-	   dvec[0].elements[Nmatch] = catlog1[0].average[i].D_PS;
-	   mvec[0].elements[Nmatch] = catlog1[0].average[i].M_PS;
+	  rvec[0].elements[Nmatch] = catlog1[0].average[i].R;
+	  dvec[0].elements[Nmatch] = catlog1[0].average[i].D;
+	  mvec[0].elements[Nmatch] = catlog1[0].average[i].M;
 	  drvec[0].elements[Nmatch] = dX;
 	  ddvec[0].elements[Nmatch] = dY;
-	  dmvec[0].elements[Nmatch] = catlog1[0].average[i].M_PS - catlog2[0].average[j].M_PS;
+	  dmvec[0].elements[Nmatch] = catlog1[0].average[i].M - catlog2[0].average[j].M;
 	  Nmatch ++;
 	  if (Nmatch == NMATCH - 1) {
@@ -66,7 +66,7 @@
   REALLOCATE (dmvec[0].elements, float, Nmatch);
   
-   rvec[0].Nelements = Nmatch;
-   dvec[0].Nelements = Nmatch;
-   mvec[0].Nelements = Nmatch;
+  rvec[0].Nelements = Nmatch;
+  dvec[0].Nelements = Nmatch;
+  mvec[0].Nelements = Nmatch;
   drvec[0].Nelements = Nmatch;
   ddvec[0].Nelements = Nmatch;
Index: trunk/Ohana/src/opihi/dvo/dmt.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dmt.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/dmt.c	(revision 6683)
@@ -71,8 +71,8 @@
     catalog.filename = skylist[0].filename[k];
     switch (lock_catalog (&catalog, LCK_SOFT)) {
-    case 2:
-      unlock_catalog (&catalog);
-    case 0:
-      continue;
+      case 2:
+	unlock_catalog (&catalog);
+      case 0:
+	continue;
     }
     catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
@@ -86,5 +86,5 @@
       if (catalog.average[i].Nm != 3) continue;
       m = catalog.average[i].offset;
-      M0 = (Ns == -1) ? catalog.average[i].M_PS : catalog.secfilt[i*Nsec+Ns].M_PS;
+      M0 = (Ns == -1) ? catalog.average[i].M : catalog.secfilt[i*Nsec+Ns].M_PS;
       M1 = PhotCat (&catalog.measure[m+0]);
       M2 = PhotCat (&catalog.measure[m+1]);
@@ -98,6 +98,6 @@
       Yvec.elements[N] = (dmt1 + dmt2) / 2.0;
       if (SaveVectors) {
-	Rvec.elements[N] = catalog.average[i].R_PS;
-	Dvec.elements[N] = catalog.average[i].D_PS;
+	Rvec.elements[N] = catalog.average[i].R;
+	Dvec.elements[N] = catalog.average[i].D;
 	Zvec.elements[N] = M0;
       }
Index: trunk/Ohana/src/opihi/dvo/dvomisc.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dvomisc.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/dvomisc.c	(revision 6683)
@@ -15,6 +15,6 @@
   
   for (i = 0; i < Naverage; i++) {
-    A = average[i].R_PS;
-    D = average[i].D_PS;
+    A = average[i].R;
+    D = average[i].D;
     SD =  cos(RAD_DEG*A + zeta)*sin(theta)*cos(RAD_DEG*D) + cos(theta)*sin(RAD_DEG*D);
     CD = sqrt (1 - SD*SD);
@@ -28,6 +28,6 @@
       RA += 360;
     
-    average[i].R_PS = RA;
-    average[i].D_PS = DEC; 
+    average[i].R = RA;
+    average[i].D = DEC; 
   }
 
@@ -59,6 +59,6 @@
     j = (l << 1) + 1;
     while (j <= ir) {
-      if (j < ir && ave[j].R_PS < ave[j+1].R_PS) j++;
-      if (tmp.R_PS < ave[j].R_PS) {
+      if (j < ir && ave[j].R < ave[j+1].R) j++;
+      if (tmp.R < ave[j].R) {
 	ave[i] = ave[j];
 	j += (i=j) + 1;
Index: trunk/Ohana/src/opihi/dvo/gstar.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gstar.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/gstar.c	(revision 6683)
@@ -72,8 +72,8 @@
   catalog.filename = skylist[0].filename[0];
   switch (lock_catalog (&catalog, LCK_SOFT)) {
-  case 2:
-    unlock_catalog (&catalog);
-  case 0:
-    return (FALSE);
+    case 2:
+      unlock_catalog (&catalog);
+    case 0:
+      return (FALSE);
   }
   catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
@@ -92,6 +92,6 @@
   /* stars are not guaranteed to be sorted in RA or in DEC, so first sort the list */
   for (i = 0; i < Nstars; i++) {
-    RA[i] = catalog.average[i].R_PS;
-    DEC[i] = catalog.average[i].D_PS;
+    RA[i] = catalog.average[i].R;
+    DEC[i] = catalog.average[i].D;
     N1[i] = i;
   }
@@ -138,30 +138,30 @@
       k = N1[i];
       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);
+	fprintf (GetOutfile(), "star: %d\n", k);
+	fprintf (GetOutfile(), "%9.5f %9.5f %3d of %3d  %4.1f %5d\n", catalog.average[k].R, catalog.average[k].D, 
+		 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);
-	  }
-	  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");
+	/* 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, catalog.average[k].M);
+	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, catalog.average[k].dM);
+	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");
       }
 
Index: trunk/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imdata.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/imdata.c	(revision 6683)
@@ -122,8 +122,8 @@
     catalog.filename = skylist[0].filename[j];
     switch (lock_catalog (&catalog, LCK_SOFT)) {
-    case 2:
-      unlock_catalog (&catalog);
-    case 0:
-      continue;
+      case 2:
+	unlock_catalog (&catalog);
+      case 0:
+	continue;
     }
     catalog.catflags = LOAD_AVES;
@@ -136,70 +136,70 @@
     /* assign vector values */
     switch (mode) {
-    case (1):  /* ra */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	n = catalog.measure[i].averef;
-	vec[0].elements[N] = catalog.average[n].R_PS - catalog.measure[i].dR_PS / 3600.0;
-	N++;
-	CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
-      }
-      break;
-    case (2):  /* dec */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	n = catalog.measure[i].averef;
-	vec[0].elements[N] = catalog.average[n].D_PS - catalog.measure[i].dD_PS / 3600.0;
-	N++;
-	CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
-      }
-      break;
-    case (3):  /* mag */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	vec[0].elements[N] = catalog.measure[i].M_PS;
-	N++;
-	CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
-      }
-      break;
-    case (4):  /* dmag */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	vec[0].elements[N] = catalog.measure[i].dM_PS;
-	N++;
-	CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
-      }
-      break;
-    case (5):  /* Mcal */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	vec[0].elements[N] = catalog.measure[i].Mcal_PS;
-	N++;
-	CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
-      }
-      break;
-    case (6):  /* Mrel */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	n = catalog.measure[i].averef;
-	vec[0].elements[N] = catalog.average[n].M_PS;
-	N++;
-      }
-      break;
-    case (7):  /* source */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	vec[0].elements[N] = catalog.measure[i].source;
-	N++;
-	CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
-      }
-      break;
-    case (10):  /* time */
-      for (i = 0; i < catalog.Nmeasure; i++) {
-	if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
-	vec[0].elements[N] = TimeValue (catalog.measure[i].t, TimeReference, TimeFormat);
-	N++;
-	CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
-      }
-      break;
+      case (1):  /* ra */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  n = catalog.measure[i].averef;
+	  vec[0].elements[N] = catalog.average[n].R - catalog.measure[i].dR_PS / 3600.0;
+	  N++;
+	  CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
+	}
+	break;
+      case (2):  /* dec */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  n = catalog.measure[i].averef;
+	  vec[0].elements[N] = catalog.average[n].D - catalog.measure[i].dD_PS / 3600.0;
+	  N++;
+	  CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
+	}
+	break;
+      case (3):  /* mag */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  vec[0].elements[N] = catalog.measure[i].M_PS;
+	  N++;
+	  CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
+	}
+	break;
+      case (4):  /* dmag */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  vec[0].elements[N] = catalog.measure[i].dM_PS;
+	  N++;
+	  CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
+	}
+	break;
+      case (5):  /* Mcal */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  vec[0].elements[N] = catalog.measure[i].Mcal_PS;
+	  N++;
+	  CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
+	}
+	break;
+      case (6):  /* Mrel */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  n = catalog.measure[i].averef;
+	  vec[0].elements[N] = catalog.average[n].M;
+	  N++;
+	}
+	break;
+      case (7):  /* source */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  vec[0].elements[N] = catalog.measure[i].source;
+	  N++;
+	  CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
+	}
+	break;
+      case (10):  /* time */
+	for (i = 0; i < catalog.Nmeasure; i++) {
+	  if ((catalog.measure[i].t < start) || (catalog.measure[i].t > stop)) continue;
+	  vec[0].elements[N] = TimeValue (catalog.measure[i].t, TimeReference, TimeFormat);
+	  N++;
+	  CHECK_REALLOCATE (vec[0].elements, float, NPTS, N, 1000);
+	}
+	break;
     }
     if (catalog.average != 0) {
Index: trunk/Ohana/src/opihi/dvo/lcurve.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 6683)
@@ -83,8 +83,8 @@
   catalog.filename = skylist[0].filename[0];
   switch (lock_catalog (&catalog, LCK_SOFT)) {
-  case 2:
-    unlock_catalog (&catalog);
-  case 0:
-    return (FALSE);
+    case 2:
+      unlock_catalog (&catalog);
+    case 0:
+      return (FALSE);
   }
   catalog.catflags = LOAD_AVES | LOAD_MEAS;
@@ -103,6 +103,6 @@
   /* stars are not guaranteed to be sorted in RA or in DEC, so first sort the list */
   for (i = 0; i < Nstars; i++) {
-    RA[i] = catalog.average[i].R_PS;
-    DEC[i] = catalog.average[i].D_PS;
+    RA[i] = catalog.average[i].R;
+    DEC[i] = catalog.average[i].D;
     N1[i] = i;
   }
Index: trunk/Ohana/src/opihi/dvo/lightcurve.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/lightcurve.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/lightcurve.c	(revision 6683)
@@ -59,8 +59,8 @@
   catalog.filename = skylist[0].filename[0];
   switch (lock_catalog (&catalog, LCK_SOFT)) {
-  case 2:
-    unlock_catalog (&catalog);
-  case 0:
-    return (FALSE);
+    case 2:
+      unlock_catalog (&catalog);
+    case 0:
+      return (FALSE);
   }
   catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
@@ -79,6 +79,6 @@
   /* stars are not guaranteed to be sorted in RA or in DEC, so first sort the list */
   for (i = 0; i < Nstars; i++) {
-    RA[i] = catalog.average[i].R_PS;
-    DEC[i] = catalog.average[i].D_PS;
+    RA[i] = catalog.average[i].R;
+    DEC[i] = catalog.average[i].D;
     N1[i] = i;
   }
Index: trunk/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/mextract.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/mextract.c	(revision 6683)
@@ -58,8 +58,8 @@
     catalog.filename = skylist[0].filename[i];
     switch (lock_catalog (&catalog, LCK_SOFT)) {
-    case 2:
-      unlock_catalog (&catalog);
-    case 0:
-      continue;
+      case 2:
+	unlock_catalog (&catalog);
+      case 0:
+	continue;
     }
     catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;
Index: trunk/Ohana/src/opihi/dvo/photometry.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/photometry.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/photometry.c	(revision 6683)
@@ -225,6 +225,18 @@
 
   param = AVE_ZERO;
-  if (!strcasecmp (parname, "ra"))    param = AVE_RA;
-  if (!strcasecmp (parname, "dec"))   param = AVE_DEC;
+  if (!strcasecmp (parname, "RA"))    param = AVE_RA;
+  if (!strcasecmp (parname, "DEC"))   param = AVE_DEC;
+
+  if (!strcasecmp (parname, "dRA"))   param = AVE_RA_ERR;
+  if (!strcasecmp (parname, "dDEC"))  param = AVE_DEC_ERR;
+
+  if (!strcasecmp (parname, "uRA"))   param = AVE_U_RA;
+  if (!strcasecmp (parname, "uDEC"))  param = AVE_U_DEC;
+  if (!strcasecmp (parname, "duRA"))  param = AVE_U_RA_ERR;
+  if (!strcasecmp (parname, "duDEC")) param = AVE_U_DEC_ERR;
+
+  if (!strcasecmp (parname, "par"))   param = AVE_PAR;
+  if (!strcasecmp (parname, "dpar"))  param = AVE_PAR_ERR;
+
   if (!strcasecmp (parname, "dmag"))  param = AVE_dMAG;
   if (!strcasecmp (parname, "mag"))   param = AVE_MAG;
@@ -564,9 +576,37 @@
   switch (param) {
     case AVE_RA:
-      value = average[0].R_PS;
+      value = average[0].R;
       break;
     case AVE_DEC:
-      value = average[0].D_PS;
-      break;
+      value = average[0].D;
+      break;
+    case AVE_RA_ERR:
+      value = average[0].dR;
+      break;
+    case AVE_DEC_ERR:
+      value = average[0].dD;
+      break;
+
+    case AVE_U_RA:
+      value = average[0].uR;
+      break;
+    case AVE_U_DEC:
+      value = average[0].uD;
+      break;
+    case AVE_U_RA_ERR:
+      value = average[0].duR;
+      break;
+    case AVE_U_DEC_ERR:
+      value = average[0].duD;
+      break;
+
+    case AVE_PAR:
+      value = average[0].P;
+      break;
+    case AVE_PAR_ERR:
+      value = average[0].dP;
+      break;
+
+
     case AVE_NMEAS:
       value = average[0].Nm;
@@ -924,5 +964,5 @@
   }
 
- skip: 
+skip: 
   if (M1 != NULL) free (M1);
   if (M2 != NULL) free (M2);
@@ -1058,8 +1098,8 @@
       break;
     case MEAS_RA: /* OK */
-      value = average[0].R_PS - measure[0].dR_PS / 3600.0;
+      value = average[0].R - measure[0].dR_PS / 3600.0;
       break;
     case MEAS_DEC: /* OK */
-      value = average[0].D_PS - measure[0].dD_PS / 3600.0;
+      value = average[0].D - measure[0].dD_PS / 3600.0;
       break;
     case MEAS_dMAG: /* OK */
@@ -1094,6 +1134,6 @@
       break;
     case MEAS_XCCD: /* OK */
-      ra  = average[0].R_PS - measure[0].dR_PS / 3600.0;
-      dec = average[0].D_PS - measure[0].dD_PS / 3600.0;
+      ra  = average[0].R - measure[0].dR_PS / 3600.0;
+      dec = average[0].D - measure[0].dD_PS / 3600.0;
       image = MatchImage (measure[0].t, measure[0].source);
       if (image == NULL) break;
@@ -1102,6 +1142,6 @@
       break;
     case MEAS_YCCD: /* OK */
-      ra  = average[0].R_PS - measure[0].dR_PS / 3600.0;
-      dec = average[0].D_PS - measure[0].dD_PS / 3600.0;
+      ra  = average[0].R - measure[0].dR_PS / 3600.0;
+      dec = average[0].D - measure[0].dD_PS / 3600.0;
       image = MatchImage (measure[0].t, measure[0].source);
       if (image == NULL) break;
@@ -1110,6 +1150,6 @@
       break;
     case MEAS_XMOSAIC: /* OK */
-      ra  = average[0].R_PS - measure[0].dR_PS / 3600.0;
-      dec = average[0].D_PS - measure[0].dD_PS / 3600.0;
+      ra  = average[0].R - measure[0].dR_PS / 3600.0;
+      dec = average[0].D - measure[0].dD_PS / 3600.0;
       mosaic = MatchMosaic (measure[0].t, measure[0].source);
       if (mosaic == NULL) break;
@@ -1118,6 +1158,6 @@
       break;
     case MEAS_YMOSAIC: /* OK */
-      ra  = average[0].R_PS - measure[0].dR_PS / 3600.0;
-      dec = average[0].D_PS - measure[0].dD_PS / 3600.0;
+      ra  = average[0].R - measure[0].dR_PS / 3600.0;
+      dec = average[0].D - measure[0].dD_PS / 3600.0;
       mosaic = MatchMosaic (measure[0].t, measure[0].source);
       if (mosaic == NULL) break;
Index: trunk/Ohana/src/opihi/dvo/pmeasure.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 6683)
@@ -83,8 +83,8 @@
     catalog.filename = skylist[0].filename[j];
     switch (lock_catalog (&catalog, LCK_SOFT)) {
-    case 2:
-      unlock_catalog (&catalog);
-    case 0:
-      continue;
+      case 2:
+	unlock_catalog (&catalog);
+      case 0:
+	continue;
     }
     catalog.catflags = LOAD_AVES | LOAD_MEAS;
@@ -107,6 +107,6 @@
     for (N = i = 0; i < catalog.Naverage; i++) {
       if (IDclip && (catalog.average[i].code != IDchoice)) continue;
-      while (catalog.average[i].R_PS < Rmin) catalog.average[i].R_PS += 360.0;
-      while (catalog.average[i].R_PS > Rmax) catalog.average[i].R_PS -= 360.0;
+      while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0;
+      while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0;
       m = catalog.average[i].offset;
       for (k = 0; k < catalog.average[i].Nm; k++) {
@@ -120,5 +120,5 @@
 	if (LimExclude && (Zvec.elements[N] > 0.99)) continue;
 	if (Zvec.elements[N] < 0.011) continue;
-	fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R_PS - catalog.measure[m+k].dR_PS/3600.0, catalog.average[i].D_PS - catalog.measure[m+k].dD_PS/3600.0, &graphmode.coords);
+	fRD_to_XY (&Xvec.elements[N], &Yvec.elements[N], catalog.average[i].R - catalog.measure[m+k].dR_PS/3600.0, catalog.average[i].D - catalog.measure[m+k].dD_PS/3600.0, &graphmode.coords);
 	N ++;
       }
Index: trunk/Ohana/src/opihi/dvo/subpix.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/subpix.c	(revision 6678)
+++ trunk/Ohana/src/opihi/dvo/subpix.c	(revision 6683)
@@ -43,8 +43,8 @@
   catalog.filename = skylist[0].filename[0];
   switch (lock_catalog (&catalog, LCK_SOFT)) {
-  case 2:
-    unlock_catalog (&catalog);
-  case 0:
-    return (FALSE);
+    case 2:
+      unlock_catalog (&catalog);
+    case 0:
+      return (FALSE);
   }
   catalog.catflags = LOAD_AVES | LOAD_MEAS;
@@ -61,6 +61,6 @@
   ALLOCATE (index, int, Nstars);
   for (i = 0; i < Nstars; i++) {
-    RA[i] = catalog.average[i].R_PS;
-    DEC[i] = catalog.average[i].D_PS;
+    RA[i] = catalog.average[i].R;
+    DEC[i] = catalog.average[i].D;
     index[i] = i;
   }
Index: trunk/Ohana/src/opihi/include/dvo1.h
===================================================================
--- trunk/Ohana/src/opihi/include/dvo1.h	(revision 6678)
+++ trunk/Ohana/src/opihi/include/dvo1.h	(revision 6683)
@@ -15,6 +15,8 @@
 
 /* average params */
-enum {AVE_ZERO, AVE_RA, AVE_DEC, AVE_MAG, AVE_REF, AVE_dMAG, AVE_Xm, AVE_Xp, AVE_NMEAS, 
-      AVE_NMISS, AVE_TYPE, AVE_NPHOT, AVE_NCODE, AVE_NCRIT, AVE_FLAG, AVE_TYPEFRAC};
+enum {AVE_ZERO, AVE_RA, AVE_DEC, AVE_RA_ERR, AVE_DEC_ERR, AVE_U_RA, AVE_U_DEC, 
+      AVE_U_RA_ERR, AVE_U_DEC_ERR, AVE_PAR, AVE_PAR_ERR, AVE_MAG, AVE_REF, AVE_dMAG, 
+      AVE_Xm, AVE_Xp, AVE_NMEAS, AVE_NMISS, AVE_TYPE, AVE_NPHOT, AVE_NCODE, AVE_NCRIT, 
+      AVE_FLAG, AVE_TYPEFRAC};
 
 typedef struct {
