IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30176


Ignore:
Timestamp:
Dec 24, 2010, 3:30:41 PM (15 years ago)
Author:
eugene
Message:

create a child sources and associated object list for radial aperture fluxes on the matched psf images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/psphot/src/psphotStackReadout.c

    r30142 r30176  
    1313bool psphotStackVisualFilerule(pmConfig *config, const pmFPAview *view, const char *filerule) {
    1414
     15    bool status = false;
     16
    1517    int num = psphotFileruleCount(config, filerule);
     18
     19    // select the appropriate recipe information
     20    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
    1621
    1722    // loop over the available readouts
     
    2530        psAssert (readout, "missing readout?");
    2631
    27         psphotVisualShowImage (readout);
    28         psphotVisualShowResidualImage (readout);
     32        pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
     33        psAssert (detections, "missing detections?");
     34
     35        psArray *sources = detections->allSources;
     36        psAssert (sources, "missing sources?");
     37
     38        psphotVisualShowResidualImage (readout, true);
     39        psphotVisualShowObjectRegions (readout, recipe, sources);
    2940    }
    3041    return true;
     
    211222    psphotMagnitudes(config, view, STACK_SRC);
    212223
    213     // copy the detections from SRC to OUT (for radial aperture photometry)
    214     if (!psphotSourceChildren (config, view, STACK_OUT, STACK_SRC)) {
     224    // create source children for the OUT filerule (for radial aperture photometry)
     225    psArray *objectsRadial = psphotSourceChildrenByObject (config, view, STACK_OUT, objects);
     226    if (!objectsRadial) {
    215227        psFree(objects);
    216228        psError (PSPHOT_ERR_UNKNOWN, false, "failure in peak analysis");
     
    221233    for (int nMatchedPSF = 0; smoothAgain; nMatchedPSF++) {
    222234
    223         // XXX we probably can drop this if we redefine the pixels in CopySources
    224         // psphotRedefinePixels (config, view, STACK_OUT);
    225 
    226         // re-measure the PSF for the smoothed image 
     235        // re-measure the PSF for the smoothed image (using entries in 'allSources')
    227236        psphotChoosePSF (config, view, STACK_OUT, false);
    228237
     
    234243
    235244        // measure circular, radial apertures (objects sorted by S/N)
    236         psphotRadialAperturesByObject (config, objects, view, STACK_OUT, nMatchedPSF);
     245        psphotRadialAperturesByObject (config, objectsRadial, view, STACK_OUT, nMatchedPSF);
    237246
    238247        // replace the flux in the image so it is returned to its original state
     
    265274
    266275    psFree (objects);
     276    psFree (objectsRadial);
    267277
    268278    // create the exported-metadata and free local data
Note: See TracChangeset for help on using the changeset viewer.