IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30865


Ignore:
Timestamp:
Mar 10, 2011, 5:23:09 PM (15 years ago)
Author:
eugene
Message:

measure a core flux in the moment analysis - this can be used with the kron flux to flag (and exclude?) detections in the badly-subtracted background regions

Location:
branches/eam_branches/ipp-20110213/psModules/src/objects
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprint.h

    r30621 r30865  
    8484                                 const float nsigma_delta, // how many sigma above local background a peak needs to be to survive
    8585                                 const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance
    86                                  const float min_threshold // minimum permitted coll height
     86                                 const float min_threshold, // minimum permitted coll height
     87                                 const float max_threshold // maximum permitted coll height
    8788    );
    8889
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprintCullPeaks.c

    r30752 r30865  
    3838                                 const float nsigma_delta, // how many sigma above local background a peak needs to be to survive
    3939                                 const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance
    40                                  const float min_threshold) { // minimum permitted coll height
     40                                 const float min_threshold, // minimum permitted coll height
     41                                 const float max_threshold) { // maximum permitted coll height
    4142    assert (img != NULL); assert (img->type.type == PS_TYPE_F32);
    4243    assert (weight != NULL); assert (weight->type.type == PS_TYPE_F32);
     
    119120            threshold = min_threshold;
    120121        }
     122        if (threshold > max_threshold) {
     123            threshold = max_threshold;
     124        }
    121125
    122126        // init peakFootprint here?
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmMoments.h

    r29004 r30865  
    5151    int nPixels;  ///< Number of pixels used.
    5252
    53     float KronFlux;    ///< Kron flux (flux in 2.5*Mrf)
     53    float KronCore;    ///< flux in r < 1.0*Mrf
     54    float KronCoreErr;    ///< error on flux in r < 1.0*Mrf
     55
     56    float KronFlux;    ///< Kron flux (flux in r < 2.5*Mrf)
    5457    float KronFluxErr; ///< Kron flux error
    5558
    56     float KronFinner;    ///< Kron flux (flux in 2.5*Mrf)
    57     float KronFouter;    ///< Kron flux (flux in 2.5*Mrf)
    58 
     59    float KronFinner;    ///< Kron flux (flux in 1.0*Mrf < r < 2.5*Mrf)
     60    float KronFouter;    ///< Kron flux (flux in 2.5*Mrf < r < 4.0*Mrf)
    5961}
    6062pmMoments;
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmPeaks.h

    r29004 r30865  
    3535    PM_PEAK_EDGE,                       ///< Peak on edge.
    3636    PM_PEAK_FLAT,                       ///< Peak has equal-value neighbors.
     37    PM_PEAK_SUSPECT_SATURATION,         ///< Peak is probably saturated
    3738    PM_PEAK_UNDEF                       ///< Undefined.
    3839} pmPeakType;
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmSource.c

    r30775 r30865  
    637637            // XXX eliminate the classification?
    638638            if ((source->moments->SN > 10) && (sigX < 0.05 || sigY < 0.05)) {
     639                source->type = PM_SOURCE_TYPE_DEFECT;
     640                source->mode |= PM_SOURCE_MODE_DEFECT;
     641                Ncr ++;
     642                continue;
     643            }
     644
     645            // check for insignificant sources or excessively low-surface brightness
     646            float coreSN = source->moments->KronCore / source->moments->KronCoreErr;
     647            float coreKR = source->moments->KronCore / source->moments->KronFlux;
     648
     649            // XXX these values need to be in the recipe...
     650            if (false && isfinite(coreSN) && (coreSN < 5.0)) {
     651                source->type = PM_SOURCE_TYPE_DEFECT;
     652                source->mode |= PM_SOURCE_MODE_DEFECT;
     653                Ncr ++;
     654                continue;
     655            }
     656            if (false && isfinite(coreKR) && (coreKR < 0.1)) {
    639657                source->type = PM_SOURCE_TYPE_DEFECT;
    640658                source->mode |= PM_SOURCE_MODE_DEFECT;
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceIO_CMF_PS1_V3.c

    r30763 r30865  
    161161        psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_INNER",  PS_DATA_F32, "Kron Flux (in 2.5 R1)",                      moments.Kinner);
    162162        psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_OUTER",  PS_DATA_F32, "Kron Flux (in 2.5 R1)",                      moments.Kouter);
     163        // psMetadataAdd (row, PS_LIST_TAIL, "KRON_CORE_FLUX",   PS_DATA_F32, "Kron Flux (in 1.0 R1)",                      moments.KronCore);
     164        // psMetadataAdd (row, PS_LIST_TAIL, "KRON_CORE_ERROR",  PS_DATA_F32, "Kron Error (in 1.0 R1)",                     moments.KronCoreErr);
    163165        psMetadataAdd (row, PS_LIST_TAIL, "FLAGS",            PS_DATA_U32, "psphot analysis flags",                      source->mode);
    164166        psMetadataAdd (row, PS_LIST_TAIL, "FLAGS2",           PS_DATA_U32, "psphot analysis flags",                      source->mode2);
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceMoments.c

    r29602 r30865  
    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",
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceOutputs.c

    r30784 r30865  
    170170    moments->Kinner = source->moments ? source->moments->KronFinner : NAN;
    171171    moments->Kouter = source->moments ? source->moments->KronFouter : NAN;
     172    moments->KronCore    = source->moments ? source->moments->KronCore : NAN;
     173    moments->KronCoreErr = source->moments ? source->moments->KronCoreErr : NAN;
    172174
    173175    return true;
  • branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceOutputs.h

    r30763 r30865  
    5050    float Kinner;
    5151    float Kouter;
     52    float KronCore;
     53    float KronCoreErr;
    5254} pmSourceOutputsMoments;
    5355
Note: See TracChangeset for help on using the changeset viewer.