IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31264


Ignore:
Timestamp:
Apr 11, 2011, 12:07:50 PM (15 years ago)
Author:
eugene
Message:

fix case were threshold to max range is surprisingly small

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20110406/psModules/src/objects/pmFootprintCullPeaks.c

    r31153 r31264  
    102102        float beta = nsigma_delta * ALPHA;
    103103        float beta2 = PS_SQR(beta);
    104         int nBins = sqrt(4.0*(maxFlux - min_threshold)/beta2) + 10; // let's be extra generous
     104        float value = 4.0*(maxFlux - min_threshold)/beta2;
     105        int nBins = (value > 1.0) ? sqrt(value) + 10 : 10; // let's be extra generous
    105106
    106107        // create a vector to store the threshold bins used for each peak
Note: See TracChangeset for help on using the changeset viewer.