Changeset 21256 for trunk/pswarp/src/pswarpLoop.c
- Timestamp:
- Feb 1, 2009, 11:53:14 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpLoop.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoop.c
r21183 r21256 322 322 fileActivation(config, independentFiles, false); 323 323 324 // We need a new PSF model for the warped frame 325 // It would be good to generate this analytically, but that's going to be tricky. 326 // We have a list of sources, so we could use those to redetermine the PSF model. 327 // Until Gene makes the necessary adaptations to psphot, we will simply redetermine the PSF model from 328 // scratch. 324 // We need a new PSF model for the warped frame. It would be good to generate this analytically, but that's going to be tricky. 325 // We have a list of sources, so we use those to redetermine the PSF model. 326 329 327 if (psMetadataLookupBool(&mdok, config->arguments, "PSF")) { 330 328 fileActivation(config, photFiles, true); 331 329 ioChecksBefore(config); 332 330 333 // Tweak recipe 334 psMetadata *psphotRecipe = psMetadataLookupPtr(NULL, config->recipes, 335 PSPHOT_RECIPE); // Recipe for psphot 336 if (!psphotRecipe) { 337 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find %s recipe.", PSPHOT_RECIPE); 338 return false; 339 } 340 341 psMetadataAddStr(psphotRecipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE, 342 "Break point for psphot operations", "PSFMODEL"); 343 psMetadataAddBool(psphotRecipe, PS_LIST_TAIL, PSPHOT_RECIPE_PSF_FAKE_ALLOW, PS_META_REPLACE, 344 "Don't allow psphot to fit a fake PSF!", false); 345 346 #if !PSPHOT_FIND_PSF 347 // Get rid of the transformed sources so that we can measure the PSF 348 psMetadataRemoveKey(output->analysis, "PSPHOT.SOURCES"); 349 #endif 350 331 // supply the readout and fpa of interest to psphot 351 332 pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT"); 352 333 pmFPACopy(photFile->fpa, outFPA); … … 355 336 view->chip = view->cell = view->readout = 0; 356 337 357 #if PSPHOT_FIND_PSF358 338 // Need to adjust the weight --- the main operation in psphotReadoutFindPSF is not determining the 359 339 // signficance of sources, but looking at the significance of individual pixels. … … 363 343 psBinaryOp(photRO->weight, photRO->weight, "*", psScalarAlloc(vf, PS_TYPE_F32)); 364 344 365 if (!psphotReadoutFindPSF(config, view)) { 345 // grab the sources of interest from the storage location (pmFPAfile PSPHOT.INPUT.CMF) 346 psArray *sources = psphotLoadPSFSources (config, view); 347 if (!sources) { 348 psError(PS_ERR_UNKNOWN, false, "No sources supplied to measure PSF"); 349 return false; 350 } 351 352 // measure the PSF using these sources 353 if (!psphotReadoutFindPSF(config, view, sources)) { 366 354 psError(PS_ERR_UNKNOWN, false, "Unable to determine PSF for warped image."); 367 355 return false; 368 356 } 369 #else 370 if (!psphotReadout(config, view)) { 371 psError(PS_ERR_UNKNOWN, false, "Unable to determine PSF for warped image."); 372 return false; 373 } 374 #endif 375 357 358 // XXX EAM : put this in a visualization function 376 359 #if (TESTING) 377 360 {
Note:
See TracChangeset
for help on using the changeset viewer.
