Domain

class dendrotweaks.morphology.domains.Domain(name: str, sections=None)[source]

Bases: object

A class representing a morphological or functional domain in a neuron.

Parameters:
  • name (str) – The name of the domain.

  • sections (List[Section], optional) – A list of sections in the domain.

name

The name of the domain.

Type:

str

property sections

A list of sections in the domain.

add_section(sec: Section)[source]

Add a section to the domain.

Changes the domain attribute of the section.

Parameters:

sec (Section) – The section to be added to the domain.

remove_section(sec)[source]

Remove a section from the domain.

Sets the domain attribute of the section to None.

Parameters:

sec (Section) – The section to be removed from the domain.

is_empty()[source]

Check if the domain is empty.

Returns:

True if the domain is empty, False otherwise.

Return type:

bool