Changeset 21364 for trunk/ppImage/src/ppImageParseCamera.c
- Timestamp:
- Feb 5, 2009, 4:36:52 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageParseCamera.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageParseCamera.c
r20647 r21364 20 20 } 21 21 22 // if MASK or WEIGHTwas supplied on command line, bind files to 'input'.23 // the mask and weightwill be mosaicked with the image22 // if MASK or VARIANCE was supplied on command line, bind files to 'input'. 23 // the mask and variance will be mosaicked with the image 24 24 pmFPAfile *inputMask = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.MASK", "PPIMAGE.INPUT.MASK"); 25 25 if (!status) { … … 34 34 } 35 35 36 pmFPAfile *input Weight = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.WEIGHT", "PPIMAGE.INPUT.WEIGHT");36 pmFPAfile *inputVariance = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.VARIANCE", "PPIMAGE.INPUT.VARIANCE"); 37 37 if (!status) { 38 38 psError (PS_ERR_UNKNOWN, false, "failed to load find definition"); 39 39 return NULL; 40 40 } 41 if (input Weight && inputWeight->type != PM_FPA_FILE_WEIGHT) {42 psError(PS_ERR_IO, true, "PPIMAGE.INPUT. WEIGHT is not of type WEIGHT");41 if (inputVariance && inputVariance->type != PM_FPA_FILE_VARIANCE) { 42 psError(PS_ERR_IO, true, "PPIMAGE.INPUT.VARIANCE is not of type VARIANCE"); 43 43 return NULL; 44 44 } … … 195 195 return NULL; 196 196 } 197 pmFPAfile *out Weight = pmFPAfileDefineOutput(config, input->fpa, "PPIMAGE.OUTPUT.WEIGHT");198 if (!out Weight) {199 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.OUTPUT. WEIGHT"));200 psFree(options); 201 return NULL; 202 } 203 if (out Weight->type != PM_FPA_FILE_WEIGHT) {204 psError(PS_ERR_IO, true, "PPIMAGE.OUTPUT. WEIGHT is not of type WEIGHT");197 pmFPAfile *outVariance = pmFPAfileDefineOutput(config, input->fpa, "PPIMAGE.OUTPUT.VARIANCE"); 198 if (!outVariance) { 199 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.OUTPUT.VARIANCE")); 200 psFree(options); 201 return NULL; 202 } 203 if (outVariance->type != PM_FPA_FILE_VARIANCE) { 204 psError(PS_ERR_IO, true, "PPIMAGE.OUTPUT.VARIANCE is not of type VARIANCE"); 205 205 psFree(options); 206 206 return NULL; … … 230 230 return NULL; 231 231 } 232 pmFPAfile *chip Weight = pmFPAfileDefineOutput(config, chipImage->fpa, "PPIMAGE.CHIP.WEIGHT");233 if (!chip Weight) {234 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHIP. WEIGHT"));235 psFree(options); 236 return NULL; 237 } 238 if (chip Weight->type != PM_FPA_FILE_WEIGHT) {239 psError(PS_ERR_IO, true, "PPIMAGE.CHIP. WEIGHT is not of type WEIGHT");232 pmFPAfile *chipVariance = pmFPAfileDefineOutput(config, chipImage->fpa, "PPIMAGE.CHIP.VARIANCE"); 233 if (!chipVariance) { 234 psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHIP.VARIANCE")); 235 psFree(options); 236 return NULL; 237 } 238 if (chipVariance->type != PM_FPA_FILE_VARIANCE) { 239 psError(PS_ERR_IO, true, "PPIMAGE.CHIP.VARIANCE is not of type VARIANCE"); 240 240 psFree(options); 241 241 return NULL; … … 315 315 outImage->save = options->BaseFITS; 316 316 outMask->save = options->BaseMaskFITS; 317 out Weight->save = options->BaseWeightFITS;317 outVariance->save = options->BaseVarianceFITS; 318 318 319 319 chipImage->save = options->ChipFITS; 320 320 chipMask->save = options->ChipMaskFITS; 321 chip Weight->save = options->ChipWeightFITS;321 chipVariance->save = options->ChipVarianceFITS; 322 322 323 323 byFPA1->save = options->FPA1FITS; … … 329 329 outImage->fileLevel = PS_MIN (outImage->fileLevel, outImage->dataLevel); 330 330 331 // outMask and out Weightmust be freed at the same level as outImage (all freed by pmFPAFreeData)331 // outMask and outVariance must be freed at the same level as outImage (all freed by pmFPAFreeData) 332 332 outMask->freeLevel = outImage->freeLevel; 333 out Weight->freeLevel = outImage->freeLevel;333 outVariance->freeLevel = outImage->freeLevel; 334 334 outMask->dataLevel = outImage->dataLevel; 335 out Weight->dataLevel = outImage->dataLevel;335 outVariance->dataLevel = outImage->dataLevel; 336 336 337 337 // Ditto for the chip-mosaicked version 338 338 chipMask->freeLevel = chipImage->freeLevel; 339 chip Weight->freeLevel = chipImage->freeLevel;339 chipVariance->freeLevel = chipImage->freeLevel; 340 340 chipMask->dataLevel = chipImage->dataLevel; 341 chip Weight->dataLevel = chipImage->dataLevel;341 chipVariance->dataLevel = chipImage->dataLevel; 342 342 343 343 // the input data is the same as the outImage data : force the free levels to match … … 434 434 } 435 435 436 // Turn off mask and weightoutput if we're not doing anything interesting436 // Turn off mask and variance output if we're not doing anything interesting 437 437 if (!options->doMaskBuild && outMask->save) { 438 438 psWarning("output mask image (BASE.MASK.FITS) requested, but not generated: skipping.\n"); 439 439 outMask->save = false; 440 440 } 441 if (!options->do WeightBuild && outWeight->save) {442 psWarning("output weight image (BASE.WEIGHT.FITS) requested, but not generated: skipping.\n");443 out Weight->save = false;441 if (!options->doVarianceBuild && outVariance->save) { 442 psWarning("output variance image (BASE.VARIANCE.FITS) requested, but not generated: skipping.\n"); 443 outVariance->save = false; 444 444 } 445 445 if (!options->doMaskBuild && chipMask->save) { … … 447 447 chipMask->save = false; 448 448 } 449 if (!options->do WeightBuild && chipWeight->save) {450 psWarning("output weight image (CHIP.WEIGHT.FITS) requested, but not generated: skipping.\n");451 chip Weight->save = false;449 if (!options->doVarianceBuild && chipVariance->save) { 450 psWarning("output variance image (CHIP.VARIANCE.FITS) requested, but not generated: skipping.\n"); 451 chipVariance->save = false; 452 452 } 453 453
Note:
See TracChangeset
for help on using the changeset viewer.
