Index: trunk/extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c
===================================================================
--- trunk/extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c	(revision 42724)
+++ trunk/extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c	(revision 42799)
@@ -312,9 +312,12 @@
 		    cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue;
 	       if(cell[j].burn[k].nfit <= 0) continue;
-	     }
+	       /*kick out burns which are single pixels*/
+\	     }
 	    } else {
 	     if(cell[j].burn[k].fiterr && 
 	       cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue;
 	     if(cell[j].burn[k].nfit <= 0) continue;
+	     /*kick out burns which are single pixels*/
+
 	    }
 
Index: trunk/extsrc/gpcsw/gpcsrc/fits/burntool/stardetect.c
===================================================================
--- trunk/extsrc/gpcsw/gpcsrc/fits/burntool/stardetect.c	(revision 42724)
+++ trunk/extsrc/gpcsw/gpcsrc/fits/burntool/stardetect.c	(revision 42799)
@@ -34,8 +34,14 @@
    starcut = STAR_THRESH/2 + cell->sky + cell->bias;
 
-   /*try a new value for thresh_lo which is 1 sigmas above the background, but with a safety limit of 1000 counts*/
+   /*try a new value for thresh_lo which is 10 sigmas above the background, but with a safety limit of 1000 counts*/
 	trailthresh = cell->sky + (10*cell->rms);
 	if(trailthresh <= 1000) trailthresh = 1000;
 	trailthresh = trailthresh + cell->bias;
+	thresh_lo = trailthresh;
+
+   /*try a new value for burnthresh which is twice the bias above the sky background, but with a safety limit of 30000 counts*/
+	burnthresh = cell->sky + (2*cell->bias);
+	if(burnthresh <= BURN_THRESH) burnthresh = BURN_THRESH;
+	thresh_hi = burnthresh;
 
 /* Look at all the pixels which pass the burn threshold */
@@ -81,4 +87,5 @@
 	        boxbuf[nbox].ey = k-1;
 	        grow_box(nx, ny, NX, data, thresh_lo, boxbuf+nbox);
+		
            /* Fill in max and center info */
 	        boxbuf[nbox].max = 0;
@@ -100,4 +107,22 @@
 			     boxbuf[nbox].ex, boxbuf[nbox].ey,
 			     boxbuf[nbox].max);
+		        fflush(stdout);
+	          }
+/* Mark the veto mask so as not to trigger on this one again */
+	          for(l=boxbuf[nbox].sy; l<=boxbuf[nbox].ey; l++) {
+		         for(k=boxbuf[nbox].sx; k<=boxbuf[nbox].ex; k++) {
+		          veto[k+l*NX] = boxbuf[nbox].max;
+		         }
+	          }
+	          xon = -1;
+	          continue;
+	        }
+
+/* A box that is composed of a single pixel should not be considered a burn */
+	        if((boxbuf[nbox].ex - boxbuf[nbox].sx) <= 2 && (boxbuf[nbox].ey - boxbuf[nbox].sy) <= 2) {
+	          if(VERBOSE & VERB_DETECT) {
+		        printf("Ditching box %d %d %d %d  for being too small\n",
+			     boxbuf[nbox].sx, boxbuf[nbox].sy,
+			     boxbuf[nbox].ex, boxbuf[nbox].ey);
 		        fflush(stdout);
 	          }
Index: trunk/extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c
===================================================================
--- trunk/extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c	(revision 42724)
+++ trunk/extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c	(revision 42799)
@@ -290,5 +290,4 @@
 
    if(!strcmp(camera,"gpc2")) {
-
      /*Conpute the mean and standard deviation of the trail along x*/
      for(i=xs; i<=xe; i++) {
@@ -384,5 +383,5 @@
      }
      /* Update fit ranges */
-     if(box->nfit > 0) {
+     if(box->nfit > 1) {
         box->sxfit = box->xfit[0];
         box->exfit = box->xfit[box->nfit-1];
