IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15802


Ignore:
Timestamp:
Dec 12, 2007, 6:07:17 PM (18 years ago)
Author:
eugene
Message:

change psfProb to psfChisq

File:
1 edited

Legend:

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

    r15077 r15802  
    5353        float nR = cR / sqrt(dcR);
    5454
    55         float chisq = PS_SQR (nX) + PS_SQR (nY) + PS_SQR (nX) + PS_SQR (nR);
    56 
    5755        // P(chisq > chisq_obs; Ndof) = gamma_Q (Ndof/2, chisq/2)
    5856        // Ndof = 4 ? (four measurements, no free parameters)
    5957        // XXX this value is going to be biased low because of systematic errors.
    6058        // we need to calibrate it somehow
    61         source->psfProb = gsl_sf_gamma_inc_Q (2, 0.5*chisq);
     59        // source->psfProb = gsl_sf_gamma_inc_Q (2, 0.5*chisq);
     60
     61        // not strictly accurate: overcounts the chisq contribution from the center pixel (by factor of 4)
     62        source->psfChisq = PS_SQR (nX) + PS_SQR (nY) + PS_SQR (nX) + PS_SQR (nR);
    6263
    6364        float fCR = 0.0;
     
    9495        }
    9596        source->crNsigma  = (nCR > 0)  ? fCR / nCR : 0.0;
    96         source->extNsigma = (nEXT > 0) ? fEXT / nEXT : 0.0;
     97        source->extNsigma = (nEXT > 0) ? fabs(fEXT) / nEXT : 0.0;
     98        // NOTE: abs needed to make the Nsigma value positive
    9799    }
    98100    return true;
Note: See TracChangeset for help on using the changeset viewer.