Skip to content

extracting part of a cell, network etc. #249

@jnsbck

Description

@jnsbck

Hi,

I have a morphology

cell = jx.read_swc(f"morphology.swc", nseg=4, max_branch_len=300.0, min_radius=5.0)
cell.insert(HH())

but I want to simulate only a specific branch. I don't care about anything else that is attached. Since cell.branch(0) returns an instance of BranchView, the following does not work.

branch = cell.branch(0)

branch.comp(0).stimulate(current)
branch.record()

voltage = jx.integrate(branch)

Is this somehow possible, since I was not able to find an easy way to do this? If not it would be awesome to have this functionality.

i.e. by adding a .copy() method to the BranchView object, that returns a new instance of Branch

branch = cell.branch(0).copy()

branch..comp(0).stimulate(current)
branch.record()

voltage = jx.integrate(branch)

Same would be applicable to Cell and Comp. Would be happy to provide a PR if this functionality is otherwise non-trivially obtained.

Thanks for your input on this. :)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions