bluecellulab.psection

Represents a python version of NEURON Section (for drawing).

Functions

init_psections(hoc_cell)

Initialize the psections list.

Classes

PSection(hsection[, isec])

Class that represents a cell section.

class bluecellulab.psection.PSection(hsection, isec=None)[source]

Class that represents a cell section.

Parameters:
  • hsection (HocObject)

  • isec (int | None)

add_pchild(pchild)[source]

Add a python represent of a child section.

Parameters:

pchild (PSection)

Return type:

None

all_descendants()[source]

Return all the psection that are descendants of this psection.

Return type:

list[PSection]

getSectionVarBounds(variable)[source]

Get bounds a variable in a section.

getTreeVarBounds(variable)[source]

Get the bounds of a variable in a dendritic subtree.

property hchildren: list[<TopLevelHocInterpreter>]

Return a list with the hoc sections of the children.

property hparent: NeuronSection | None

Return the hoc section of the parent.

property is_leaf: bool

Return true if section is a leaf in the morphological structure.

property section_type: str

Return the type of the section.

tree_height()[source]

Height of dendritic tree.

Return type:

float

tree_width()[source]

Width of a dendritic tree.

Return type:

float

bluecellulab.psection.init_psections(hoc_cell)[source]

Initialize the psections list.

This list contains the Python representation of the psections of this morphology.

Parameters:

hoc_cell (HocObject)

Return type:

tuple[dict[int, PSection], dict[str, PSection]]