single_cell_parsersynapse_mapperSynapseMapper

SynapseMapper

class single_cell_parser.synapse_mapper.SynapseMapper(cell=None, synDist=None, isDensity=True)

Assign synapses to a neuron morphology based on an existing synapse distribution.

For more fine-grained control over the creation of synapse distributions onto a morphology, please refer to the singlecell_input_mapper.singlecell_input_mapper package instead.

The synapse distribution can be:

See also

singlecell_input_mapper.singlecell_input_mapper.synapse_mapper.SynapseMapper for creating network realizations constrained with empirical data.

synDist can be read from a .syn file using read_synapse_realization().

Parameters:
  • cell (Cell) – The cell to map synapses onto.

  • synDist (dict | single_cell_parser.scalar_field.ScalarField) – Either a previously created synapse realization in dictionary form (see the .syn file type and read_synapse_realization() for more info) or a ScalarField of synapse densities.

  • isDensity (bool) – If True, then the synapse distribution is interpreted as an average density, and the actual number of synapses that will be assigned is drawn from a Poisson distribution. If False, then the synapse distribution synDist is interpreted as the actual number of synapses per voxel.

Attributes:

cell

The cell to map synapses onto.

Type:

Cell

synDist

The synapse distribution to map onto the cell.

Type:

dict | single_cell_parser.scalar_field.ScalarField | list

isDensity

Flag for distribution type: (1) density or (0) realization.

Type:

bool

voxelEdgeMap

Dictionary that maps voxel edges to (sectionID, pointID) pairs.

Type:

dict

Methods:

map_synapse_realization()

Maps previously created synapse realization onto neuron morphology.

map_pruned_synapse_realization()

Maps previously created synapse realization onto neuron

map_synapse_model_distribution(synType, structLabel)

Maps modeled synapse distribution (e.g. normal, uniform, …) onto dendritic tree.

create_synapses(preType)

Map synapses onto a morphology based on a synapse distribution.

_create_voxel_edge_map()

Fills dictionary voxelEdgeMap with indices of voxels pts within that voxel

_intersect_bboxes(bbox1, bbox2)

Check if two bounding boxes overlap

_pt_in_box(pt, box)

Check if a point is within a bounding box

_compute_path_length(sec, x)

Compute the path length to soma from location x on section sec