Changeset 26817
- Timestamp:
- Feb 8, 2010, 5:30:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppImage/src/ppImageDetrendPattern.c
r26780 r26817 33 33 } 34 34 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 35 ESCAPE(false, "load failure for Cell");35 ESCAPE(false, "load failure for Cell"); 36 36 } 37 37 … … 45 45 } 46 46 47 bool doPattern = false; 48 if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.ROW.SUBSET")) {49 ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");50 }51 if (!doPattern) continue;47 bool doPattern = false; 48 if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.ROW.SUBSET")) { 49 ESCAPE(false, "Unable to determine whether row pattern matching should be applied."); 50 } 51 if (!doPattern) continue; 52 52 53 psLogMsg("ppImage", PS_LOG_INFO, "Performing row pattern correction for %d,%d\n", 54 view->chip, view->cell); 53 const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME"); 54 const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME"); 55 psLogMsg("ppImage", PS_LOG_INFO, "Performing row pattern correction for %s, %s\n", 56 chipName, cellName); 55 57 56 58 // process each of the readouts … … 58 60 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 59 61 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 60 ESCAPE(false, "load failure for Readout");62 ESCAPE(false, "load failure for Readout"); 61 63 } 62 64 if (!readout->data_exists) { … … 84 86 view->cell = i; 85 87 86 bool doPattern = false; 87 if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.CELL.SUBSET")) { 88 ESCAPE(false, "Unable to determine whether row pattern matching should be applied."); 89 } 90 if (doPattern) { 91 tweak->data.U8[i] = 0xFF; 92 } 88 bool doPattern = false; 89 if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.CELL.SUBSET")) { 90 ESCAPE(false, "Unable to determine whether row pattern matching should be applied."); 91 } 92 if (doPattern) { 93 const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME"); 94 const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME"); 95 psLogMsg("ppImage", PS_LOG_INFO, "Performing cell pattern correction for %s, %s\n", 96 chipName, cellName); 97 tweak->data.U8[i] = 0xFF; 98 } 93 99 } 94 100 … … 113 119 psMetadataItem *doPattern = pmConfigRecipeValueByView(config, recipeName, recipeValue, chip->parent, view); 114 120 if (!doPattern) { 115 psError(PS_ERR_UNKNOWN, false, "Unable to determine whether row pattern matching should be applied.");116 return false;121 psError(PS_ERR_UNKNOWN, false, "Unable to determine whether row pattern matching should be applied."); 122 return false; 117 123 } 118 124 if (doPattern->type == PS_DATA_BOOL) { 119 *doit = doPattern->data.B;120 return true;125 *doit = doPattern->data.B; 126 return true; 121 127 } 122 128 if (doPattern->type == PS_DATA_STRING) { 123 // expect a string of the form "000110001001" with at least view->cell entries124 char *string = doPattern->data.str;125 if (strlen(string) < view->cell) {126 psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string (too few elements %d)", (int) strlen(string));127 return false;128 }129 switch (string[view->cell]) {130 case '0':131 case 'f':132 case 'F':133 case 'n':134 case 'N':135 *doit = false;136 return true;137 case '1':138 case 't':139 case 'T':140 case 'y':141 case 'Y':142 *doit = true;143 return true;144 default:145 psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string %s (unknown value %c))", string, string[view->cell]);146 return false;147 }148 psAbort("imposible to reach here");129 // expect a string of the form "000110001001" with at least view->cell entries 130 char *string = doPattern->data.str; 131 if (strlen(string) < view->cell) { 132 psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string (too few elements %d)", (int) strlen(string)); 133 return false; 134 } 135 switch (string[view->cell]) { 136 case '0': 137 case 'f': 138 case 'F': 139 case 'n': 140 case 'N': 141 *doit = false; 142 return true; 143 case '1': 144 case 't': 145 case 'T': 146 case 'y': 147 case 'Y': 148 *doit = true; 149 return true; 150 default: 151 psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string %s (unknown value %c))", string, string[view->cell]); 152 return false; 153 } 154 psAbort("imposible to reach here"); 149 155 } 150 156 psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET : invalid data type");
Note:
See TracChangeset
for help on using the changeset viewer.
