Skip to content

Commit

Permalink
Use a constant to store the default diameter value
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-berchet committed Sep 21, 2023
1 parent 09558ee commit 1f25229
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions neurots/generate/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@

L = logging.getLogger("neurots")

# LAMBDA: parameter that defines the slope of exponential probability
LAMBDA = 1.0
"""Parameter that defines the slope of exponential probability."""

DEFAULT_DIAMETER = 1
"""The default diameter used to add new sections before they are diametrized later."""

growth_algorithms = {
"tmd": tmdgrower.TMDAlgo,
Expand Down Expand Up @@ -230,7 +233,7 @@ def append_section(self, section):
return append_fun(
PointLevel(
np.array(section.points).tolist(),
[1] * len(section.points),
[DEFAULT_DIAMETER] * len(section.points),
),
SectionType(self.params["tree_type"]),
)
Expand Down

0 comments on commit 1f25229

Please sign in to comment.