Skip to content

Commit

Permalink
small
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudon committed Nov 21, 2023
1 parent 2cd4c23 commit 301455f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions neurots/generate/orientations.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,13 @@ def prob(proposal):
)
params = self._parameters[tree_type]["orientation"]["values"]["params"]
p = _prob(val, *params)
if self._context is not None and "trunk_prob" in self._context: # pragma: no cover
p *= self._context["trunk_prob"](proposal, self._soma.center)

if self._context is not None and self._context.get(
"constraints", []
): # pragma: no cover
for constraint in self._context["constraints"]:
if "trunk_prob" in constraint:
p *= constraint["trunk_prob"](proposal, self._soma.center)
return p

def default_propose():
Expand Down

0 comments on commit 301455f

Please sign in to comment.