Changeset 9463 for trunk/ppMerge/src/ppMergeScaleZero.c
- Timestamp:
- Oct 10, 2006, 10:59:09 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppMerge/src/ppMergeScaleZero.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeScaleZero.c
r9325 r9463 47 47 assert(config); 48 48 49 if (!options->scale && !options->zero && !options-> exptime) {49 if (!options->scale && !options->zero && !options->darktime) { 50 50 return true; // We did everything we were asked for 51 51 } … … 161 161 psStats *bgStats = psStatsAlloc(options->mean); // Statistic to measure the background 162 162 psVector *gains = NULL; // The gains for each cell 163 psImage * exptime = NULL; // The exposuretime for each integration of each cell163 psImage *darktime = NULL; // The dark time for each integration of each cell 164 164 if (options->scale) { 165 165 gains = psVectorAlloc(data->numCells, PS_TYPE_F32); 166 166 gains->n = data->numCells; 167 167 } 168 if (options-> exptime) {169 exptime = psImageAlloc(data->numCells, filenames->n, PS_TYPE_F32);168 if (options->darktime) { 169 darktime = psImageAlloc(data->numCells, filenames->n, PS_TYPE_F32); 170 170 } 171 171 … … 199 199 200 200 // Normalising by the exposure time 201 if (options-> exptime) {202 exptime->data.F32[i][cellNum] = psMetadataLookupF32(&mdok, cell->concepts,203 "CELL. EXPOSURE");204 if (!mdok || isnan( exptime->data.F32[i][cellNum])) {205 psLogMsg(__func__, PS_LOG_WARN, "CELL. EXPOSURE for file %s chip %d cell %d is not "201 if (options->darktime) { 202 darktime->data.F32[i][cellNum] = psMetadataLookupF32(&mdok, cell->concepts, 203 "CELL.DARKTIME"); 204 if (!mdok || isnan(darktime->data.F32[i][cellNum])) { 205 psLogMsg(__func__, PS_LOG_WARN, "CELL.DARKTIME for file %s chip %d cell %d is not " 206 206 "set.\n", name, j, k); 207 exptime->data.F32[i][cellNum] = NAN;207 darktime->data.F32[i][cellNum] = NAN; 208 208 status = false; 209 209 } … … 302 302 } 303 303 304 if (options-> exptime) {304 if (options->darktime) { 305 305 if (!options->scale) { 306 306 // Copy over the exposure times 307 *scales = psImageCopy(*scales, exptime, PS_TYPE_F32);307 *scales = psImageCopy(*scales, darktime, PS_TYPE_F32); 308 308 } else { 309 *scales = (psImage*)psBinaryOp(*scales, *scales, "*", exptime);309 *scales = (psImage*)psBinaryOp(*scales, *scales, "*", darktime); 310 310 } 311 311 }
Note:
See TracChangeset
for help on using the changeset viewer.
