Index: /branches/eam_branches/Ohana.20100606/src/relphot/src/bcatalog.c
===================================================================
--- /branches/eam_branches/Ohana.20100606/src/relphot/src/bcatalog.c	(revision 28235)
+++ /branches/eam_branches/Ohana.20100606/src/relphot/src/bcatalog.c	(revision 28236)
@@ -7,4 +7,5 @@
   off_t NAVERAGE, NMEASURE, Naverage, Nmeasure, Nm;
   float mag;
+  int Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew;
 
   // XXX PhotNsec as a global is a bad idea; either get it from catalog
@@ -20,4 +21,6 @@
   ALLOCATE (subcatalog[0].measure, Measure, NMEASURE);
   Nmeasure = Naverage = 0;
+
+  Ncode = Ntime = Ndophot = Nmag = Nsigma = Nimag = Nfew = 0;
 
   /* exclude stars not in range or with too few measurements */
@@ -46,10 +49,10 @@
       /* select measurements by photcode */
       ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[offset].photcode);
-      if (ecode != photcode[0].code) continue;
+      if (ecode != photcode[0].code) { Ncode ++; continue; }
 
       /* select measurements by time */
       if (TimeSelect) {
-	if (catalog[0].measure[offset].t < TSTART) continue;
-	if (catalog[0].measure[offset].t > TSTOP) continue;
+	if (catalog[0].measure[offset].t < TSTART) { Ntime ++; continue; }
+	if (catalog[0].measure[offset].t > TSTOP)  { Ntime ++; continue; }
       }
 
@@ -57,18 +60,18 @@
       // XXX ignore this criterion for REF measurements?
       // XXX chnage this to select by bitflags
-      if (DophotSelect && ((catalog[0].measure[offset].photFlags >> 16) != DophotValue)) continue;
+      if (DophotSelect && ((catalog[0].measure[offset].photFlags >> 16) != DophotValue)) { Ndophot ++; continue; }
 
       /* select measurements by mag limit */
       mag = PhotCat (&catalog[0].measure[offset]);
-      if (mag > MAG_LIM) continue;
+      if (mag > MAG_LIM) { Nmag ++; continue; } 
 
       /* select measurements by measurement error */
-      if ((SIGMA_LIM > 0) && (catalog[0].measure[offset].dM > SIGMA_LIM)) continue;
+      if ((SIGMA_LIM > 0) && (catalog[0].measure[offset].dM > SIGMA_LIM)) { Nsigma ++; continue; }
 
       /* select measurements by mag limit */
       if (ImagSelect) {
 	mag = PhotInst (&catalog[0].measure[offset]);
-	if (mag < ImagMin) continue;
-	if (mag > ImagMax) continue;
+	if (mag < ImagMin) { Nimag ++; continue; }
+	if (mag > ImagMax) { Nimag ++; continue; }
       }
 
@@ -94,4 +97,5 @@
     if (Nm <= STAR_TOOFEW) { /* enough measurements in band? */
       Nmeasure -= Nm;
+      Nfew ++;
       continue; 
     }
@@ -114,6 +118,8 @@
 
   if (VERBOSE) {
-    fprintf (stderr, "%lld: using %lld stars (%lld measures) for catalog\n", (long long) i, 
-	     (long long) subcatalog[0].Naverage, (long long) subcatalog[0].Nmeasure);
+    fprintf (stderr, "using "OFF_T_FMT" stars ("OFF_T_FMT" measures) of "OFF_T_FMT" for catalog\n", 
+	      subcatalog[0].Naverage,  subcatalog[0].Nmeasure,  i);
+    fprintf (stderr, "rejections: %d code, %d time, %d dophot, %d mag, %d sigma, %d imag, %d few\n", 
+	     Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew);
   }
   return (TRUE);
