Changeset 26629 for trunk/ppMerge/src/ppMergeScaleZero.c
- Timestamp:
- Jan 19, 2010, 2:30:36 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeScaleZero.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeScaleZero.c
r24909 r26629 67 67 pmChip *chip; ///< Chip of interest 68 68 while ((chip = pmFPAviewNextChip(view, fpa, 1))) { 69 if (!chip->process || !chip->file_exists) {70 continue;71 }69 if (!chip->process || !chip->file_exists) { 70 continue; 71 } 72 72 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 73 73 goto ERROR; … … 76 76 pmCell *cell; ///< Cell of interest 77 77 while ((cell = pmFPAviewNextCell(view, fpa, 1))) { 78 if (!cell->process || !cell->file_exists) {79 continue;80 }78 if (!cell->process || !cell->file_exists) { 79 continue; 80 } 81 81 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 82 82 goto ERROR; … … 87 87 } 88 88 89 // skip cells with video data89 // skip cells with video data 90 90 if (cell->readouts->n > 1) { 91 // psError(PS_ERR_BAD_PARAMETER_VALUE, true, "File %d chip %d cell %d contains more than one readout (%ld)", i, view->chip, view->cell, cell->readouts->n); 92 // goto ERROR; 93 psWarning("File %d chip %d cell %d contains more than one readout (%ld), skipping", i, view->chip, view->cell, cell->readouts->n); 94 continue; 91 // psError(PS_ERR_BAD_PARAMETER_VALUE, true, "File %d chip %d cell %d contains more than one readout (%ld)", i, view->chip, view->cell, cell->readouts->n); 92 // goto ERROR; 93 psWarning("File %d chip %d cell %d contains more than one readout (%ld), skipping", 94 i, view->chip, view->cell, cell->readouts->n); 95 continue; 95 96 } 96 97 pmReadout *readout = cell->readouts->data[0]; ///< Readout of interest … … 104 105 float gain = psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); ///< Cell gain 105 106 if (!isfinite(gain)) { 106 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 107 // "CELL.GAIN for file %d chip %d cell %d is not set.", 108 // i, view->chip, view->cell); 109 // goto ERROR; 110 psWarning ("CELL.GAIN for file %d chip %d cell %d is NaN", i, view->chip, view->cell); 107 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, 108 PPMERGE_RECIPE); // Recipe 109 psAssert(recipe, "Should be there!"); 110 bool override = psMetadataLookupBool(NULL, recipe, 111 "GAIN.OVERRIDE"); // Override the bad gain? 112 if (override) { 113 psWarning("CELL.GAIN is not set for readout (%d,%d,%d) on file %d " 114 "--- setting to unity.", 115 view->chip, view->cell, view->readout, i); 116 psMetadataItem *item = psMetadataLookup(cell->concepts, 117 "CELL.GAIN"); // Item with gain 118 psAssert(item, "Should be there!"); 119 item->data.F32 = 1.0; 120 } else { 121 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 122 // "CELL.GAIN for file %d chip %d cell %d is not set.", 123 // i, view->chip, view->cell); 124 // goto ERROR; 125 psWarning("CELL.GAIN for file %d chip %d cell %d is NaN", 126 i, view->chip, view->cell); 127 } 111 128 } 112 129 gains->data.F32[cellNum] = gain; … … 118 135 // i, view->chip, view->cell); 119 136 // goto ERROR; 120 psWarning ("Unable to get statistics for file %d chip %d cell %d", i, view->chip, view->cell); 137 psWarning ("Unable to get statistics for file %d chip %d cell %d", 138 i, view->chip, view->cell); 121 139 background->data.F32[i][cellNum] = NAN; 122 140 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
