IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 27, 2007, 2:34:11 PM (19 years ago)
Author:
eugene
Message:

use full histogram range to calculate binSize

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psHistogram.c

    r14930 r15045  
    55 *  @author GLG (MHPCC), EAM (IfA)
    66 *
    7  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-09-20 23:58:02 $
     7 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-09-28 00:34:11 $
    99 *
    1010 *  Copyright 2006 IfA, University of Hawaii
     
    285285                // number is almost trivial.  start with a guess from the uniform scale.
    286286                if (out->uniform == true) {
    287                     double binSize = out->bounds->data.F32[1] - out->bounds->data.F32[0]; // Histogram bin size
     287                    double binSize = (out->bounds->data.F32[out->nums->n] - out->bounds->data.F32[0]) / (float) out->nums->n; // Histogram bin size
    288288                    binNum = (inF32->data.F32[i] - out->bounds->data.F32[0]) / binSize;
    289289                    binNum = PS_MAX (binNum, 0);
Note: See TracChangeset for help on using the changeset viewer.