Skip to content

Commit fddc57c

Browse files
committed
Tests
1 parent 6552c93 commit fddc57c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
plotter = pv.Plotter()
2929

3030

31-
add_neuroml_model(plotter)
31+
add_neuroml_model(plotter, somas_only=True)
3232
plotter.set_background("white")
3333
plotter.add_axes()
3434

neuromlmodel.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from neuroml import Cell
88

99

10-
def add_neuroml_model(pl):
10+
def add_neuroml_model(pl, somas_only=False):
1111
filename = "c302_D_Full.net.nml"
1212

1313
nml_doc = pynml.read_neuroml2_file(filename, include_includes=True)
@@ -43,6 +43,8 @@ def add_neuroml_model(pl):
4343
d = seg.distal
4444
width = (p.diameter + d.diameter) / 4
4545
# print("Creating %s" % (seg))
46+
if somas_only and seg.id != 0:
47+
continue
4648

4749
if cell.get_segment_length(seg.id) == 0:
4850
seg_mesh = pv.Sphere(
@@ -80,7 +82,7 @@ def add_neuroml_model(pl):
8082
if __name__ == "__main__":
8183
pl = pv.Plotter()
8284

83-
add_neuroml_model(pl)
85+
add_neuroml_model(pl, somas_only=True)
8486
pl.set_background("white")
8587
pl.add_axes()
8688

0 commit comments

Comments
 (0)