Skip to content

Commit

Permalink
only pass voxelset if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Oct 13, 2023
1 parent 78734bc commit 1f5b873
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bsb/placement/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ def queue(self, pool, chunk_size):
def place(self, chunk, indicators):
for indicator in indicators.values():
cell_type = indicator.cell_type
# Pass the voxelset if it exists
voxels = getattr(p, "voxelset", None)
# Guess total number, not chunk number, as entities bypass chunking.
n = sum(np.sum(indicator.guess(voxels=p.voxelset)) for p in self.partitions)
n = sum(np.sum(indicator.guess(voxels=voxels)) for p in self.partitions)
self.scaffold.create_entities(cell_type, n)

0 comments on commit 1f5b873

Please sign in to comment.