Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SectionList iteration no longer changes CAS. #6

Merged
merged 1 commit into from
May 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions PyPNS/axonClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def collect_geometry_neuron(self):

#loop over all segments
for sec in self.allseclist:
n3d = int(h.n3d())
n3d = int(sec.n3d())
nseg = sec.nseg
gsen2 = 1./2/nseg
if n3d > 0:
Expand All @@ -129,10 +129,10 @@ def collect_geometry_neuron(self):
y = np.zeros(n3d)
z = np.zeros(n3d)
for i in range(n3d):
L[i] = h.arc3d(i)
x[i] = h.x3d(i)
y[i] = h.y3d(i)
z[i] = h.z3d(i)
L[i] = sec.arc3d(i)
x[i] = sec.x3d(i)
y[i] = sec.y3d(i)
z[i] = sec.z3d(i)
#normalize as seg.x [0, 1]
L /= sec.L

Expand All @@ -157,7 +157,7 @@ def collect_geometry_neuron(self):

#fill in values area, diam, length
for i, seg in enumerate(sec):
areavec[counter] = h.area(seg.x)
areavec[counter] = seg.area()
diamvec[counter] = seg.diam
lengthvec[counter] = sec.L/nseg
counter += 1
Expand Down Expand Up @@ -1107,4 +1107,5 @@ def delete_neuron_object(self):
self.nodes = None
self.FLUTs = None
self.MYSAs = None
self.STINs = None
self.STINs = None