IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2012, 9:31:06 AM (14 years ago)
Author:
bills
Message:

If number of objects is above a recipe limit reduce the number of radial
apertures processed. Also add recipe value to cause final linear fit
for detected sources be performed first ommitting negative flux sources
followed by the fit for matched sources. Set to false for now pending
further testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotStackReadout.c

    r34215 r34226  
    286286    }
    287287
     288    // gcc doesn't like the label to refer to a declaration so we declare this here
     289    bool splitLinearFit;
     290
    288291pass1finish:
    289292
    290 #ifdef notyet
    291     // Split the fit of detected sources from matched sources. But not yet.
    292     // NOTE: apply to ALL sources. Only include sources with postitive flux in the fit
    293     psphotFitSourcesLinear (config, view, STACK_SRC, true, true); // pass 3 (detections->allSources)
    294 #endif
     293    splitLinearFit = psMetadataLookupBool(NULL, recipe, "PSPHOT.STACK.SPLIT.LINEAR.FIT");
     294    if (splitLinearFit) {
     295        psLogMsg ("psphot", 3, "splitting fit of detected and matched soures\n");
     296        // Fit the detected sources separately from matched that wea are about to create.
     297        // NOTE: apply to ALL sources but only include sources with postitive flux in the fit
     298        psphotFitSourcesLinear (config, view, STACK_SRC, true, true); // pass 3 (detections->allSources)
     299    }
    295300
    296301    // generate the objects (objects unify the sources from the different images) NOTE: could
     
    300305    psMemDump("matchsources");
    301306
     307    // check the source density. If it too high change the number of radial bins
     308    // in the recipe.
     309    psphotLimitRadialApertures(recipe, objects->n);
     310
    302311    // Construct an initial model for each object, set the radius to fitRadius, set circular
    303312    // fit mask.  NOTE: only applied to sources without guess models
     
    308317    psphotStackObjectsSelectForAnalysis (config, view, STACK_SRC, objects);
    309318
    310 #ifdef notyet
    311     // NOTE: apply to Matched sources. Since the sources that we fit above are subtracted, they will
    312     // not be included in this fit.
    313     psphotFitSourcesLinear (config, view, STACK_SRC, true, false); // pass 4 (detections->allSources)
    314 #else
    315     psphotFitSourcesLinear (config, view, STACK_SRC, true, false); // pass 3 (detections->allSources)
    316 #endif
     319    if (splitLinearFit) {
     320        // NOTE: apply to Matched sources. Since the sources that we fit above are subtracted, they will
     321        // not be included in this fit.
     322        psphotFitSourcesLinear (config, view, STACK_SRC, true, false); // pass 4 (detections->allSources)
     323    } else {
     324        // Fit all sources together
     325        psphotFitSourcesLinear (config, view, STACK_SRC, true, false); // pass 3 (detections->allSources)
     326    }
    317327
    318328    // measure the radial profiles to the sky (only measures new objects)
Note: See TracChangeset for help on using the changeset viewer.