IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 22, 2009, 10:01:06 AM (16 years ago)
Author:
eugene
Message:

fixing bugs related to stacking PR images

Location:
branches/eam_branches/20091201/ppStack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/ppStack

  • branches/eam_branches/20091201/ppStack/src/ppStackPrepare.c

    r23573 r26475  
    176176
    177177
    178         pmReadout *ro = pmFPAviewThisReadout(view, inputFile->fpa); // Readout with sources
    179         psArray *sources = psMetadataLookupPtr(NULL, ro->analysis, "PSPHOT.SOURCES"); // Sources
    180         if (!sources) {
    181             psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find sources in readout.");
    182             return NULL;
    183         }
    184         options->sourceLists->data[index] = psMemIncrRefCounter(sources);
     178        bool redoPhot = psMetadataLookupBool(NULL, recipe, "PHOT");
     179        psArray *sources = NULL;
     180
     181        if (options->convolve || options->matchZPs || redoPhot) {
     182            pmReadout *ro = pmFPAviewThisReadout(view, inputFile->fpa); // Readout with sources
     183            sources = psMetadataLookupPtr(NULL, ro->analysis, "PSPHOT.SOURCES"); // Sources
     184            if (!sources) {
     185                psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find sources in readout.");
     186                return NULL;
     187            }
     188            options->sourceLists->data[index] = psMemIncrRefCounter(sources);
     189        }
    185190
    186191        // Re-do photometry if we don't trust the source lists
    187         if (psMetadataLookupBool(NULL, recipe, "PHOT")) {
     192        if (redoPhot) {
    188193            psTrace("ppStack", 2, "Photometering input %d of %d....\n", index, num);
    189194            pmFPAfileActivate(config->files, false, NULL);
    190195            ppStackFileActivationSingle(config, PPSTACK_FILES_CONVOLVE, true, index);
     196            if (options->convolve) {
     197                pmFPAfileActivate(config->files, true, "PPSTACK.CONV.KERNEL");
     198            }
    191199            pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT", index); // File
    192200            pmFPAview *photView = ppStackFilesIterateDown(config);
Note: See TracChangeset for help on using the changeset viewer.