IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2011, 1:04:41 PM (15 years ago)
Author:
eugene
Message:

updates to pmPeak to better distinguish peak flux versions; updates to visualization; add bits for substantial suspect masking; consolidate assignment of source position and flux based on peak, moments, etc; improve footprint culling process; fix PSF_QF and PSF_QF_PERFECT calculations; fix source model chisq values

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

    • Property svn:ignore
      •  

        old new  
        2828ChangeLog
        2929psmodules-*.tar.*
         30a.out.dSYM
  • trunk/psModules/src/objects/pmSourceMoments.c

    r29602 r31153  
    8282    psF32 Sum = 0.0;
    8383    psF32 Var = 0.0;
     84    psF32 SumCore = 0.0;
     85    psF32 VarCore = 0.0;
    8486    psF32 R2 = PS_SQR(radius);
    8587    psF32 minSN2 = PS_SQR(minSN);
     
    248250
    249251    int nKronPix = 0;
     252    int nCorePix = 0;
     253    int nInner = 0;
     254    int nOuter = 0;
    250255    Sum = Var = 0.0;
    251256    float SumInner = 0.0;
     
    255260
    256261        psF32 yDiff = row - yCM;
    257         if (fabs(yDiff) > radKron) continue;
     262        if (fabs(yDiff) > radKouter) continue;
    258263
    259264        psF32 *vPix = source->pixels->data.F32[row];
     
    272277
    273278            psF32 xDiff = col - xCM;
    274             if (fabs(xDiff) > radKron) continue;
     279            if (fabs(xDiff) > radKouter) continue;
    275280
    276281            // radKron is just a function of (xDiff, yDiff)
     
    293298            }
    294299
     300            // use sigma (fixed by psf) not a radKron based value
     301            if (r < sigma) {
     302                SumCore += pDiff;
     303                VarCore += wDiff;
     304                nCorePix ++;
     305            }
     306
    295307            if ((r > radKinner) && (r < radKron)) {
    296308                SumInner += pDiff;
     309                nInner ++;
    297310            }
    298311            if ((r > radKron)  && (r < radKouter)) {
    299312                SumOuter += pDiff;
     313                nOuter ++;
    300314            }
    301315        }
    302316    }
    303     source->moments->KronFlux = Sum;
    304     source->moments->KronFinner = SumInner;
    305     source->moments->KronFouter = SumOuter;
    306     source->moments->KronFluxErr = sqrt(Var);
     317    // *** should I rescale these fluxes by pi R^2 / nNpix?
     318    source->moments->KronCore    = SumCore       * M_PI * PS_SQR(sigma) / nCorePix;
     319    source->moments->KronCoreErr = sqrt(VarCore) * M_PI * PS_SQR(sigma) / nCorePix;
     320    source->moments->KronFlux    = Sum       * M_PI * PS_SQR(radKron) / nKronPix;
     321    source->moments->KronFluxErr = sqrt(Var) * M_PI * PS_SQR(radKron) / nKronPix;
     322    source->moments->KronFinner = SumInner * M_PI * (PS_SQR(radKron)   - PS_SQR(radKinner)) / nInner;
     323    source->moments->KronFouter = SumOuter * M_PI * (PS_SQR(radKouter) -   PS_SQR(radKron)) / nOuter;
    307324
    308325    psTrace ("psModules.objects", 4, "Mrf: %f  KronFlux: %f  Mxx: %f  Mxy: %f  Myy: %f  Mxxx: %f  Mxxy: %f  Mxyy: %f  Myyy: %f  Mxxxx: %f  Mxxxy: %f  Mxxyy: %f  Mxyyy: %f  Mxyyy: %f\n",
     
    313330
    314331    psTrace ("psModules.objects", 3, "peak %f %f (%f = %f) Mx: %f  My: %f  Sum: %f  Mxx: %f  Mxy: %f  Myy: %f  sky: %f  Npix: %d\n",
    315              source->peak->xf, source->peak->yf, source->peak->flux, source->peak->SN, source->moments->Mx,   source->moments->My, Sum, source->moments->Mxx,   source->moments->Mxy,   source->moments->Myy, sky, source->moments->nPixels);
     332             source->peak->xf, source->peak->yf, source->peak->rawFlux, sqrt(source->peak->detValue), source->moments->Mx,   source->moments->My, Sum, source->moments->Mxx,   source->moments->Mxy,   source->moments->Myy, sky, source->moments->nPixels);
    316333
    317334    return(true);
Note: See TracChangeset for help on using the changeset viewer.