Index: trunk/Ohana/src/opihi/cmd.astro/fitplx.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/fitplx.c	(revision 40165)
+++ trunk/Ohana/src/opihi/cmd.astro/fitplx.c	(revision 40291)
@@ -77,5 +77,5 @@
   double *dD = dDvec->elements.Flt;
 
-  int *mask = NULL;
+  opihi_int *mask = NULL;
   if (mvec) {
     mask = mvec->elements.Int;
@@ -380,5 +380,5 @@
 }
 
-int PlxSetMeanEpoch (double *R, double *D, double *T, double *Rmean, double *Dmean, double *Tmean, int *mask, int Ntotal) {
+int PlxSetMeanEpoch (double *R, double *D, double *T, double *Rmean, double *Dmean, double *Tmean, opihi_int *mask, int Ntotal) {
 
   int i;
@@ -413,5 +413,5 @@
 
 // generate the fit values (projected X,Y; parallax factors; 
-int PlxSetEpochPosition (PlxFitData *fitdata, double *R, double *D, double *dR, double *dD, double *T, int *mask, int Ntotal, Coords *coords, double Tmean) {
+int PlxSetEpochPosition (PlxFitData *fitdata, double *R, double *D, double *dR, double *dD, double *T, opihi_int *mask, int Ntotal, Coords *coords, double Tmean) {
 
   int i;
@@ -464,5 +464,5 @@
 # define MAX_REJECT 0.1
 
-int PlxOutlierClip (PlxFitData *fitdata, int *mask, int Noutlier, float dPsigMax, Vector *dPvec, int VERBOSE) {
+int PlxOutlierClip (PlxFitData *fitdata, opihi_int *mask, int Noutlier, float dPsigMax, Vector *dPvec, int VERBOSE) {
 
   int i, n;
Index: trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c	(revision 40165)
+++ trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c	(revision 40291)
@@ -81,5 +81,5 @@
   double *dD = dDvec->elements.Flt;
 
-  int *mask = NULL;
+  opihi_int *mask = NULL;
   if (mvec) {
     mask = mvec->elements.Int;
@@ -109,6 +109,6 @@
   for (i = 0; (VERBOSE == 2) && (i < fitdata.Npts); i++) {
     int n = fitdata.index[i];
-    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]);
+    opihi_int maskValue = mask ? mask[n] : 1;
+    fprintf (stderr, "%f %f : %f "OPIHI_INT_FMT" : %f %f %f\n", R[n], D[n], T[n], maskValue, fitdata.t[i], fitdata.X[i], fitdata.Y[i]);
   }
 
@@ -150,5 +150,5 @@
       
       if (VERBOSE == 2) {
-	  fprintf (stderr, "%f %f : %f %d : %f %f %f : %f %f %f %f\n", R[n], D[n], T[n], mask[n], fitdata.t[i], fitdata.X[i], fitdata.Y[i], fitdata.Wx[i], fitdata.Wy[i], Sum_Wx, Sum_Wy);
+	  fprintf (stderr, "%f %f : %f "OPIHI_INT_FMT" : %f %f %f : %f %f %f %f\n", R[n], D[n], T[n], mask[n], fitdata.t[i], fitdata.X[i], fitdata.Y[i], fitdata.Wx[i], fitdata.Wy[i], Sum_Wx, Sum_Wy);
       }
     }
Index: trunk/Ohana/src/opihi/cmd.astro/fitpm.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/fitpm.c	(revision 40165)
+++ trunk/Ohana/src/opihi/cmd.astro/fitpm.c	(revision 40291)
@@ -50,5 +50,5 @@
   double *dD = dDvec->elements.Flt;
 
-  int *mask = NULL;
+  opihi_int *mask = NULL;
   if (mvec) {
     mask = mvec->elements.Int;
Index: trunk/Ohana/src/opihi/cmd.astro/fitpm_irls.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/fitpm_irls.c	(revision 40165)
+++ trunk/Ohana/src/opihi/cmd.astro/fitpm_irls.c	(revision 40291)
@@ -58,5 +58,5 @@
   double *dD = dDvec->elements.Flt;
 
-  int *mask = NULL;
+  opihi_int *mask = NULL;
   if (mvec) {
     mask = mvec->elements.Int;
Index: trunk/Ohana/src/opihi/cmd.astro/star.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/star.c	(revision 40165)
+++ trunk/Ohana/src/opihi/cmd.astro/star.c	(revision 40291)
@@ -3,5 +3,5 @@
 int star (int argc, char **argv) {
 
-  int x, y, N, dx, Nborder;
+  int x, y, N, Nborder;
   double max;
   Buffer *buf;
@@ -33,6 +33,18 @@
   }
   
+  int dx = 11;
+  int dy = 11;
+  int BOX = FALSE;
+  if ((N = get_argument (argc, argv, "-box"))) {
+    remove_argument (N, &argc, argv);
+    dx  = atoi(argv[N]);
+    remove_argument (N, &argc, argv);
+    dy  = atoi(argv[N]);
+    remove_argument (N, &argc, argv);
+    BOX = TRUE;
+  }
+
   if ((argc != 4) && (argc != 5)) {
-    gprint (GP_ERR, "USAGE: star (buffer) x y [dx] [-border N] [-sat cnts]\n");
+    gprint (GP_ERR, "USAGE: star (buffer) x y [dx] [-border N] [-sat cnts] [-box dx dy]\n");
     gprint (GP_ERR, " dx is the aperture diameter, but is adjusted up to the next odd number\n");
     return (FALSE);
@@ -40,5 +52,4 @@
   if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE);
 
-  dx = 11;
   x = atof (argv[2]);
   y = atof (argv[3]);
@@ -47,5 +58,9 @@
   }
 
-  get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max, VERBOSE);
+  if (BOX) {
+    get_box_stats (&buf[0].matrix, x, y, dx, dy, Nborder, max, VERBOSE);
+  } else {
+    get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max, VERBOSE);
+  }
   
   return (TRUE);
