Changeset 20115
- Timestamp:
- Oct 13, 2008, 2:48:45 PM (18 years ago)
- Location:
- trunk/pswarp/src
- Files:
-
- 3 edited
-
pswarpLoop.c (modified) (5 diffs)
-
pswarpParseCamera.c (modified) (1 diff)
-
pswarpTransformSources.c (modified) (1 diff)
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 -
trunk/pswarp/src/pswarpParseCamera.c
r18924 r20115 99 99 // This file, PSPHOT.INPUT, is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by 100 100 // psphotDefineFiles 101 pmFPAfile *psphotInput = pmFPAfileDefineSkycell(config, output->fpa, "PSPHOT.INPUT");101 pmFPAfile *psphotInput = pmFPAfileDefineSkycell(config, NULL, "PSPHOT.INPUT"); 102 102 if (!psphotInput) { 103 103 psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.INPUT")); 104 return false; 105 } 106 psphotInput->src = psMemIncrRefCounter(output->fpa); 107 108 pmFPAfile *psphotInSources = pmFPAfileDefineSkycell(config, psphotInput->fpa, "PSPHOT.INPUT.CMF"); 109 if (!psphotInSources) { 110 psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.INPUT.CMF")); 104 111 return false; 105 112 } -
trunk/pswarp/src/pswarpTransformSources.c
r19200 r20115 1 # include "pswarp.h"1 #include "pswarp.h" 2 2 3 # define SOURCE_ARRAY_BUFFER 100 // Size to grow the array of sources at a time3 #define SOURCE_ARRAY_BUFFER 100 // Size to grow the array of sources at a time 4 4 5 5 // NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
Note:
See TracChangeset
for help on using the changeset viewer.
