IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 28, 2011, 2:46:40 PM (15 years ago)
Author:
eugene
Message:

updated API for pmSourceChisq (requires covarFactor); visualization fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psphot/src/psphotFitSourcesLinear.c

    r30624 r30764  
    121121    // covarFactor = 1.0;
    122122
     123    int Nsat = 0;
     124
    123125    // select the sources which will be used for the fitting analysis
    124126    for (int i = 0; i < sources->n; i++) {
     
    134136        // do not include CRs in the full ensemble fit
    135137        if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue;
     138
     139        // XXX count saturated stars
     140        if (source->mode & PM_SOURCE_MODE_SATSTAR) {
     141            Nsat ++;
     142        }
    136143
    137144        if (final) {
     
    180187    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "built fitSources: %f sec (%ld objects)\n", psTimerMark ("psphot.linear"), sources->n);
    181188
     189    fprintf (stderr, "****** Nsat : %d ********\n", Nsat);
     190
    182191    if (fitSources->n == 0) {
    183192        psFree(fitSources);
     
    305314        if (source->mode & PM_SOURCE_MODE_NONLINEAR_FIT) continue;
    306315        pmModel *model = pmSourceGetModel (NULL, source);
    307         pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal, covarFactor);
     316        pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal, covarFactor, 1);
    308317    }
    309318    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "get chisqs: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem);
     
    324333    // We have to place this visualization here because the models are not realized until
    325334    // psphotGuessModels or fitted until psphotFitSourcesLinear.
    326     psphotVisualShowPSFStars (recipe, psf, sources);
     335    // psphotVisualShowPSFStars (recipe, psf, sources);
    327336
    328337    return true;
Note: See TracChangeset for help on using the changeset viewer.