Changeset 16831
- Timestamp:
- Mar 5, 2008, 11:20:38 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackCamera.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackCamera.c
r16829 r16831 72 72 { 73 73 bool haveWeights = false; // Do we have weight maps? 74 bool havePSFs = false; // Do we have PSFs?75 74 76 75 psMetadata *inputs = psMetadataLookupMetadata(NULL, config->arguments, "INPUTS"); // The inputs info … … 168 167 } 169 168 170 // Optionally add the psf file 171 if (psf && strlen(psf) > 0) { 172 havePSFs = true; 169 // Add the psf file 170 if (!psf || strlen(psf) == 0) { 171 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find PSF %d", i); 172 return false; 173 } else { 173 174 psArray *psfFiles = psArrayAlloc(1); // Array of filenames for this FPA 174 175 psfFiles->data[0] = psMemIncrRefCounter(psf); … … 315 316 316 317 317 // Output PSF318 if (havePSFs) {319 pmFPAfile *outPSF = pmFPAfileDefineOutput(config, output->fpa, "PSPHOT.PSF.SAVE");320 if (!outPSF) {321 psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.PSF.SAVE"));322 return false;323 }324 if (outPSF->type != PM_FPA_FILE_PSF) {325 psError(PS_ERR_IO, true, "PSPHOT.PSF.SAVE is not of type PSF");326 return false;327 }328 outPSF->save = true;329 }330 331 // Sources for use as stamps332 bool status = false; // Found the file?333 pmFPAfile *sources = pmFPAfileDefineFromArgs(&status, config, "PPSTACK.SOURCES", "PPSTACK.SOURCES");334 if (!status) {335 psError(PS_ERR_IO, false, "Failed to load file definition PPSTACK.SOURCES");336 return false;337 }338 if (sources && sources->type != PM_FPA_FILE_CMF) {339 psError(PS_ERR_IO, true, "PPSTACK.SOURCES is not of type CMF");340 return false;341 }342 343 318 // For photometry, we operate on the chip-mosaicked image 344 319 // we create a copy of the mosaicked image for psphot so we can write out a clean image … … 360 335 return false; 361 336 } 337 } else { 338 // Output PSF --- only required if photometry is not being performed 339 pmFPAfile *outPSF = pmFPAfileDefineOutput(config, output->fpa, "PSPHOT.PSF.SAVE"); 340 if (!outPSF) { 341 psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.PSF.SAVE")); 342 return false; 343 } 344 if (outPSF->type != PM_FPA_FILE_PSF) { 345 psError(PS_ERR_IO, true, "PSPHOT.PSF.SAVE is not of type PSF"); 346 return false; 347 } 348 outPSF->save = true; 349 } 350 351 // Sources for use as stamps 352 bool status = false; // Found the file? 353 pmFPAfile *sources = pmFPAfileDefineFromArgs(&status, config, "PPSTACK.SOURCES", "PPSTACK.SOURCES"); 354 if (!status) { 355 psError(PS_ERR_IO, false, "Failed to load file definition PPSTACK.SOURCES"); 356 return false; 357 } 358 if (sources && sources->type != PM_FPA_FILE_CMF) { 359 psError(PS_ERR_IO, true, "PPSTACK.SOURCES is not of type CMF"); 360 return false; 362 361 } 363 362
Note:
See TracChangeset
for help on using the changeset viewer.
