IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2011, 2:41:42 PM (15 years ago)
Author:
eugene
Message:

match sources before final linear fit (to enable forced photometry of PSF mags); only a single detection per image allowed for an object; distinguish conditions for Radial Aperture analysis and Petrosian analysis; no Radial Aperture analysis for chisq image

File:
1 edited

Legend:

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

    r32616 r32628  
    4343
    4444bool psphotStackReadout (pmConfig *config, const pmFPAview *view) {
     45
     46    psArray *objects = NULL; // used below after 'pass1finish' label
    4547
    4648    // measure the total elapsed time in psphotReadout.  dtime is the elapsed time used jointly
     
    187189    psphotReplaceAllSources (config, view, STACK_SRC); // pass 1 (detections->allSources)
    188190
     191    // if we only do one pass, skip to extended source analysis
     192    if (!strcasecmp (breakPt, "PASS1")) goto pass1finish;
     193
    189194    // linear fit to include all sources (subtract again)
    190195    // NOTE : apply to ALL sources (extended + psf)
    191196    psphotFitSourcesLinear (config, view, STACK_SRC, true); // pass 2 (detections->allSources)
    192 
    193     // if we only do one pass, skip to extended source analysis
    194     if (!strcasecmp (breakPt, "PASS1")) goto pass1finish;
    195197
    196198    // NOTE: possibly re-measure background model here with objects subtracted / or masked
     
    241243        // XXX check on free of sources...
    242244        psphotMergeSources (config, view, STACK_SRC); // (detections->newSources + detections->allSources -> detections->allSources)
    243 
    244         // NOTE: apply to ALL sources
    245         psphotFitSourcesLinear (config, view, STACK_SRC, true); // pass 3 (detections->allSources)
    246245    }
    247246
    248247pass1finish:
     248
     249    // generate the objects (objects unify the sources from the different images) NOTE: could
     250    // this just match the detections for the chisq image, and not bother measuring the source
     251    // stats in that case...?
     252    objects = psphotMatchSources (config, view, STACK_SRC);
     253    psMemDump("matchsources");
     254
     255    psphotStackObjectsUnifyPosition (objects);
     256
     257    psphotStackObjectsSelectForAnalysis (config, view, STACK_SRC, objects);
     258
     259    // NOTE: apply to ALL sources
     260    psphotFitSourcesLinear (config, view, STACK_SRC, true); // pass 3 (detections->allSources)
    249261
    250262    // measure the radial profiles to the sky (only measures new objects)
     
    260272
    261273    psMemDump("psfstats");
    262 
    263     // XXX *** NOTE : this should happen above before the last psphotFitSourcesLinear in order
    264     // to generate psf forced photometry for the undetected sources
    265 
    266     // generate the objects (objects unify the sources from the different images)
    267     // XXX this could just match the detections for the chisq image, and not bother measuring the
    268     // source stats in that case...
    269     psArray *objects = psphotMatchSources (config, view, STACK_SRC);
    270     psMemDump("matchsources");
    271 
    272     psphotStackObjectsUnifyPosition (objects);
    273 
    274     psphotStackObjectsSelectForAnalysis (config, view, STACK_SRC, objects);
    275274
    276275    // measure elliptical apertures, petrosians (objects sorted by S/N)
     
    330329    psphotMagnitudes(config, view, STACK_SRC);
    331330
    332     if (0 && !psphotEfficiency(config, view, STACK_DET)) {
     331    // XXX NOTE: this function wants to have the PSF of the image, but we (so far) only measure the
     332    // PSF of the SRC image.  can we fake it by generating the PSF for DET as well (up above)?
     333    if (false && !psphotEfficiency(config, view, STACK_DET)) {
    333334        psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources");
    334335        psErrorClear();
Note: See TracChangeset for help on using the changeset viewer.