single_cell_parsercellPySection

PySection

class single_cell_parser.cell.PySection(name=None, cell=None, label=None)

Wrapper around nrn.Section providing additional functionality for geometry and mechanisms.

NEURON sections are objects of the form __nrnsec_0x------------, where the dashed code represents the memory pointer. Each section consists of nseg segments of equal length. Each segment is represented by __nrnsec_0x------------(x), which looks similar to the section representation, but has an additional (x): a relative coordinate representing the center point of the segment.

Iterating the section will provide the individual segments. Each segment consists of one or more points. Accessing a segment’s biophysical properties can be done as seg.<param>.<param_name>.

Example:

>>> sec = cell.soma
>>> for seg in sec:
...    print(seg.NaTa_t.gNaTa_tbar)
Parameters:
  • name (str, optional) – name of the section

  • cell (Cell, optional) – reference to the cell object

  • label (str, optional) – label of the section

Attributes:

label

label of the section (e.g. “Soma”, “Dendrite”, “Myelin”).

Type:

str

label_detailed

Detailed label of the section (e.g. “oblique”, “basal”, “trunk”). These are manually assigned or automatically generated by augment_cell_with_detailed_labels(). Used in scale_by_detailed_compartment().

Type:

str, optional

parent

reference to parent section.

Type:

PySection

parentx

connection point at parent section.

Type:

float

bounds

bounding box around 3D coordinates.

Type:

tuple

nrOfPts

number of traced 3D coordinates.

Type:

int

pts

list of traced 3D coordinates.

Type:

list

relPts

list of relative position of 3D points along section.

Type:

list

diamList

list of diameters at traced 3D coordinates.

Type:

list

area

total area of all NEURON segments in this section.

Type:

float

segPts

list of segment centers (x coordinate). Useful for looping akin to the hoc function for(x). Excluding 0 and 1.

Type:

list

segx

list of x values corresponding to center of each segment.

Type:

list

segDiams

list of diameters of each segment. Used for visualization purposes only.

Type:

list

recVList

list of neuron Vectors recording voltage in each compartment.

Type:

list

recordVars

dict of range variables recorded.

Type:

dict

Methods:

set_3d_geometry(pts, diams)

Invokes NEURON 3D geometry setup.

set_segments(nrOfSegments)

Set spatial discretization.

_get_seg_conductance(seg, var, param_name)

Get the conductance of a segment.

get_range_conductances(range_vars, density)

Get the transmembrane conductance of each range variable separately.

_compute_seg_diameters()

Computes the diameter of each segment in this section.

_compute_total_area()

Computes total area of all NEURON segments in this section

_compute_bounds()

Computes the bounding box around the 3D coordinates.

_compute_relative_pts()

Computes the relative position of 3D points along the section.

_compute_seg_pts()

Computes the 3D center points of each segment in this section.

_init_vm_recording()

Record the membrane voltage at every point in this section.

_re_init_vm_recording()

Reinitialize votage recordings

_re_init_range_var_recording()

Re-initialize the range mechanism recordings.

_init_range_var_recording(var, mech)

Initialize recording of a range mechanism.