Changeset 13814
- Timestamp:
- Jun 13, 2007, 4:46:25 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeScaleZero.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeScaleZero.c
r10744 r13814 146 146 } 147 147 148 pmFPAview *view = pmFPAviewAlloc(0); 149 148 150 bool status = true; // Status of getting the scale and zero --- did everything go right? 149 151 for (int i = 0; i < filenames->n; i++) { … … 176 178 // Normalising by the exposure time 177 179 if (options->darktime) { 178 darktime->data.F32[i][cellNum] = psMetadataLookupF32(&mdok, cell->concepts, 179 "CELL.DARKTIME"); 180 if (!mdok || isnan(darktime->data.F32[i][cellNum])) { 181 psLogMsg(__func__, PS_LOG_WARN, "CELL.DARKTIME for file %s chip %d cell %d is not " 182 "set.\n", name, j, k); 183 darktime->data.F32[i][cellNum] = NAN; 180 darktime->data.F32[i][cellNum] = psMetadataLookupF32(NULL, cell->concepts, 181 "CELL.DARKTIME"); 182 if (isnan(darktime->data.F32[i][cellNum])) { 183 psWarning("CELL.DARKTIME for file %s chip %d cell %d is not set.\n", name, j, k); 184 184 status = false; 185 } else { 186 view->chip = j; 187 view->cell = k; 188 darktime->data.F32[i][cellNum] = pmFPADarkNorm(fpa, view, 189 darktime->data.F32[i][cellNum]); 190 if (isnan(darktime->data.F32[i][cellNum])) { 191 psWarning("Cannot get dark normalisation for file %s chip %d cell %d.\n", 192 name, j, k); 193 status = false; 194 } 185 195 } 186 196 } … … 237 247 } 238 248 status = psVectorStats(bgStats, sample, sampleMask, NULL, options->combine->maskVal); 239 if (!status) {240 psTrace("ppMerge", 3, "failed to get stats for for %s, cell %d is %f\n", name, cellNum,241 background->data.F32[i][cellNum]);242 psErrorClear();243 }249 if (!status) { 250 psTrace("ppMerge", 3, "failed to get stats for for %s, cell %d is %f\n", name, cellNum, 251 background->data.F32[i][cellNum]); 252 psErrorClear(); 253 } 244 254 psFree(sample); 245 255 psFree(sampleMask); … … 256 266 } 257 267 psFree(bgStats); 268 psFree(view); 258 269 259 270 if (options->scale) {
Note:
See TracChangeset
for help on using the changeset viewer.
