single_cell_parsercellCell

Cell

class single_cell_parser.cell.Cell

Cell object providing API to the NEURON hoc interface.

This class contains the neuron cell morphology, biophysical parameters, and simulation data of single-cell simulations. The main purpose is to be a dataclass containing this information, but not to create or configure it on its own. Its attributes are set by CellParser.

See also

This is not the same class as singlecell_input_mapper.singlecell_input_mapper.cell.Cell. This class concerns itself with providing API to NEURON, not with mapping input to the cell.

Attributes:

hoc_path

Path to the hoc file containing the cell morphology.

Type:

str

id

ID of the cell (often unused).

Type:

str | int, optional

soma

The soma section of the cell.

Type:

PySection

tree

NEURON SectionList containing all sections of the cell.

Type:

neuron.h.SectionList

branches

maps the section ID (str) of the root section of each dendritic subtree to its corresponding section list (neuron.h.SectionList).

Type:

dict

structures

All sections, aggregated by label (e.g. Dendrite, ApicalDendrite, ApicalTuft, Myelin…). Keys are labels (str), values are lists of PySection objects.

Type:

Dict[PySection]

sections

List of PySection objects. First element is the soma. Each section contains recorded data (if any was recorded, e.g. membrane voltage): a 2D array where axis 0 is segment number, and axis 1 is time.

Type:

List[PySection]

synapses

a dictionary of lists of single_cell_parser.synapse.Synapse objects

Type:

dict

E

Default resting membrane potential. Defaults to -70.0

Type:

float

changeSynParamDict

dictionary of network parameter sets with keys corresponding to time points. Allows automatic update of parameter sets according to their relative timing.

Type:

dict

tVec

a hoc Vector recording time.

Type:

neuron.h.Vector

neuron_param

The Cell parameters.

section_adjacency_map

maps each section (by ID) to its parent sections and children sections.

Type:

dict

Methods:

re_init_cell(replayMode)

Re-initialize for next simulation run.

record_range_var(var, mech)

Record a range mechanism in all sections.

get_range_var_conductances(density)

Get the conductances of each section, categorized by range variable and segment.

distance_between_pts(sec1, x1, sec2, x2)

Computes the path length between two points.

distance_to_soma(sec, x)

Computes the path length between the soma and a specified point.

max_distance(label)

Computes maximum path length to soma of all branches with label label

add_synapse(secID, ptID, ptx, preType, postType)

Add a Synapse to the cell object.

remove_synapses(preType)

Remove synapses from the cell object of type preType.

init_time_recording()

Initialize the NEURON time vector for recording.

get_synapse_activation_dataframe(max_spikes, sim_trial_index)

Get a Synapse activation dataframe.

get_section_adjacancy_map()

Generates a map that shows which sections are connected to which sections.