Skip to content

Commit

Permalink
fix: origin parameter for cylinder targetting is now a numpy array.
Browse files Browse the repository at this point in the history
  • Loading branch information
drodarie committed Oct 3, 2024
1 parent 6b73dbe commit 2a271b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bsb/simulation/targetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class CylindricalTargetting(
Targets all cells in a cylinder along specified axis.
"""

origin: list[float] = config.attr(type=types.list(type=float, size=2))
origin: np.ndarray[float] = config.attr(type=types.ndarray(dtype=float))
axis: typing.Union[typing.Literal["x"], typing.Literal["y"], typing.Literal["z"]] = (
config.attr(type=types.in_(["x", "y", "z"]), default="y")
)
Expand All @@ -198,7 +198,7 @@ def get_targets(self, adapter, simulation, simdata):
model: simdata.populations[model][
np.sum(
simdata.placement[model].load_positions()[:, axes] - self.origin**2,
axis=0,
axis=1,
)
< self.radius**2
]
Expand Down

0 comments on commit 2a271b1

Please sign in to comment.