Index: /trunk/Ohana/src/relphot/include/relphot.h
===================================================================
--- /trunk/Ohana/src/relphot/include/relphot.h	(revision 39343)
+++ /trunk/Ohana/src/relphot/include/relphot.h	(revision 39344)
@@ -393,5 +393,5 @@
 Image        *getimages           PROTO((off_t *N, off_t **LineNumber));
 ImageSubset  *getimages_subset    PROTO((off_t *N));
-void          global_stats        PROTO((Catalog *catalog, int Ncatalog, FlatCorrectionTable *flatcorr));
+void          global_stats        PROTO((Catalog *catalog, int Ncatalog, FlatCorrectionTable *flatcorr, int nloop));
 void          initGrid            PROTO((int dX, int dY));
 void          initGridBins        PROTO((Catalog *catalog, int Ncatalog));
Index: /trunk/Ohana/src/relphot/src/ImageOps.c
===================================================================
--- /trunk/Ohana/src/relphot/src/ImageOps.c	(revision 39343)
+++ /trunk/Ohana/src/relphot/src/ImageOps.c	(revision 39344)
@@ -623,4 +623,5 @@
   Nfew = Nbad = Nmos = Ngrid = Nrel = Nsys = 0;
 
+  int Ncalibrated = 0;
   for (i = 0; i < Nimage; i++) {
     
@@ -631,4 +632,5 @@
     }      
 
+    // only freeze the gpc1 chips
     if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
 
@@ -729,4 +731,5 @@
     image[i].nFitPhotom = N;
     image[i].Xm    = 100.0*log10(stats.chisq);
+    Ncalibrated ++;
 
     if (PLOTSTUFF) {
@@ -752,4 +755,5 @@
   free (dMlist);
 
+  fprintf (stderr, "%d images calibrated\n", Ncalibrated);
   fprintf (stderr, "%d images marked having too few measurements (Nbad: %d, Nmos: %d, Ngrid: %d, Nrel: %d, Nsys: %d)\n", Nfew, Nbad, Nmos, Ngrid, Nrel, Nsys);
 
Index: /trunk/Ohana/src/relphot/src/global_stats.c
===================================================================
--- /trunk/Ohana/src/relphot/src/global_stats.c	(revision 39343)
+++ /trunk/Ohana/src/relphot/src/global_stats.c	(revision 39344)
@@ -1,5 +1,5 @@
 # include "relphot.h"
 
-void global_stats (Catalog *catalog, int Ncatalog, FlatCorrectionTable *flatcorr) {
+void global_stats (Catalog *catalog, int Ncatalog, FlatCorrectionTable *flatcorr, int nloop) {
 
   StatType stN, stX, stS, imN, imX, imM, imD, msM, msX, msN, msD;
@@ -23,5 +23,5 @@
 
   int Ns;
-  for (Ns = 0; Ns < Nphotcodes; Ns++) {
+  for (Ns = 0; (nloop % 3 == 3) && (Ns < Nphotcodes); Ns++) {
 
     int thisCode = photcodes[Ns][0].code;
Index: /trunk/Ohana/src/relphot/src/relphot_images.c
===================================================================
--- /trunk/Ohana/src/relphot/src/relphot_images.c	(revision 39343)
+++ /trunk/Ohana/src/relphot/src/relphot_images.c	(revision 39344)
@@ -79,5 +79,5 @@
     setExclusions (catalog, Ncatalog, TRUE);
 
-    global_stats (catalog, Ncatalog, flatcorr);
+    global_stats (catalog, Ncatalog, flatcorr, 0);
 
     if (PLOTSTUFF) {
@@ -139,9 +139,5 @@
       if ((i > 8) && (i % 8 == 5)) clean_images ();
 
-      // if ((i == 1) || (i == 5) || (i ==  9) || (i == 13)) clean_measures (catalog, Ncatalog, FALSE); 
-      // if ((i == 2) || (i == 6) || (i == 10) || (i == 14)) clean_stars (catalog, Ncatalog);
-      // if ((i == 4) || (i == 8) || (i == 12) || (i == 16)) clean_mosaics ();
-      // if ((i == 4) || (i == 8) || (i == 12) || (i == 16)) clean_images ();
-      if (i % 3 == 2) global_stats (catalog, Ncatalog, flatcorr);
+      global_stats (catalog, Ncatalog, flatcorr, i);
       MARKTIME("-- finished loop %d: %f sec\n", i, dtime);
     }
Index: /trunk/Ohana/src/relphot/src/relphot_parallel_images.c
===================================================================
--- /trunk/Ohana/src/relphot/src/relphot_parallel_images.c	(revision 39343)
+++ /trunk/Ohana/src/relphot/src/relphot_parallel_images.c	(revision 39344)
@@ -93,5 +93,5 @@
   setExclusions (catalog, Ncatalog, TRUE);
 
-  global_stats (catalog, Ncatalog, flatcorr);
+  global_stats (catalog, Ncatalog, flatcorr, 0);
 
   if (PLOTSTUFF) {
@@ -135,5 +135,5 @@
     if ((i > 8) && (i % 8 == 5)) clean_images ();
 
-    if (i % 3 == 2) global_stats (catalog, Ncatalog, flatcorr);
+    global_stats (catalog, Ncatalog, flatcorr, i);
     MARKTIME("-- finished loop %d: %f sec\n", i, dtime);
   }
