IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 18, 2011, 8:53:12 AM (15 years ago)
Author:
eugene
Message:

adding flag to mark PASS1 (vs PASS2) detections; moving AP_MAGS flag inot pmSourcePhotometry; bad mask was missing suspect bits (logic error in I/O writing MASK.PSPHOT - added explicitly to maskPoor in PSF_QF_PERFECT; limit Kron radius at upper and lower bounds; use non-linear position errors only for PSF sources in PSF output (extended sources not fitted with non-linear PSF model); make sure pmSourceCopy gets all the elements of the structure that it needs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/psModules/src/objects/pmSourceMoments.c

    r31153 r31312  
    109109    // Xn  = SUM (x - xc)^n * (z - sky)
    110110
     111    psF32 RFW = 0.0;
     112    psF32 RHW = 0.0;
     113
    111114    psF32 RF = 0.0;
    112115    psF32 RH = 0.0;
     
    187190            psF32 rs = fDiff;
    188191
     192            psF32 rfw = r * pDiff;
     193            psF32 rhw = sqrt(r) * pDiff;
     194
    189195            psF32 x = xDiff * pDiff;
    190196            psF32 y = yDiff * pDiff;
     
    208214            RH  += rh;
    209215            RS  += rs;
     216
     217            RFW  += rfw;
     218            RHW  += rhw;
    210219
    211220            XX  += xx;
     
    226235    }
    227236
    228     source->moments->Mrf = RF/RS;
    229     source->moments->Mrh = RH/RS;
     237    // if Mrf (first radial moment) is << sigma, we are getting into low-significance
     238    // territory.  saturate at 0.75*sigma.  conversely, if Mrf is > radius, we are clearly
     239    // making an error.  saturate at radius.
     240    source->moments->Mrf = MIN(radius, MAX(0.75*sigma, RF/RS));
     241    source->moments->Mrh = MIN(radius, MAX(0.75*sigma, RH/RS));
    230242
    231243    source->moments->Mxx = XX/Sum;
     
    243255    source->moments->Mxyyy = XYYY/Sum;
    244256    source->moments->Myyyy = YYYY/Sum;
     257
     258    // XXX TEST:
     259    // source->moments->KronFinner = RFW/Sum;
     260    // source->moments->KronFouter = sigma;
    245261
    246262    // Calculate the Kron magnitude (make this block optional?)
Note: See TracChangeset for help on using the changeset viewer.