Index: trunk/ppNoiseMap/src/ppNoiseMapLoop.c
===================================================================
--- trunk/ppNoiseMap/src/ppNoiseMapLoop.c	(revision 24458)
+++ trunk/ppNoiseMap/src/ppNoiseMapLoop.c	(revision 24470)
@@ -38,4 +38,5 @@
         }
 
+	// load all cells for this chip before generating output file fpa:
         pmCell *cell;                   // Cell from chip
         while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) {
@@ -70,13 +71,16 @@
                     continue;
                 }
+	    }
+	}
 
-                // perform the noise analysis
-                // if (!ppNoiseMapReadout(config, view)) {
-                //     ESCAPE("Unable to detrend readout");
-                // }
-
+	if (!ppNoiseMapReadout(config, view)) {
+	    ESCAPE("Unable to measure noise map for readout");
+	}
+	
+	// close the cells
+        while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) {
+            if (!cell->process || !cell->file_exists) {
+                continue;
             }
-
-	    // Close cell
             if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
                 ESCAPE("save failure for Cell");
@@ -90,8 +94,4 @@
     }
 
-    // if (psTraceGetLevel("ppNoiseMap") >= 3) {
-    //     ppNoiseMapFileCheck(config);
-    // }
-
     // Output and Close FPA
     if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
