bsb.connectivity.detailed package#

Submodules#

bsb.connectivity.detailed.fiber_intersection module#

class bsb.connectivity.detailed.fiber_intersection.FiberIntersection(*args, _parent=None, _key=None, **kwargs)[source]#

Bases: Intersectional, ConnectionStrategy

FiberIntersection connection strategies voxelize a fiber and find its intersections with postsynaptic cells. It’s a specific case of VoxelIntersection.

For each presynaptic cell, the following steps are executed:

  1. Extract the FiberMorphology

  2. Interpolate points on the fiber until the spatial resolution is respected

  3. transform

  4. Interpolate points on the fiber until the spatial resolution is respected

  5. Voxelize (generates the voxel_tree associated to this morphology)

  6. Check intersections of presyn bounding box with all postsyn boxes

  7. Check intersections of each candidate postsyn with current presyn voxel_tree

affinity#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

assert_voxelization(morphology, compartment_types)[source]#
connect()[source]#
contacts#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

get_node_name()#
interpolate_branches(branches)[source]#
intersect_voxel_tree(from_voxel_tree, to_cloud, to_pos)[source]#

Similarly to intersect_clouds from VoxelIntersection, it finds intersecting voxels between a from_voxel_tree and a to_cloud set of voxels

Parameters:
  • from_voxel_tree – tree built from the voxelization of all branches in the fiber (in absolute coordinates)

  • to_cloud (VoxelCloud) – voxel cloud associated to a to_cell morphology

  • to_pos (list) – 3-D position of to_cell neuron

resolution#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

to_plot#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

transformation#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

voxelize_branches(branches, position, bounding_box=None, voxel_tree=None, map=None, voxel_list=None)[source]#
class bsb.connectivity.detailed.fiber_intersection.FiberTransform[source]#

Bases: ABC

boot()[source]#
abstract transform_branch()[source]#
transform_branches(branches, offset=None)[source]#
class bsb.connectivity.detailed.fiber_intersection.QuiverTransform[source]#

Bases: FiberTransform

QuiverTransform applies transformation to a FiberMorphology, based on an orientation field in a voxelized volume. Used for parallel fibers.

casts = {'vol_res': <class 'float'>}#
defaults = {'quivers': None, 'vol_res': 10.0, 'vol_start': [0.0, 0.0, 0.0]}#
get_branch_direction(branch)[source]#
transform_branch(branch, offset)[source]#

Compute bending transformation of a fiber branch (discretized according to original compartments and configured resolution value). The transformation is a rotation of each segment/compartment of each fiber branch to align to the cross product between the orientation vector and the transversal direction vector (i.e. cross product between fiber morphology/parent branch orientation and branch direction): compartment[n+1].start = compartment[n].end cross_prod = orientation_vector X transversal_vector or transversal_vector X orientation_vector compartment[n+1].end = compartment[n+1].start + cross_prod * length_comp

Parameters:

branch (:~class:.morphologies.Branch) – a branch of the current fiber to be transformed

Returns:

a transformed branch

Return type:

:~class:.morphologies.Branch

validate()[source]#

bsb.connectivity.detailed.shared module#

class bsb.connectivity.detailed.shared.Intersectional[source]#

Bases: object

affinity#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

candidate_intersection(target_coll, candidate_coll)[source]#
get_region_of_interest(chunk)[source]#

bsb.connectivity.detailed.touch_detection module#

class bsb.connectivity.detailed.touch_detection.TouchDetector(*args, _parent=None, _key=None, **kwargs)[source]#

Bases: Intersectional, ConnectionStrategy

Connectivity based on intersection of detailed morphologies

allow_zero_contacts#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

cell_intersection_plane#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

cell_intersection_radius#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

compartment_intersection_plane#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

compartment_intersection_radius#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

connect(pre, post)[source]#
contacts#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

get_compartment_intersections(touch_info, from_pos, to_pos)[source]#
get_node_name()#
get_search_radius(cell_type)[source]#
intersect_cells(touch_info)[source]#
intersect_compartments(touch_info, candidate_map)[source]#
class bsb.connectivity.detailed.touch_detection.TouchInformation(from_cell_type, from_cell_compartments, to_cell_type, to_cell_compartments)[source]#

Bases: object

bsb.connectivity.detailed.voxel_intersection module#

class bsb.connectivity.detailed.voxel_intersection.VoxelIntersection(*args, _parent=None, _key=None, **kwargs)[source]#

Bases: Intersectional, ConnectionStrategy

This strategy finds overlap between voxelized morphologies.

cache#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

connect(pre, post)[source]#
contacts#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

favor_cache#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

get_node_name()#
voxels_post#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

voxels_pre#

Base implementation of all the different configuration attributes. Call the factory function attr() instead.

bsb.connectivity.detailed.voxel_intersection.ichain(iterable, /)#

Alternative chain() constructor taking a single iterable argument that evaluates lazily.

Module contents#