Skip to content

Commit

Permalink
add test for visualizing mixed morphologies
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Dec 11, 2023
1 parent 8410d04 commit d2145d6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_plotting_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,28 @@ def test_vis_networks_built_from_scartch():
_, ax = plt.subplots(1, 1, figsize=(3, 3))
net.cell(0).move(0, 100)
ax = net.vis(detail="full", ax=ax)


def test_mixed_network():
dirname = os.path.dirname(__file__)
fname = os.path.join(dirname, "morph.swc")
cell1 = jx.read_swc(fname, nseg=4)

comp = jx.Compartment()
branch = jx.Branch(comp, 4)
cell2 = jx.Cell(branch, parents=[-1, 0, 0, 1, 1])

conns = [
jx.Connectivity(
GlutamateSynapse(),
[jx.Connection(0, 0, 0.0, 1, 0, 0.0), jx.Connection(0, 0, 0.0, 1, 1, 0.0)],
)
]

net = jx.Network([cell1, cell2], conns)

net.compute_xyz()
net.cell(0).move(0, 800)
net.cell(1).move(0, -800)

_ = net.vis(detail="full")

0 comments on commit d2145d6

Please sign in to comment.