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

Set different nseg #427

Closed
wants to merge 6 commits into from
Closed

Set different nseg #427

wants to merge 6 commits into from

Conversation

michaeldeistler
Copy link
Contributor

@michaeldeistler michaeldeistler commented Sep 21, 2024

Follow-up to #418 and #426. This PR will allow to set nseg after initialization with a new set_ncomp method. This PR is the final requirement for a new release with these features.

Works for branches:

comp = jx.Compartment()
branch = jx.Branch(comp, nseg=2)
branch.set_ncomp(4)

...for branches within a cell:

comp = jx.Compartment()
branch = jx.Branch(comp, nseg=2)
cell = jx.Cell(branch, parents=[-1, 0, 0])
cell.branch(1).set_ncomp(4)

...and for branches read from SWC files (by actually reusing the xyzr to compute optional radiuses:

cell = jx.read_swc(fname, nseg=2)
cell.branch(1).set_ncomp(4)

@michaeldeistler michaeldeistler deleted the set-different-nseg branch September 29, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant