Index: trunk/magic/remove/src/streaksremove.c
===================================================================
--- trunk/magic/remove/src/streaksremove.c	(revision 26983)
+++ trunk/magic/remove/src/streaksremove.c	(revision 27222)
@@ -12,5 +12,5 @@
 static pmConfig *parseArguments(int argc, char **argv);
 static bool readAndCopyToOutput(streakFiles *sf, bool exciseAll);
-static void exciseNonDiffedPixels(streakFiles *sfiles, psImageMaskType newMaskValue);
+static long exciseNonDiffedPixels(streakFiles *sfiles, psImageMaskType newMaskValue);
 static bool diffedPixel(streakFiles *sfiles, int x, int y);
 static void excisePixel(streakFiles *sfiles, unsigned int x, unsigned int y, bool streak, psImageMaskType newMaskValue);
@@ -104,4 +104,5 @@
     long totalPixels = 0;
     long totalStreakPixels = 0;
+    long unDiffedPixels = 0;
 
     // accumulators for the various timers
@@ -153,5 +154,5 @@
                     // set non-diffed pixels and variance to NAN, mask to maskStreak (since the pixel
                     // is excised as part of the destreaking process)
-                    exciseNonDiffedPixels(sfiles, sfiles->maskStreak);
+                    unDiffedPixels += exciseNonDiffedPixels(sfiles, sfiles->maskStreak);
 
                     enw_t +=  psTimerClear("EXCISE_NON_DIFFED");
@@ -217,4 +218,8 @@
     psLogMsg("streaksremove", PS_LOG_INFO, "pixels: %ld streak pixels: %ld %4.2f%%\n", totalPixels, totalStreakPixels, streakFraction * 100);
     psMetadataAddF32(sfiles->stats, PS_LIST_TAIL, "STREAK_FRACTION", PS_META_REPLACE, "", streakFraction);
+
+    psF64 unDiffedFraction = (double) unDiffedPixels / totalPixels;
+    psLogMsg("streaksremove", PS_LOG_INFO, "pixels: %ld undiffed pixels: %ld %4.2f%%\n", totalPixels, unDiffedPixels, unDiffedFraction * 100);
+    psMetadataAddF32(sfiles->stats, PS_LIST_TAIL, "UNDIFFED_FRACTION", PS_META_REPLACE, "", unDiffedFraction);
 
     // check the weight and mask files for extra extensions that might be in files
@@ -795,5 +800,5 @@
 }
 
-static void
+static long
 exciseNonDiffedPixels(streakFiles *sfiles, psImageMaskType newMaskValue)
 {
@@ -804,4 +809,6 @@
     int numCols = sfiles->inImage->numCols; // for raw images this was calculated from the width of datasec
     int numRows = sfiles->inImage->numRows; // for raw images this was calculated from the height of datasec
+
+    long excisedPixels = 0;
 
 //    printf("%2d x0: %4d y0: %4d xpar: %d ypar: %d\n", sfiles->extnum, cell_x0, cell_y0, xParity, yParity);
@@ -825,4 +832,5 @@
                 if (! *pixels ) {
                     excisePixel(sfiles, xCell, yCell, false, newMaskValue);
+                    excisedPixels++;
                 }
             }
@@ -834,8 +842,10 @@
                 if (!*pixels) {
                     excisePixel(sfiles, xCell, yCell, false, newMaskValue);
+                    excisedPixels++;
                 }
             }
         }
     }
+    return excisedPixels;
 }
 
