Index: /branches/eam_branches/20091201/ppImage/src/ppImageDetrendPattern.c
===================================================================
--- /branches/eam_branches/20091201/ppImage/src/ppImageDetrendPattern.c	(revision 26816)
+++ /branches/eam_branches/20091201/ppImage/src/ppImageDetrendPattern.c	(revision 26817)
@@ -33,5 +33,5 @@
             }
             if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
-	      ESCAPE(false, "load failure for Cell");
+              ESCAPE(false, "load failure for Cell");
             }
 
@@ -45,12 +45,14 @@
             }
 
-	    bool doPattern = false; 
-	    if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.ROW.SUBSET")) {
-		ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
-	    }
-	    if (!doPattern) continue;
+            bool doPattern = false;
+            if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.ROW.SUBSET")) {
+                ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
+            }
+            if (!doPattern) continue;
 
-            psLogMsg("ppImage", PS_LOG_INFO, "Performing row pattern correction for %d,%d\n",
-                     view->chip, view->cell);
+            const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
+            const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
+            psLogMsg("ppImage", PS_LOG_INFO, "Performing row pattern correction for %s, %s\n",
+                     chipName, cellName);
 
             // process each of the readouts
@@ -58,5 +60,5 @@
             while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
                 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
-		    ESCAPE(false, "load failure for Readout");
+                    ESCAPE(false, "load failure for Readout");
                 }
                 if (!readout->data_exists) {
@@ -84,11 +86,15 @@
             view->cell = i;
 
-	    bool doPattern = false; 
-	    if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.CELL.SUBSET")) {
-		ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
-	    }
-	    if (doPattern) {
-		tweak->data.U8[i] = 0xFF;
-	    }
+            bool doPattern = false;
+            if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.CELL.SUBSET")) {
+                ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
+            }
+            if (doPattern) {
+                const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
+                const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
+                psLogMsg("ppImage", PS_LOG_INFO, "Performing cell pattern correction for %s, %s\n",
+                         chipName, cellName);
+                tweak->data.U8[i] = 0xFF;
+            }
         }
 
@@ -113,38 +119,38 @@
     psMetadataItem *doPattern = pmConfigRecipeValueByView(config, recipeName, recipeValue, chip->parent, view);
     if (!doPattern) {
-	psError(PS_ERR_UNKNOWN, false, "Unable to determine whether row pattern matching should be applied.");
-	return false;
+        psError(PS_ERR_UNKNOWN, false, "Unable to determine whether row pattern matching should be applied.");
+        return false;
     }
     if (doPattern->type == PS_DATA_BOOL) {
-	*doit = doPattern->data.B;
-	return true;
+        *doit = doPattern->data.B;
+        return true;
     }
     if (doPattern->type == PS_DATA_STRING) {
-	// expect a string of the form "000110001001" with at least view->cell entries
-	char *string = doPattern->data.str;
-	if (strlen(string) < view->cell) {
-	    psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string (too few elements %d)", (int) strlen(string));
-	    return false;
-	}
-	switch (string[view->cell]) {
-	  case '0':
-	  case 'f':
-	  case 'F':
-	  case 'n':
-	  case 'N':
-	    *doit = false;
-	    return true;
-	  case '1':
-	  case 't':
-	  case 'T':
-	  case 'y':
-	  case 'Y':
-	    *doit = true;
-	    return true;
-	  default:
-	    psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string %s (unknown value %c))", string, string[view->cell]);
-	    return false;
-	}
-	psAbort("imposible to reach here");
+        // expect a string of the form "000110001001" with at least view->cell entries
+        char *string = doPattern->data.str;
+        if (strlen(string) < view->cell) {
+            psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string (too few elements %d)", (int) strlen(string));
+            return false;
+        }
+        switch (string[view->cell]) {
+          case '0':
+          case 'f':
+          case 'F':
+          case 'n':
+          case 'N':
+            *doit = false;
+            return true;
+          case '1':
+          case 't':
+          case 'T':
+          case 'y':
+          case 'Y':
+            *doit = true;
+            return true;
+          default:
+            psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string %s (unknown value %c))", string, string[view->cell]);
+            return false;
+        }
+        psAbort("imposible to reach here");
     }
     psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET : invalid data type");
