singlecell_input_mapper
❭ singlecell_input_mapper
❭ synapse_mapper
❭ SynapseMapper
SynapseMapper¶
-
class singlecell_input_mapper.singlecell_input_mapper.synapse_mapper.SynapseMapper(cell=
None
, synDist=None
, isDensity=True
)¶ Assign synapses to neuron morphology from density meshes.
Poisson sample the synapse distribution mesh and assign them to a random point on the morphology that lies within the same voxel.
- Parameters:¶
cell (
Cell
) – Neuron morphology to map synapses onto.synDist (
ScalarField
) – Synapse distribution mesh.isDensity (bool) – If True, synapse distribution is interpreted as an average density. If False, synapse distribution is interpreted as an actual realization, and values are taken as is.
- Attributes:¶
- synDist¶
Synapse distribution mesh. Can be either a density or a realization (i.e. whole number values per voxel).
- Type:¶
- isDensity¶
Set to True if synapse distribution is interpreted as an average density. Set to False if synapse distribution is interpreted as an actual realization, and values are whole numbers.
- Type:¶
bool
- voxelEdgeMap¶
Dictionary mapping synapse distribution mesh coordinates on list with pairs of indices that correspond to the edge and edgePt ID of all morphology points inside that voxel.
- Type:¶
dict
- Methods:¶
create_synapses
(preType)Creates instantiation of synapses on cell from synapse distribution.
Fills
voxelEdgeMap
with voxel indices, and the section and point indices that the voxel contains._intersect_bboxes
(bbox1, bbox2)Check if two bounding boxes overlap
_pt_in_box
(pt, box)Check if a point is inside a bounding box.
_compute_path_length
(sec, x)Calculate the path length betwen the soma and location
x
on sectionsec