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/psphotMergeSources.c

    r30883 r30975  
    111111
    112112                // the supplied peak flux needs to be re-normalized
    113                 source->peak->flux = 1.0;
    114                 source->peak->value = 1.0;
     113                source->peak->rawFlux = 1.0;
     114                source->peak->smoothFlux = 1.0;
     115                source->peak->detValue = 1.0;
    115116
    116117                // drop the loaded source modelPSF
     
    282283    for (int i = 0; i < sources->n; i++) {
    283284      pmSource *source = sources->data[i];
    284       source->peak->flux = source->moments->Peak;
     285      source->peak->rawFlux = source->moments->Peak;
     286      source->peak->smoothFlux = source->moments->Peak;
    285287    }
    286288
     
    332334        float ypos = model->params->data.F32[PM_PAR_YPOS];
    333335
    334         pmPeak *peak = pmPeakAlloc(xpos, ypos, 1.0, PM_PEAK_LONE);
     336        pmPeak *peak = pmPeakAlloc(xpos, ypos, flux, PM_PEAK_LONE);
    335337        peak->xf = xpos;
    336338        peak->yf = ypos;
    337         peak->flux = flux; // this are being set wrong, but does it matter?
    338 
    339         if (isfinite (source->errMag) && (source->errMag > 0.0)) {
    340           peak->SN = 1.0 / source->errMag;
    341         } else {
    342           peak->SN = 0.0;
    343         }
     339        peak->rawFlux = flux; // this are being set wrong, but does it matter?
     340        peak->smoothFlux = flux; // this are being set wrong, but does it matter?
    344341
    345342        psArrayAdd (detections->peaks, 100, peak);
     
    383380        float ypos = model->params->data.F32[PM_PAR_YPOS];
    384381
    385         pmPeak *peak = pmPeakAlloc(xpos, ypos, 1.0, PM_PEAK_LONE);
     382        pmPeak *peak = pmPeakAlloc(xpos, ypos, flux, PM_PEAK_LONE);
    386383        peak->xf = xpos;
    387384        peak->yf = ypos;
    388         peak->flux = flux; // this are being set wrong, but does it matter?
    389 
    390         if (isfinite (source->errMag) && (source->errMag > 0.0)) {
    391           peak->SN = 1.0 / source->errMag;
    392         } else {
    393           peak->SN = 0.0;
    394         }
     385        peak->rawFlux = flux; // this are being set wrong, but does it matter?
     386        peak->smoothFlux = flux; // this are being set wrong, but does it matter?
    395387
    396388        source->peak = peak;
     
    686678        objectsOut->data[k] = objectOut;
    687679
    688         objectOut->SN = objectSrc->SN;
    689         objectOut->x  = objectSrc->x;
    690         objectOut->y  = objectSrc->y;
     680        objectOut->flux = objectSrc->flux;
     681        objectOut->x    = objectSrc->x;
     682        objectOut->y    = objectSrc->y;
    691683       
    692684        objectOut->sources = psArrayAlloc(objectSrc->sources->n);
Note: See TracChangeset for help on using the changeset viewer.