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

Allow changing ncomp after initialization #428

Closed
wants to merge 6 commits into from

Conversation

michaeldeistler
Copy link
Contributor

@michaeldeistler michaeldeistler commented Sep 21, 2024

This PR is a follow-up to #418 and #426. It allows to set nseg after initialization of the module. This is achieved 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, in which case it reuses the xyzr to compute optional radiuses:

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

@michaeldeistler michaeldeistler changed the title Allow setting ncomp after initialization Allow changing ncomp after initialization Sep 21, 2024
@michaeldeistler michaeldeistler changed the title Allow changing ncomp after initialization Allow changing ncomp after initialization Sep 21, 2024
@michaeldeistler michaeldeistler force-pushed the different-nseg-for-custom2 branch 7 times, most recently from dfdc887 to 62f8561 Compare September 23, 2024 23:09
Base automatically changed from different-nseg-for-custom2 to main September 23, 2024 23:17
@jnsbck
Copy link
Contributor

jnsbck commented Sep 25, 2024

just noticed that comb_branches_in_each_level is now obsolete. Could you rm it in this PR as well? :)

@michaeldeistler
Copy link
Contributor Author

Will do!

@michaeldeistler
Copy link
Contributor Author

Replaced by #436

@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.

2 participants