- Timestamp:
- Oct 5, 2012, 6:03:49 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ppStack/src/ppStackCamera.c
r30620 r34516 156 156 psString psf = psMetadataLookupStr(&mdok, input, "PSF"); // Name of PSF 157 157 psString sources = psMetadataLookupStr(&mdok, input, "SOURCES"); // Name of sources 158 158 psString bkgmodel = psMetadataLookupStr(&mdok, input, "BKGMODEL"); // Name of warped background model 159 159 160 pmFPAfile *imageFile = defineFile(config, NULL, "PPSTACK.INPUT", 160 161 image, PM_FPA_FILE_IMAGE); // File for image … … 215 216 } 216 217 218 // Grab bkgmodel information here 219 if (!bkgmodel || strlen(bkgmodel) == 0) { 220 // We have no background models. 221 } 222 else { 223 pmFPAfile *inputBKG = defineFile(config,NULL,"PPSTACK.INPUT.BKGMODEL",bkgmodel, 224 PM_FPA_FILE_IMAGE); 225 fprintf(stderr,"ppSC: %s\n",bkgmodel); 226 if (!inputBKG) { 227 psError(psErrorCodeLast(), false, 228 "Unable to define file from bkgmodel %d (%s)",i,bkgmodel); 229 return(false); 230 } 231 }// End bkgmodel 232 233 234 235 217 236 i++; 218 237 } … … 460 479 jpeg2->save = true; 461 480 481 // Output background 482 pmFPAfile *outBkg = pmFPAfileDefineOutput(config,NULL,"PPSTACK.OUTPUT.BKGMODEL"); 483 if (!outBkg) { 484 psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSTACK.OUTPUT.BKGMODEL")); 485 return(false); 486 } 487 if (outBkg->type != PM_FPA_FILE_IMAGE) { 488 psError(PPSTACK_ERR_CONFIG, true, "PPSTACK.OUTPUT.BKGMODEL is not of type IMAGE"); 489 return(false); 490 } 491 outBkg->save = true; 492 pmFPAfile *outBkgRest = pmFPAfileDefineOutput(config,NULL,"PPSTACK.OUTPUT.BKGREST"); 493 if (!outBkgRest) { 494 psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSTACK.OUTPUT.BKGREST")); 495 return(false); 496 } 497 if (outBkgRest->type != PM_FPA_FILE_IMAGE) { 498 psError(PPSTACK_ERR_CONFIG, true, "PPSTACK.OUTPUT.BKGREST is not of type IMAGE"); 499 return(false); 500 } 501 462 502 // For photometry, we operate on the chip-mosaicked image 463 503 // we create a copy of the mosaicked image for psphot so we can write out a clean image … … 496 536 } 497 537 538 // Define output file here. 539 498 540 return true; 499 541 }
Note:
See TracChangeset
for help on using the changeset viewer.
