IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10203


Ignore:
Timestamp:
Nov 26, 2006, 12:38:36 PM (20 years ago)
Author:
eugene
Message:

fixed chiDBL wrt chiEXT (was not dividing by nDOF)

File:
1 edited

Legend:

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

    r10168 r10203  
    8080        // if this one failed, skip it
    8181        if (!psphotEvalPSF (blend, model)) {
    82             psTrace ("psphot", 5, "failed on blend %d of %ld\n", i, modelSet->n);
     82            psTrace ("psphot", 4, "failed on blend %d of %ld\n", i, modelSet->n);
    8383            continue;
    8484        }
     
    9292        blend->mode &= ~PM_SOURCE_MODE_TEMPSUB;
    9393    }
     94    // evaluate the primary object
     95    if (!psphotEvalPSF (source, PSF)) {
     96        psTrace ("psphot", 4, "failed on blend 0 of %ld\n", modelSet->n);
     97        psFree (PSF);
     98        psFree (modelSet);
     99        psFree (sourceSet);
     100        return false;
     101    }
    94102    psFree (modelSet);
    95103    psFree (sourceSet);
    96 
    97     // evaluate the primary object
    98     if (!psphotEvalPSF (source, PSF)) {
    99         psTrace ("psphot", 5, "failed on blend 0 of %ld\n", modelSet->n);
    100         psFree (PSF);
    101         return false;
    102     }
    103104
    104105    psTrace ("psphot", 5, "fitted primary as PSF\n");
     
    210211
    211212    // save chisq for double-star/galaxy comparison
    212     chiDBL = ONE->chisqNorm;
     213    chiDBL = ONE->chisq / ONE->nDOF;
    213214
    214215    // correct second model chisqs for flux trend
Note: See TracChangeset for help on using the changeset viewer.