Index: trunk/psastro/src/psastro.h
===================================================================
--- trunk/psastro/src/psastro.h	(revision 41499)
+++ trunk/psastro/src/psastro.h	(revision 41500)
@@ -109,5 +109,5 @@
 bool              psastroMosaicCommonScale (pmFPA *fpa, psMetadata *recipe);
 bool              psastroMosaicAstrom (pmConfig *config, psMetadata *stats);
-bool              psastroMosaicChipAstrom (pmFPA *fpa, psMetadata *recipe, int iteration);
+bool              psastroMosaicChipAstrom (pmFPA *fpa, psMetadata *stats, psMetadata *recipe, int iteration);
 bool              psastroMosaicSetMatch (pmFPA *fpa, psMetadata *recipe, int iteration);
 bool              psastroMosaicSetAstrom (pmFPA *fpa);
Index: trunk/psastro/src/psastroMosaicChipAstrom.c
===================================================================
--- trunk/psastro/src/psastroMosaicChipAstrom.c	(revision 41499)
+++ trunk/psastro/src/psastroMosaicChipAstrom.c	(revision 41500)
@@ -29,8 +29,9 @@
 
     int nChipGood = 0;
-    int nChipFail = 0;
+    int nChipTotal = 0;
 
     // this loop selects the matched stars for all chips
     while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) {
+	nChipTotal ++;
         psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
         if (!chip->process || !chip->file_exists) { continue; }
@@ -60,5 +61,4 @@
 		    psErrorStackPrint(stderr, "failure for one chip\n");
 		    psErrorClear();
-		    nChipFail ++;
 		    continue;
                 }
@@ -70,5 +70,4 @@
 		    psErrorStackPrint(stderr, "failure for one chip\n");
 		    psErrorClear();
-		    nChipFail ++;
 		    continue;
                 }
@@ -80,7 +79,8 @@
 
     // if basically the entire exposure is bad, return false (calling function sets bad quality)
-    float fGood = nChipGood / ((float) (nChipGood + nChipFail));
+    float fGood = nChipGood / ((float) nChipTotal);
+    psLogMsg ("psastro", PS_LOG_INFO, "%d good chips of %d = %.2f\n", nChipGood, nChipTotal, fGood);
     if (fGood < minGoodChipFraction) {
-      psWarning ("Too few good chips (%d of %d = %.2f), setting bad quality for this exposure\n", nChipGood, (nChipGood + nChipFail), fGood);
+      psWarning ("Too few good chips (%d of %d = %.2f), setting bad quality for this exposure\n", nChipGood, nChipTotal, fGood);
       // NOTE: set bad data quality here
       if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) {
