dbbs-lab / bsb-core

The Brain Scaffold Builder
https://bsb.readthedocs.io
GNU General Public License v3.0
21 stars 16 forks source link

Count_ratio in placement apply chunk ratio twice. #822

Closed drodarie closed 5 months ago

drodarie commented 5 months ago

In bsb.placement.indicator.py in function guess: when an estimate is a "count_ratio" of another cell type, then its estimate is done for a speciffic chunk with:

estimate = (
                    sum(
                        PlacementIndicator(s, relation).guess(chunk, voxels)
                        for s in strats
                    )
                    * count_ratio
                )

However, the line afterwards does also a ratio to obtain an estimate for the provided chunk:

estimate = self._estim_for_chunk(chunk, estimate)

Which means that the final estimate is incorrect.