Index: /branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- /branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/MosaicOps.c	(revision 33819)
+++ /branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/MosaicOps.c	(revision 33820)
@@ -258,5 +258,5 @@
     if (j != -1) {
       // mark this mosaic as bad
-      mosaic[i].skipCal = TRUE;
+      mosaic[j].skipCal = TRUE;
       Nmark ++;
     }
Index: /branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/global_stats.c
===================================================================
--- /branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/global_stats.c	(revision 33819)
+++ /branches/eam_branches/ipp-20120405/Ohana/src/relphot/src/global_stats.c	(revision 33820)
@@ -1,3 +1,9 @@
 # include "relphot.h"
+
+# define MARKTIME(MSG,...) { \
+  float dtime; \
+  gettimeofday (&stopTimer, (void *) NULL); \
+  dtime = DTIME (stopTimer, startTimer); \
+  fprintf (stderr, MSG, __VA_ARGS__); }
 
 void global_stats (Catalog *catalog, int Ncatalog, FlatCorrectionTable *flatcorr) {
@@ -5,8 +11,12 @@
   StatType stN, stX, stS, imN, imX, imM, imD, msM, msX, msN, msD;
 
+  // struct timeval startTimer, stopTimer;
+
   initstats ("MEAN");
 
   fprintf (stderr, "\n");
   fprintf (stderr, "STATS            median     mean    sigma      min      max   Nmeas\n");
+
+  // gettimeofday (&startTimer, (void *) NULL);
 
   int Ns;
@@ -17,7 +27,11 @@
     int seccode = photcodes[Ns][0].code;
 
+    // MARKTIME("start star stats: %f sec\n", dtime);
     stN = statsStarN (catalog, Ncatalog, Nsec, seccode, flatcorr);
+    // MARKTIME("done star N: %f sec\n", dtime);
     stX = statsStarX (catalog, Ncatalog, Nsec);
+    // MARKTIME("done star X: %f sec\n", dtime);
     stS = statsStarS (catalog, Ncatalog, Nsec);
+    // MARKTIME("done star S: %f sec\n", dtime);
   
     fprintf (stderr, "   --- stats for %s ---\n", photcodes[Ns][0].name);
