IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2010, 1:32:17 PM (16 years ago)
Author:
eugene
Message:

updates to psphot APIs to enable stack photometry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/ppStack/src/ppStackPrepare.c

    r26675 r26785  
    177177
    178178        bool redoPhot = psMetadataLookupBool(NULL, recipe, "PHOT");
    179         psArray *sources = NULL;
    180 
     179
     180        pmDetections *detections = NULL;
    181181        if (options->convolve || options->matchZPs || options->photometry || redoPhot) {
    182182            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.");
     183            detections = psMetadataLookupPtr(NULL, ro->analysis, "PSPHOT.DETECTIONS"); // Sources
     184            if (!detections) {
     185                psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find source detections in readout.");
    186186                return NULL;
    187187            }
    188             options->sourceLists->data[index] = psMemIncrRefCounter(sources);
     188            psAssert (detections->allSources, "missing sources?");
     189           
     190            options->sourceLists->data[index] = psMemIncrRefCounter(detections->allSources);
    189191        }
    190192
     
    206208            pmReadout *ro = pmFPAviewThisReadout(view, file->fpa); // Readout of interest
    207209
    208             if (!ppStackInputPhotometer(ro, sources, config)) {
     210            if (!ppStackInputPhotometer(ro, detections->allSources, config)) {
    209211                psError(PS_ERR_UNKNOWN, false, "Unable to do photometry on input sources");
    210212                psFree(view);
Note: See TracChangeset for help on using the changeset viewer.