File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828plotter = pv .Plotter ()
2929
3030
31- add_neuroml_model (plotter )
31+ add_neuroml_model (plotter , somas_only = True )
3232plotter .set_background ("white" )
3333plotter .add_axes ()
3434
Original file line number Diff line number Diff line change 77from 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):
8082if __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
You can’t perform that action at this time.
0 commit comments