single_cell_parserreader_Edge

_Edge

class single_cell_parser.reader._Edge

Convenience class for NEURON segments.

Private class used in read_hoc_file() to store information about a single morphological segment spanning from point to point. These edges are loosely similar to NEURON segments if full segmentation is used, but should not be used as API to neuron segments. If \(d-\lambda\) segmentation is used, these edges are not comparable to NEURON segments.

The purpose of this class is for private use in reading in hoc files: it should not be invoked directly.

See also

determine_nseg() for determining the number of segments in a section, and API access to NEURON segments.

See also

singlecell_input_mapper.singlecell_input_mapper.reader._Edge for a similar class that is used in the singlecell_input_mapper module.

Attributes:

label

label and ID of the segment (e.g. “Dendrite_1_0_0”).

Type:

str

hocLabel

Hoc label of the segment (e.g. “Soma”, “Axon” …).

Type:

str

edgePts

List of points in the segment.

Type:

list

diameterList

List of diameters at each point.

Type:

list

parentID

label and ID of the parent segment.

Type:

int

parentConnect

How far along the parent section the connection is (i.e. the x-coordinate).

Type:

float

valid

Flag indicating if the segment is valid.

Type:

bool

Methods:

is_valid()

Check if this edge is valid.