jaxley.morphology.morph_delete

Navigation

jaxley.morphology.morph_delete#

morph_delete(module_view)[source]#

Deletes part of a morphology.

This function can only delete entire branches. It does not support deleting compartments of a branch.

This function deletes all existing recordings, stimuli, trainable parameters, and channels.

Parameters:

module_view – View of a jx.Cell. Defines the branches to be deleted.

Returns:

A cell in which specified branches are deleted.

Return type:

Cell

Example usage#

cell = jx.read_swc("path_to_swc_file.swc", ncomp=1)
cell = morph_delete(cell.axon)
cell = jx.Cell(branch, parents=[-1, 0, 0, 1, 1])
cell = morph_delete(cell.branch([3, 4]))