IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2011, 2:10:35 PM (15 years ago)
Author:
eugene
Message:

we had 3 items conceptually equivalent to the brightness of a peak: "value", "flux", and "SN"; Ive modified pmPeak to carry explicitly named elements "rawFlux", "smoothFlux", and "detValue". Ive also added the corresponding variance values for rawFlux and smoothFlux. This lets us choose independently of the peak detection process whether flux comparisons are done relative to the smoothed or unsmoothed image. It also simplifies tests of the peak flux compared to something else

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psphot/src/psphotCullPeaks.c

    r30932 r30975  
    11# include "psphotInternal.h"
    2 
    3 # define CULL_WITH_SMOOTHED_IMAGE 1
    42
    53/*
     
    6361    float SAT_THRESHOLD  = 0.05*SATURATION;
    6462
    65 # if (CULL_WITH_SMOOTHED_IMAGE)
     63# if (PM_PEAKS_CULL_WITH_SMOOTHED_IMAGE)
    6664    psLogMsg ("psphot", PS_LOG_INFO, "Culling peaks from footprints using the smoothed image");
    6765# else
     
    8179        pmPeak *brightPeak = fp->peaks->data[0];
    8280        float max_threshold = SAT_TEST_LEVEL;
    83         if (brightPeak->flux > SAT_TEST_LEVEL) {
     81        if (brightPeak->rawFlux > SAT_TEST_LEVEL) {
    8482            max_threshold = SAT_THRESHOLD;
    8583            brightPeak->type = PM_PEAK_SUSPECT_SATURATION;
    8684        }
    8785
    88 # if (CULL_WITH_SMOOTHED_IMAGE)
     86# if (PM_PEAKS_CULL_WITH_SMOOTHED_IMAGE)
    8987        // New (post r30869) style of culling using the smoothed image and variance (S/N)
    9088        // if we cull using the significance image, then the definition of variance is different (thus the bool in arg 8)
    91         if (pmFootprintCullPeaks(signifR->image, signifR->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, false) != PS_ERR_NONE) {
     89        if (pmFootprintCullPeaks(signifR->image, signifR->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, true) != PS_ERR_NONE) {
    9290            return psError(PS_ERR_UNKNOWN, false, "Culling pmFootprint %d", fp->id);
    9391        }
    9492# else
    9593        // Old (pre r30869) style of culling using the raw image and variance
    96         if (pmFootprintCullPeaks(readout->image, readout->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, true) != PS_ERR_NONE) {
     94        if (pmFootprintCullPeaks(readout->image, readout->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, false) != PS_ERR_NONE) {
    9795             return psError(PS_ERR_UNKNOWN, false, "Culling pmFootprint %d", fp->id);
    98         }
    99 # endif
    100 
    101 // Alternate style of culling using the smoothed image and raw variance (probably a bad idea)
    102 # if (0)
    103         if (pmFootprintCullPeaks(signifR->image, readout->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, true) != PS_ERR_NONE) {
    104             return psError(PS_ERR_UNKNOWN, false, "Culling pmFootprint %d", fp->id);
    10596        }
    10697# endif
Note: See TracChangeset for help on using the changeset viewer.