SynapseDensity¶
- class singlecell_input_mapper.udvary2022.synapse_mapper.SynapseDensity(cell, postCellType, connectionSpreadsheet, exTypes, inhTypes, exPST, inhPST)¶
Bases:
objectCompute synapse density mesh from a PST density mesh.
Given a PST density mesh, create a 3D mesh of synapse densities for a single postsynaptic neuron using
compute_synapse_density(). It is assumed thatexPSTandinhPSThave the same bounding box and voxel size. This density mesh is used inSynapseMapperto assign synapses to the postsynaptic neuron.This class is used in
NetworkMapperto compute synapse densities per presynaptic cell type for a given postsynaptic cell type and morphology.exPSTandinhPSTare density meshes for normalizing post-synaptic targets. Shown below is an example for such density field: the (25000, 50000, 75000, 100000) isosurfaces of the excitatory PST density field for a rat somatosensory cortex (pia and white matter shown in grey at the top and bottom).
Note
The only cell type specificity that is considered here is whether or not the postsynaptic cell is excitatory or inhibitory. Cell type wiring specificity is only considered in the network realization phase, when the synapse density field is Poisson sampled and normalized. Then the normalization values depend on the exact presynaptic cell type.
See also
See:
NetworkMapper- Parameters:¶
- cell : Cell¶
the postsynaptic neuron
- postCellType : str¶
cell type of the postsynaptic neuron
- connectionSpreadsheet : dict | DataFrame¶
spreadsheet containing length/surface area PST densities.
- exTypes : list¶
list of strings defining excitatory cell types.
- inhTypes : list¶
list of strings defining inhibitory cell types.
- exPST : ScalarField¶
normalization PST for connections with presynaptic excitatory cell types.
- inhPST : ScalarField¶
normalization PST for connections with presynaptic inhibitory cell types.
- Attributes:¶
- Methods:¶
compute_synapse_density_vectorized(boutonDensity, preCellType)Vectorized version of synapse density computation.
compute_synapse_density(boutonDensity, preCellType)Compute the density of synapses of a given presynaptic celltype onto the postsynaptic neuron.
Compute density of postsynaptic targets (PSTs) for each anatomical structure as a full bounding-box spanning mesh.
_compute_length_surface_area_density(likeAmira)Fills the scalar fields
lengthDensityandsurfaceDensityto contain length and area per structure per voxel._clip_u(pq, u1u2)Liang-Barsky clipping algorithm [14] for line segments in 3D.
_get_truncated_cone_area(height, radius1, radius2)Calculate the are of a truncated cone.
_interpolate_radius(p0, p1, radius0, radius1, targetPt)Interpolate the radius of a segment between two points.
Create an empty mesh for the postsynaptic neuron to match the mesh of the synapse distribution.
_intersect_bboxes(bbox1, bbox2)Check if two bounding boxes overlap
Documentation unclear, incomplete, broken or wrong? Let us know