IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

use the smoothed image for footprint culling; use a more stringent culling for saturated stars; more tweaks to get sat stars to be fitted; various updates to psphotStack; unify psphotImageLoop varients; be a bit careful about number of stars in a PSF clump

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

  • trunk/psphot/src/psphotFindPeaks.c

    r26894 r31154  
    44// image must be constructed to represent (S/N)^2.  If nMax is non-zero, only return a maximum
    55// of nMax peaks
    6 psArray *psphotFindPeaks (psImage *significance, pmReadout *readout, psMetadata *recipe, const float threshold, const int nMax) {
     6psArray *psphotFindPeaks (pmReadout *significance, pmReadout *readout, psMetadata *recipe, const float threshold, const int nMax) {
    77
    88    bool status = false;
     
    1111
    1212    // find the peaks in the smoothed image
    13     psArray *peaks = pmPeaksInImage (significance, threshold);
     13    // NOTE : significance->variance actually carries the detection S/N image
     14    psArray *peaks = pmPeaksInImage (significance->variance, threshold);
    1415    if (peaks == NULL) {
    1516        // we only get a NULL peaks array due to a programming or config error.
     
    3435    for (int i = 0; i < peaks->n; i++) {
    3536        pmPeak *peak = peaks->data[i];
    36         peak->SN = sqrt(peak->value);
    37         peak->flux = readout->image->data.F32[peak->y-row0][peak->x-col0];
    38         // if (peak->flux / peak->value > 5.0/12.0) {
    39         //     psWarning ("odd peak levels (1)");
    40         // }
    41         // if (peak->value / peak->flux > 5*12.0) {
    42         //     psWarning ("odd peak levels (2)");
    43         // }
     37        peak->rawFlux = readout->image->data.F32[peak->y-row0][peak->x-col0];
     38        peak->rawFluxStdev = sqrt(readout->variance->data.F32[peak->y-row0][peak->x-col0]);
     39        peak->smoothFlux = significance->image->data.F32[peak->y-row0][peak->x-col0];
     40        peak->smoothFluxStdev = peak->smoothFlux / sqrt(significance->variance->data.F32[peak->y-row0][peak->x-col0]);
     41        // NOTE smoothFluxStdev is actually (sqrt(variance) / covar_factor)
     42
     43        // do we need this or not?
     44        // peak->SN = sqrt(peak->detValue);
     45
    4446        if (readout->variance && isfinite (peak->dx)) {
    4547            peak->dx *= sqrt(readout->variance->data.F32[peak->y-row0][peak->x-col0]);
     
    5153
    5254    // limit the total number of returned peaks as specified
    53     psArraySort (peaks, pmPeakSortBySN);
     55    psArraySort (peaks, pmPeaksSortByRawFluxDescend);
    5456    if (nMax && (peaks->n > nMax)) {
    5557        psArray *tmpPeaks = psArrayAllocEmpty (nMax);
Note: See TracChangeset for help on using the changeset viewer.