-
Couldn't load subscription status.
- Fork 20
Open
Description
Bin centers computed by net.imglib2.algorithm.stats.RealBinMapper are not consistent with the input minBin and maxBin values and not what I'd expect.
invMap's behavior is also not what I'd expect:
- Put 4 bins between the interval [0.0 1.0]
- Expect bin "boundaries" at 1/4, 2/4, 3/4 and therefore:
- Expect bin centers at 1/8, 3/8, 5/8, 7/8
- Observe: centers are not what was expected, some are out-of-bounds
Pseudocode:
mapper = RealBinMapper( 0.0, 1.0, 4 )
println( mapper.invMap( 0 ))
println( mapper.invMap( 1 ))
println( mapper.invMap( 2 ))
println( mapper.invMap( 3 ))
outputs
0.0
0.5
1.0
1.5
net.imglib2.histogram.Real1dBinMapper however seems to work as expected.
https://github.com/imglib/imglib2/tree/master/src/main/java/net/imglib2/histogram
Perhaps we should deprecate net.imglib2.algorithm.stats in favor of net.imglib2.histogram (?)
which so far seems to have the behavior I expect.
Metadata
Metadata
Assignees
Labels
No labels