Skip to content

Commit

Permalink
Update fragments_graph.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-grim authored Nov 19, 2024
1 parent e749317 commit 8d161a7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/deep_neurographs/fragments_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def add_component(self, irreducibles):
# Edges
for (i, j), attrs in irreducibles["edge"].items():
edge = (ids[i], ids[j])
idxs = util.spaced_idxs(attrs["radius"], self.node_spacing)
idxs = util.spaced_idxs(len(attrs["radius"]), self.node_spacing)
for key in ["radius", "xyz"]:
attrs[key] = attrs[key][idxs]
self.__add_edge(edge, attrs, swc_id)
Expand Down Expand Up @@ -996,8 +996,7 @@ def branch_to_zip(self, text_buffer, n_entries, i, j, parent, color):
branch_radius = np.flip(branch_radius, axis=0)

# Make entries
idxs = np.arange(1, len(branch_xyz))
for k in util.spaced_idxs(idxs, 6):
for k in util.spaced_idxs(len(branch_xyz), 5):
x, y, z = tuple(branch_xyz[k])
r = 6 if branch_radius[k] == 7.3141592 else 2

Expand Down

0 comments on commit 8d161a7

Please sign in to comment.