Changeset 14211
- Timestamp:
- Jul 13, 2007, 5:41:45 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageParseCamera.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageParseCamera.c
r13901 r14211 143 143 144 144 // the following files are output targets 145 pmFPAfile *out put= pmFPAfileDefineOutput(config, input->fpa, "PPIMAGE.OUTPUT");146 if (!out put) {145 pmFPAfile *outImage = pmFPAfileDefineOutput(config, input->fpa, "PPIMAGE.OUTPUT"); 146 if (!outImage) { 147 147 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.OUTPUT")); 148 148 psFree(options); 149 149 return NULL; 150 150 } 151 if (out put->type != PM_FPA_FILE_IMAGE) {151 if (outImage->type != PM_FPA_FILE_IMAGE) { 152 152 psError(PS_ERR_IO, true, "PPIMAGE.OUTPUT is not of type IMAGE"); 153 153 psFree(options); … … 177 177 } 178 178 179 // XXX should these be bound explicitly to the out put->fpa rather than the input->fpa?179 // XXX should these be bound explicitly to the outImage->fpa rather than the input->fpa? 180 180 pmFPAfile *chipImage = pmFPAfileDefineChipMosaic(config, input->fpa, "PPIMAGE.CHIP"); 181 181 if (!chipImage) { … … 238 238 // we create a copy of the mosaicked image for psphot so we can write out a clean image 239 239 if (options->doPhotom) { 240 241 // this file is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by 242 // psphotDefineFiles 240 243 pmFPAfile *psphotInput = pmFPAfileDefineFromFPA (config, chipImage->fpa, 1, 1, "PSPHOT.INPUT"); 241 244 PS_ASSERT (psphotInput, false); 242 243 // this file is just used as a carrier;244 // actual output files (eg, PSPHOT.RESID) are defined below245 psphotInput->save = false;246 245 247 246 // define associated psphot input/output files … … 274 273 275 274 // save any of these files? 276 output->save = outMask->save = outWeight->save = options->BaseFITS; 277 chipImage->save = chipMask->save = chipWeight->save = options->ChipFITS; 278 byFPA1->save = options->FPA1FITS; 279 byFPA2->save = options->FPA2FITS; 280 281 // output is used as a carrier: input to chipImage -> require the data to remain at the CHIP level 282 output->freeLevel = PS_MIN (output->freeLevel, PM_FPA_LEVEL_CHIP); 283 output->dataLevel = output->freeLevel; 284 output->fileLevel = PS_MIN (output->fileLevel, output->dataLevel); 285 286 // outMask and outWeight must be freed at the same level as output (all freed by pmFPAFreeData) 287 outMask->freeLevel = output->freeLevel; 288 outWeight->freeLevel = output->freeLevel; 289 outMask->dataLevel = output->dataLevel; 290 outWeight->dataLevel = output->dataLevel; 275 outImage->save = options->BaseFITS; 276 outMask->save = options->BaseMaskFITS; 277 outWeight->save = options->BaseWeightFITS; 278 279 chipImage->save = options->ChipFITS; 280 chipMask->save = options->ChipMaskFITS; 281 chipWeight->save = options->ChipWeightFITS; 282 283 byFPA1->save = options->FPA1FITS; 284 byFPA2->save = options->FPA2FITS; 285 286 // outImage is used as a carrier: input to chipImage -> require the data to remain at the CHIP level 287 outImage->freeLevel = PS_MIN (outImage->freeLevel, PM_FPA_LEVEL_CHIP); 288 outImage->dataLevel = outImage->freeLevel; 289 outImage->fileLevel = PS_MIN (outImage->fileLevel, outImage->dataLevel); 290 291 // outMask and outWeight must be freed at the same level as outImage (all freed by pmFPAFreeData) 292 outMask->freeLevel = outImage->freeLevel; 293 outWeight->freeLevel = outImage->freeLevel; 294 outMask->dataLevel = outImage->dataLevel; 295 outWeight->dataLevel = outImage->dataLevel; 291 296 292 297 // Ditto for the chip-mosaicked version … … 296 301 chipWeight->dataLevel = chipImage->dataLevel; 297 302 298 // the input data is the same as the out putdata : force the free levels to match299 input->freeLevel = PS_MIN (out put->freeLevel, input->freeLevel);303 // the input data is the same as the outImage data : force the free levels to match 304 input->freeLevel = PS_MIN (outImage->freeLevel, input->freeLevel); 300 305 301 306 // define the binned target files (which may just be carriers for some camera configurations) … … 376 381 // It's a fringe file, so change the file type 377 382 input->type = PM_FPA_FILE_FRINGE; 378 out put->type = PM_FPA_FILE_FRINGE;383 outImage->type = PM_FPA_FILE_FRINGE; 379 384 } 380 385 381 386 // Turn off mask and weight output if we're not doing anything interesting 382 if (!options->doMask && !options->doShutter && !options->doFlat && !options->doPhotom) { 387 bool noMask = (!options->doMask && !options->doShutter && !options->doFlat && !options->doPhotom); 388 if (noMask && outMask->save) { 389 psWarning("output mask image (BASE.MASK.FITS) requested, but not generated: skipping.\n"); 383 390 outMask->save = false; 391 } 392 if (noMask && outWeight->save) { 393 psWarning("output weight image (BASE.WEIGHT.FITS) requested, but not generated: skipping.\n"); 384 394 outWeight->save = false; 395 } 396 if (noMask && chipMask->save) { 397 psWarning("output mask image (CHIP.MASK.FITS) requested, but not generated: skipping.\n"); 385 398 chipMask->save = false; 399 } 400 if (noMask && chipWeight->save) { 401 psWarning("output weight image (CHIP.WEIGHT.FITS) requested, but not generated: skipping.\n"); 386 402 chipWeight->save = false; 387 403 }
Note:
See TracChangeset
for help on using the changeset viewer.
