single_cell_parsercell_modify_functions

cell_modify_functions

Modify the cell after it is initalized.

Such a function can for example be used to scale the apical dendrite diameter.

If a cell has been modified this way, the cell parameter file contains the key cell_modify_functions in its neuron section. This is a nested dictionary, where the keys are the names of the cell modification functions, and the values are the keyword arguments as a dictionary.

See also

The Cell parameters file format.

Example:

>>> cell_parameters.neuron.cell_modify_functions
{'scale_apical': {'scale': 1.5}}
>>> from single_cell_parser.cell_modify_functions import get
>>> fun = get('scale_apical')
>>> fun
<function scale_apical at 0x7f0c3f2b6e18>
>>> print(fun.__doc__)
Scale the apical dendrite of a cell.

Args:
    cell (:py:class:`~single_cell_parser.cell.Cell`): The cell to scale.
    scale (float): The scaling factor.
    compartment (str): The compartment to scale.
        If "ApicalDendrite", the cell is assumed to have sections with label "ApicalDendrite".
        If "Trunk", the cell is assumed to have ``detailed_labels`` assigned manually, or by :py:meth:`biophysics_fitting.utils.augment_cell_with_detailed_labels`.
        Currently, only "ApicalDendrite" and "Trunk" are supported compartments.

Returns:
    :py:class:`~single_cell_parser.cell.Cell`: The scaled cell.

Raises:
    ValueError: If the compartment is not "ApicalDendrite" or "Trunk".

Functions

get(funname)

Get a cell modification function by their name.

Modules

BAC_injection

Injects the BAC stimulus [2] at a specified distance.

apical_current_injection

Inject a current at a given distance from the soma.

apical_epsp_injection

Injects an epsp-shaped current at a certain distance from the soma.

blender_recorder

-

scale_apical

Scale the apical dendrite of a cell.

soma_current_injection

Inject a step current at the soma.

synaptic_input

Add synaptic activations to the cell from a network.