IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27554 for trunk/psModules


Ignore:
Timestamp:
Apr 1, 2010, 1:08:58 PM (16 years ago)
Author:
Paul Price
Message:

Prevent numBins = 0, which triggers assertion failures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryObjects.c

    r26893 r27554  
    454454    // Define the histogram bin size.
    455455    float binSize = 0.001;
    456     long numBins = PS_MIN(100000, (max - min) / binSize); // Number of bins
     456    long numBins = PS_MAX(PS_MIN(100000, (max - min) / binSize), 2); // Number of bins
    457457    psTrace("psModules.astrom", 5, "Numbins is %ld\n", numBins);
    458458    psTrace("psModules.astrom", 5, "Creating a robust histogram from data range (%.2f - %.2f)\n", min, max);
Note: See TracChangeset for help on using the changeset viewer.