IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29311


Ignore:
Timestamp:
Oct 4, 2010, 2:47:45 PM (16 years ago)
Author:
eugene
Message:

start to add minor axis test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c

    r29124 r29311  
    333333        psF32 Mxx = source->moments->Mxx;
    334334        psF32 Myy = source->moments->Myy;
     335        psF32 Mxy = source->moments->Mxy;
    335336
    336337        // replace object in image
     
    365366        float nSigmaMXX = (Mxx - psfClump->X) / hypot(psfClump->dX, psfClump->X*psfClump->X*source->errMag);
    366367        float nSigmaMYY = (Myy - psfClump->Y) / hypot(psfClump->dY, psfClump->Y*psfClump->Y*source->errMag);
     368
     369        // XXX should I change psfClump to use minor, major?
    367370
    368371        // fprintf (stderr, "%f %f : Mxx: %f, Myy: %f, dx: %f, dy: %f, psfMag: %f, apMag: %f, dMag: %f, errMag: %f, nSigmaMag: %f, nSigmaMxx: %f, nSigmaMyy: %f\n",
     
    407410        // XXX only accept brightish detections as CRs
    408411        // (nSigmaMAG < -options->nSigmaApResid) ||
     412
     413        // ** CRs are reliably flagged by a combination on Mminor < X && mag (or flux) > Y
     414
     415        Mminor = 0.5*(Mxx + Myy) - 0.5*sqrt(PS_SQR(Mxx - Myy) + 4.0*PS_SQR(Mxy));
     416
     417        // XXX do I need to find the Mminor, Mmajor distribution?
     418
    409419        bool isCR = isCR = (source->errMag < 1.0 / SIZE_SN_LIM) && ((Mxx < minMxx) || (Myy < minMyy));
    410420        if (isCR) {
Note: See TracChangeset for help on using the changeset viewer.