IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 3, 2011, 3:11:09 PM (15 years ago)
Author:
eugene
Message:

fix the calculation of chisq values for constant errors (re-calculated, do not attempt to correct raw value)

File:
1 edited

Legend:

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

    r30764 r30784  
    312312    for (int i = 0; i < fitSources->n; i++) {
    313313        pmSource *source = fitSources->data[i];
    314         if (source->mode & PM_SOURCE_MODE_NONLINEAR_FIT) continue;
    315314        pmModel *model = pmSourceGetModel (NULL, source);
    316         pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal, covarFactor, 1);
     315        if (!(source->mode & PM_SOURCE_MODE_NONLINEAR_FIT)) {
     316            model->nPar = 1; // LINEAR-only sources have 1 parameter; NONLINEAR sources have their original value
     317        }
     318        pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal);
    317319    }
    318320    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "get chisqs: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem);
Note: See TracChangeset for help on using the changeset viewer.