Changeset 20115 for trunk/pswarp/src/pswarpLoop.c
- Timestamp:
- Oct 13, 2008, 2:48:45 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpLoop.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoop.c
r19874 r20115 7 7 // Lists must end with a NULL 8 8 static char *detectorFiles[] = { "PSWARP.INPUT", "PSWARP.MASK", "PSWARP.WEIGHT", NULL }; 9 static char *skycellFiles[] = { "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.WEIGHT", 10 "PSPHOT.OUTPUT", "PSPHOT.RESID", "PSPHOT.BACKMDL", "PSPHOT.BACKMDL.STDEV", 11 "PSPHOT.BACKGND", "PSPHOT.BACKSUB", "PSPHOT.PSF.SAVE", "SOURCE.PLOT.MOMENTS", 12 "SOURCE.PLOT.PSFMODEL", "SOURCE.PLOT.APRESID", NULL }; 9 static char *skycellFiles[] = { "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.WEIGHT", NULL }; 10 static char *photFiles[] = { "PSPHOT.INPUT", "PSPHOT.OUTPUT", "PSPHOT.INPUT.CMF", "PSPHOT.RESID", 11 "PSPHOT.BACKMDL", "PSPHOT.BACKMDL.STDEV", "PSPHOT.BACKGND", "PSPHOT.BACKSUB", 12 "PSPHOT.PSF.SAVE", "SOURCE.PLOT.MOMENTS", "SOURCE.PLOT.PSFMODEL", 13 "SOURCE.PLOT.APRESID", NULL }; 13 14 static char *independentFiles[] = { "PSWARP.ASTROM", // Read independently from the input pixels 14 15 "PSWARP.SKYCELL", // Don't care about the skycell once we have its WCS 15 "PSPHOT.INPUT", // This is just a pointer to PSWARP.OUTPUT16 16 "PSWARP.OUTPUT.SOURCES", // Save these independently so we can do the PSF 17 17 NULL }; … … 127 127 { 128 128 fileActivation(config, detectorFiles, false); 129 fileActivation(config, photFiles, false); 129 130 fileActivation(config, independentFiles, false); 130 131 fileActivation(config, skycellFiles, true); … … 326 327 fileActivation(config, detectorFiles, false); 327 328 fileActivation(config, independentFiles, false); 328 fileActivation(config, skycellFiles, true);329 329 330 330 // We need a new PSF model for the warped frame … … 334 334 // scratch. 335 335 if (psMetadataLookupBool(&mdok, config->arguments, "PSF")) { 336 fileActivation(config, photFiles, true); 337 ioChecksBefore(config); 338 339 // Tweak recipe 336 340 psMetadata *psphotRecipe = psMetadataLookupPtr(NULL, config->recipes, 337 341 PSPHOT_RECIPE); // Recipe for psphot … … 346 350 "Don't allow psphot to fit a fake PSF!", false); 347 351 352 #if 0 348 353 // Get rid of the transformed sources so that we can measure the PSF 349 354 psMetadataRemoveKey(output->analysis, "PSPHOT.SOURCES"); 350 351 #if 0 355 #endif 356 352 357 pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT"); 353 358 pmFPACopy(photFile->fpa, outFPA); 354 #endif355 359 356 360 pmFPAview *view = pmFPAviewAlloc(0); // View into skycell 357 361 view->chip = view->cell = view->readout = 0; 358 if (!psphotReadout (config, view)) {362 if (!psphotReadoutFindPSF(config, view)) { 359 363 psError(PS_ERR_UNKNOWN, false, "Unable to determine PSF for warped image."); 360 364 return false; 361 365 } 362 366 psFree(view); 363 364 pmFPAfileActivate(config->files, true, "PSPHOT.INPUT"); 365 pmFPAfileActivate(config->files, true, "PSPHOT.PSF.SAVE"); 366 } 367 } 368 369 fileActivation(config, skycellFiles, true); 367 370 368 371 // Perform statistics on the output image
Note:
See TracChangeset
for help on using the changeset viewer.
