bsb.connectivity.geometric package

Submodules

bsb.connectivity.geometric.geometric_shapes module

class bsb.connectivity.geometric.geometric_shapes.Cone(*args, _parent=None, _key=None, **kwargs)[source]

Bases: GeometricShape

A cone, described in cartesian coordinates.

apex

The coordinates of the apex of the cone.

check_inside(points: ndarray[float])[source]

Check if the points given in input are inside the geometric shape.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool array with same length as points, containing whether the -ith point is inside the geometric shape or not.

Return type:

numpy.ndarray

find_mbb()[source]

Compute the minimum bounding box surrounding the shape.

generate_point_cloud(npoints: int)[source]

Generate a point cloud made by npoints points.

Parameters:

npoints (int) – The number of points to generate.

Returns:

a (npoints x 3) numpy array.

Return type:

numpy.ndarray

get_node_name()
get_volume()[source]

Get the volume of the geometric shape. :return: The volume of the geometric shape. :rtype: float

origin

The coordinates of the center of the cone’s base.

radius

The radius of the base circle.

rotate(r_versor: ndarray[float], angle: float)[source]

Rotate all the shapes around r_versor, which is a versor passing through the origin, by the specified angle.

Parameters:
  • r_versor (numpy.ndarray[float]) – A versor specifying the rotation axis.

  • angle (float) – the rotation angle, in radians.

translate(t_vector)[source]

Translate the geometric shape by the vector t_vector.

Parameters:

t_vector (numpy.ndarray) – The displacement vector

wireframe_points(nb_points_1=30, nb_points_2=30)[source]

Generate a wireframe to plot the geometric shape. If a sampling of points is needed (e.g. for sphere), the wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

Coordinate components of the wireframe

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

class bsb.connectivity.geometric.geometric_shapes.Cuboid(*args, _parent=None, _key=None, **kwargs)[source]

Bases: GeometricShape

A rectangular parallelepiped, described in cartesian coordinates.

check_inside(points: ndarray[float])[source]

Check if the points given in input are inside the geometric shape.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool array with same length as points, containing whether the -ith point is inside the geometric shape or not.

Return type:

numpy.ndarray

find_mbb()[source]

Compute the minimum bounding box surrounding the shape.

generate_point_cloud(npoints: int)[source]

Generate a point cloud made by npoints points.

Parameters:

npoints (int) – The number of points to generate.

Returns:

a (npoints x 3) numpy array.

Return type:

numpy.ndarray

get_node_name()
get_volume()[source]

Get the volume of the geometric shape. :return: The volume of the geometric shape. :rtype: float

origin

The coordinates of the center of the barycenter of the bottom rectangle.

rotate(r_versor: ndarray[float], angle: float)[source]

Rotate all the shapes around r_versor, which is a versor passing through the origin, by the specified angle.

Parameters:
  • r_versor (numpy.ndarray[float]) – A versor specifying the rotation axis.

  • angle (float) – the rotation angle, in radians.

side_length_1

Length of one side of the base rectangle.

side_length_2

Length of the other side of the base rectangle.

top_center

The coordinates of the center of the barycenter of the top rectangle.

translate(t_vector: ndarray[float])[source]

Translate the geometric shape by the vector t_vector.

Parameters:

t_vector (numpy.ndarray) – The displacement vector

wireframe_points(**kwargs)[source]

Generate a wireframe to plot the geometric shape. If a sampling of points is needed (e.g. for sphere), the wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

Coordinate components of the wireframe

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

class bsb.connectivity.geometric.geometric_shapes.Cylinder(*args, _parent=None, _key=None, **kwargs)[source]

Bases: GeometricShape

A cylinder, described in cartesian coordinates.

check_inside(points: ndarray[float])[source]

Check if the points given in input are inside the geometric shape.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool array with same length as points, containing whether the -ith point is inside the geometric shape or not.

Return type:

numpy.ndarray

find_mbb()[source]

Compute the minimum bounding box surrounding the shape.

generate_point_cloud(npoints: int)[source]

Generate a point cloud made by npoints points.

Parameters:

npoints (int) – The number of points to generate.

Returns:

a (npoints x 3) numpy array.

Return type:

numpy.ndarray

get_node_name()
get_volume()[source]

Get the volume of the geometric shape. :return: The volume of the geometric shape. :rtype: float

origin

The coordinates of the center of the bottom circle of the cylinder.

radius

The radius of the base circle.

rotate(r_versor: ndarray[float], angle: float)[source]

Rotate all the shapes around r_versor, which is a versor passing through the origin, by the specified angle.

Parameters:
  • r_versor (numpy.ndarray[float]) – A versor specifying the rotation axis.

  • angle (float) – the rotation angle, in radians.

top_center

The coordinates of the center of the top circle of the cylinder.

translate(t_vector: ndarray[float])[source]

Translate the geometric shape by the vector t_vector.

Parameters:

t_vector (numpy.ndarray) – The displacement vector

wireframe_points(nb_points_1=30, nb_points_2=30)[source]

Generate a wireframe to plot the geometric shape. If a sampling of points is needed (e.g. for sphere), the wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

Coordinate components of the wireframe

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

class bsb.connectivity.geometric.geometric_shapes.Ellipsoid(*args, _parent=None, _key=None, **kwargs)[source]

Bases: GeometricShape

An ellipsoid, described in cartesian coordinates.

check_inside(points: ndarray[float])[source]

Check if the points given in input are inside the geometric shape.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool array with same length as points, containing whether the -ith point is inside the geometric shape or not.

Return type:

numpy.ndarray

find_mbb()[source]

Compute the minimum bounding box surrounding the shape.

generate_point_cloud(npoints: int)[source]

Generate a point cloud made by npoints points.

Parameters:

npoints (int) – The number of points to generate.

Returns:

a (npoints x 3) numpy array.

Return type:

numpy.ndarray

get_node_name()
get_volume()[source]

Get the volume of the geometric shape. :return: The volume of the geometric shape. :rtype: float

lambdas

The length of the three semi-axes.

origin

The coordinates of the center of the ellipsoid.

rotate(r_versor: ndarray[float], angle: float)[source]

Rotate all the shapes around r_versor, which is a versor passing through the origin, by the specified angle.

Parameters:
  • r_versor (numpy.ndarray[float]) – A versor specifying the rotation axis.

  • angle (float) – the rotation angle, in radians.

surface_point(theta, phi)[source]

Convert polar coordinates into their 3D location on the ellipsoid surface.

Parameters:
Returns:

surface coordinates

Return type:

float|numpy.ndarray[float]

translate(t_vector: ndarray)[source]

Translate the geometric shape by the vector t_vector.

Parameters:

t_vector (numpy.ndarray) – The displacement vector

v0
v1
v2
wireframe_points(nb_points_1=30, nb_points_2=30)[source]

Generate a wireframe to plot the geometric shape. If a sampling of points is needed (e.g. for sphere), the wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

Coordinate components of the wireframe

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

class bsb.connectivity.geometric.geometric_shapes.GeometricShape(*args, _parent=None, _key=None, **kwargs)[source]

Bases: ABC

Base class for geometric shapes

abstract check_inside(points: ndarray[float]) ndarray[bool][source]

Check if the points given in input are inside the geometric shape.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool array with same length as points, containing whether the -ith point is inside the geometric shape or not.

Return type:

numpy.ndarray

check_mbox(points: ndarray[float])[source]

Check if the points given in input are inside the minimal bounding box.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool np.ndarray specifying whether each point of the input array is inside the minimal bounding box or not.

Return type:

numpy.ndarray

epsilon

Tolerance value to compare coordinates.

abstract find_mbb()[source]

Compute the minimum bounding box surrounding the shape.

abstract generate_point_cloud(npoints: int)[source]

Generate a point cloud made by npoints points.

Parameters:

npoints (int) – The number of points to generate.

Returns:

a (npoints x 3) numpy array.

Return type:

numpy.ndarray

get_node_name()
abstract get_volume()[source]

Get the volume of the geometric shape. :return: The volume of the geometric shape. :rtype: float

abstract rotate(r_versor: ndarray[float], angle: float)[source]

Rotate all the shapes around r_versor, which is a versor passing through the origin, by the specified angle.

Parameters:
  • r_versor (numpy.ndarray[float]) – A versor specifying the rotation axis.

  • angle (float) – the rotation angle, in radians.

abstract translate(t_vector: ndarray[float])[source]

Translate the geometric shape by the vector t_vector.

Parameters:

t_vector (numpy.ndarray) – The displacement vector

type

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

abstract wireframe_points(nb_points_1=30, nb_points_2=30)[source]

Generate a wireframe to plot the geometric shape. If a sampling of points is needed (e.g. for sphere), the wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

Coordinate components of the wireframe

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

class bsb.connectivity.geometric.geometric_shapes.Parallelepiped(*args, _parent=None, _key=None, **kwargs)[source]

Bases: GeometricShape

A generic parallelepiped, described by the vectors (following the right-hand orientation) of the sides in cartesian coordinates

check_inside(points: ndarray[float])[source]

Check if the points given in input are inside the geometric shape.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool array with same length as points, containing whether the -ith point is inside the geometric shape or not.

Return type:

numpy.ndarray

find_mbb()[source]

Compute the minimum bounding box surrounding the shape.

generate_point_cloud(npoints: int)[source]

Generate a point cloud made by npoints points.

Parameters:

npoints (int) – The number of points to generate.

Returns:

a (npoints x 3) numpy array.

Return type:

numpy.ndarray

get_node_name()
get_volume()[source]

Get the volume of the geometric shape. :return: The volume of the geometric shape. :rtype: float

origin

The coordinates of the left-bottom edge.

rotate(r_versor: ndarray[float], angle: float)[source]

Rotate all the shapes around r_versor, which is a versor passing through the origin, by the specified angle.

Parameters:
  • r_versor (numpy.ndarray[float]) – A versor specifying the rotation axis.

  • angle (float) – the rotation angle, in radians.

side_vector_1

The first vector identifying the parallelepiped (using the right-hand orientation: the thumb).

side_vector_2

The second vector identifying the parallelepiped (using the right-hand orientation: the index).

side_vector_3

The third vector identifying the parallelepiped (using the right-hand orientation: the middle finger).

translate(t_vector: ndarray[float])[source]

Translate the geometric shape by the vector t_vector.

Parameters:

t_vector (numpy.ndarray) – The displacement vector

wireframe_points(**kwargs)[source]

Generate a wireframe to plot the geometric shape. If a sampling of points is needed (e.g. for sphere), the wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

Coordinate components of the wireframe

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

class bsb.connectivity.geometric.geometric_shapes.ShapesComposition(*args, _parent=None, _key=None, **kwargs)[source]

Bases: object

A collection of geometric shapes, which can be labelled to distinguish different parts of a neuron.

add_shape(shape: GeometricShape, labels: List[str])[source]

Add a geometric shape to the collection

Parameters:
  • shape (GeometricShape) – A GeometricShape to add to the collection.

  • labels (List[str]) – A list of labels for the geometric shape to add.

compute_n_points() List[int][source]

Compute the number of points to generate in a point cloud, using the dimension of the voxel specified in self._voxel_size.

Returns:

The number of points to generate.

Return type:

numpy.ndarray[int]

filter_by_labels(labels: List[str]) ShapesComposition[source]

Filter the collection of shapes, returning only the ones corresponding the given labels.

Parameters:

labels (List[str]) – A list of labels.

Returns:

A new ShapesComposition object containing only the shapes labelled as specified.

Return type:

ShapesComposition

find_mbb() Tuple[ndarray[float], ndarray[float]][source]

Compute the minimal bounding box containing the collection of shapes.

Returns:

The two corners individuating the minimal bounding box of the shapes collection.

Return type:

Tuple(numpy.ndarray[float], numpy.ndarray[float])

generate_point_cloud() ndarray[float] | None[source]

Generate a point cloud. The number of points to generate is determined automatically using the voxel size.

Returns:

A numpy.ndarray containing the 3D points of the cloud. If there are no shapes in the collection, it returns None.

Return type:

numpy.ndarray[float] | None

generate_wireframe(nb_points_1=30, nb_points_2=30) Tuple[List, List, List] | None[source]

Generate the wireframes of a collection of shapes. If a sampling of points is needed for certain shapes (e.g. for sphere), their wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

The x,y,z coordinates of the wireframe of each shape.

Return type:

Tuple[List[numpy.ndarray[numpy.ndarray[float]]]] | None

get_mbb_max()[source]

Returns the top corner of the minimum bounding box containing the collection of shapes.

Returns:

The top corner individuating the minimal bounding box of the shapes collection.

Return type:

numpy.ndarray[float]

get_mbb_min()[source]

Returns the bottom corner of the minimum bounding box containing the collection of shapes.

Returns:

The bottom corner individuating the minimal bounding box of the shapes collection.

Return type:

numpy.ndarray[float]

get_node_name()
get_volumes() List[float][source]

Compute the volumes of all the shapes.

Return type:

List[float]

inside_mbox(points: ndarray[float]) ndarray[bool][source]

Check if the points given in input are inside the minimal bounding box of the collection.

Parameters:

points (numpy.ndarray) – An array of 3D points.

Returns:

A bool np.ndarray specifying whether each point of the input array is inside the minimal bounding box of the collection.

Return type:

numpy.ndarray[bool]

inside_shapes(points: ndarray[float]) ndarray[bool] | None[source]

Check if the points given in input are inside at least in one of the shapes of the collection.

Parameters:

points (numpy.ndarray) – An array of 3D points.

Returns:

A bool numpy.ndarray specifying whether each point of the input array is inside the collection of shapes or not.

Return type:

numpy.ndarray[bool]

labels

List of lists of labels associated to each geometric shape.

shapes

List of GeometricShape that make up the neuron.

translate(t_vec: ndarray[float])[source]

Translate all the shapes in the collection by the vector t_vec. It also automatically translate the minimal bounding box.

Parameters:

t_vec (numpy.ndarray) – The displacement vector.

voxel_size

Dimension of the side of a voxel, used to determine how many points must be generated to represent the geometric shape.

class bsb.connectivity.geometric.geometric_shapes.Sphere(*args, _parent=None, _key=None, **kwargs)[source]

Bases: GeometricShape

A sphere, described in cartesian coordinates.

check_inside(points: ndarray[float])[source]

Check if the points given in input are inside the geometric shape.

Parameters:

points (numpy.ndarray) – A cloud of points.

Returns:

A bool array with same length as points, containing whether the -ith point is inside the geometric shape or not.

Return type:

numpy.ndarray

find_mbb()[source]

Compute the minimum bounding box surrounding the shape.

generate_point_cloud(npoints: int)[source]

Generate a point cloud made by npoints points.

Parameters:

npoints (int) – The number of points to generate.

Returns:

a (npoints x 3) numpy array.

Return type:

numpy.ndarray

get_node_name()
get_volume()[source]

Get the volume of the geometric shape. :return: The volume of the geometric shape. :rtype: float

origin

The coordinates of the center of the sphere.

radius

The radius of the sphere.

rotate(r_versor: ndarray[float], angle: float)[source]

Rotate all the shapes around r_versor, which is a versor passing through the origin, by the specified angle.

Parameters:
  • r_versor (numpy.ndarray[float]) – A versor specifying the rotation axis.

  • angle (float) – the rotation angle, in radians.

surface_function(theta, phi)[source]

Convert polar coordinates into their 3D location on the sphere surface.

Parameters:
Returns:

surface coordinates

Return type:

float|numpy.ndarray[float]

translate(t_vector: ndarray[float])[source]

Translate the geometric shape by the vector t_vector.

Parameters:

t_vector (numpy.ndarray) – The displacement vector

wireframe_points(nb_points_1=30, nb_points_2=30)[source]

Generate a wireframe to plot the geometric shape. If a sampling of points is needed (e.g. for sphere), the wireframe is based on a grid of shape (nb_points_1, nb_points_2).

Parameters:
  • nb_points_1 (int) – number of points sampled along the first dimension

  • nb_points_2 (int) – number of points sampled along the second dimension

Returns:

Coordinate components of the wireframe

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

bsb.connectivity.geometric.geometric_shapes.inside_mbox(points: ndarray[float], mbb_min: ndarray[float], mbb_max: ndarray[float])[source]

Check if the points given in input are inside the minimal bounding box.

Parameters:
  • points (numpy.ndarray) – An array of 3D points.

  • mbb_min (numpy.ndarray) – 3D point representing the lowest coordinate of the minimal bounding box.

  • mbb_max (numpy.ndarray) – 3D point representing the highest coordinate of the minimal bounding box.

Returns:

A bool np.ndarray specifying whether each point of the input array is inside the minimal bounding box or not.

Return type:

numpy.ndarray[bool]

bsb.connectivity.geometric.geometric_shapes.rotate_3d_mesh_by_rot_mat(x: ndarray, y: ndarray, z: ndarray, rot_mat: ndarray)[source]

Rotate meshgrid points according to a rotation matrix.

Parameters:
Returns:

Rotated x, y, z coordinate points

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

bsb.connectivity.geometric.geometric_shapes.rotate_3d_mesh_by_vec(x: ndarray, y: ndarray, z: ndarray, rot_versor: ndarray, angle: float)[source]

Rotate meshgrid points according to a rotation versor and angle.

Parameters:
Returns:

Rotated x, y, z coordinate points

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

bsb.connectivity.geometric.geometric_shapes.translate_3d_mesh_by_vec(x: ndarray, y: ndarray, z: ndarray, t_vec: ndarray)[source]

Translate meshgrid points according to a 3d vector.

Parameters:
Returns:

Translated x, y, z coordinate points

Return type:

Tuple[numpy.ndarray[numpy.ndarray[float]]

bsb.connectivity.geometric.geometric_shapes.uniform_surface_sampling(n_points, surface_function, theta_min=0, theta_max=6.283185307179586, phi_min=0, phi_max=3.141592653589793, precision=25)[source]

Uniform-like random sampling of polar coordinates based on surface estimation. This sampling is useful on elliptic surfaces (e.g. sphere). Algorithm based on https://github.com/maxkapur/param_tools

Parameters:
  • n_points (int) – number of points to sample

  • surface_function (Callable[..., numpy.ndarray[float]]) – function converting polar coordinates into cartesian coordinates

  • precision (int) – size of grid used to estimate function surface

bsb.connectivity.geometric.geometric_shapes.uniform_surface_wireframe(n_points_1, n_points_2, surface_function, theta_min=0, theta_max=6.283185307179586, phi_min=0, phi_max=3.141592653589793, precision=25)[source]

Uniform-like meshgrid of size (n_point_1, n_points_2) of polar coordinates based on surface estimation. This meshgrid is useful on elliptic surfaces (e.g. sphere). Algorithm based on https://github.com/maxkapur/param_tools

Parameters:
  • surface_function (Callable[..., numpy.ndarray[float]]) – function converting polar coordinates into cartesian coordinates

  • precision (int) – size of grid used to estimate function surface

bsb.connectivity.geometric.morphology_shape_intersection

class bsb.connectivity.geometric.morphology_shape_intersection.MorphologyToShapeIntersection(*args, _parent=None, _key=None, **kwargs)[source]

Bases: ConnectionStrategy

affinity

Ratio of apositions to keep over the total number of contact points

connect(pre, post)[source]
get_node_name()
get_region_of_interest(chunk)[source]

Returns the list of chunks containing the potential postsynaptic neurons, based on a chunk containing the presynaptic neurons.

Parameters:

chunk (bsb.storage._chunks.Chunk) – Presynaptic chunk

Returns:

List of postsynaptic chunks

Return type:

List[bsb.storage._chunks.Chunk]

postsynaptic: Hemitype

Postsynaptic (target) neuron population

pruning_ratio

Ratio of conections to keep over the total number of apositions

bsb.connectivity.geometric.morphology_shape_intersection.overlap_boxes(box1_min, box1_max, box2_min, box2_max)[source]

Check if two minimal bounding box are overlapping.

Parameters:
  • box1_min (numpy.ndarray) – 3D point representing the lowest coordinate of the minimal bounding box.

  • box1_max (numpy.ndarray) – 3D point representing the highest coordinate of the minimal bounding box.

  • box2_min (numpy.ndarray) – 3D point representing the lowest coordinate of the minimal bounding box.

  • box2_max (numpy.ndarray) – 3D point representing the highest coordinate of the minimal bounding box.

bsb.connectivity.geometric.shape_morphology_intersection

class bsb.connectivity.geometric.shape_morphology_intersection.ShapeToMorphologyIntersection(*args, _parent=None, _key=None, **kwargs)[source]

Bases: ConnectionStrategy

affinity

Ratio of apositions to keep over the total number of contact points

connect(pre, post)[source]
get_node_name()
get_region_of_interest(chunk)[source]

Returns the list of chunks containing the potential postsynaptic neurons, based on a chunk containing the presynaptic neurons.

Parameters:

chunk (bsb.storage._chunks.Chunk) – Presynaptic chunk

Returns:

List of postsynaptic chunks

Return type:

List[bsb.storage._chunks.Chunk]

presynaptic: Hemitype

Presynaptic (source) neuron population

pruning_ratio

Ratio of conections to keep over the total number of apositions

bsb.connectivity.geometric.shape_shape_intersection

class bsb.connectivity.geometric.shape_shape_intersection.ShapeHemitype(*args, _parent=None, _key=None, **kwargs)[source]

Bases: Hemitype

Class representing a population of cells to connect with a ConnectionStrategy. These cells’ morphology is implemented as a ShapesComposition.

get_mbb(chunks, chunk_dimension)[source]

Get the list of minimal bounding box containing all cells in the ShapeHemitype.

Parameters:
  • chunks (List[bsb.storage._chunks.Chunk]) – List of chunks containing the cell types (see bsb.connectivity.strategy.Hemitype.get_all_chunks)

  • chunk_dimension (float) – Size of a chunk

Returns:

List of bounding boxes in the form [min_x, min_y, min_z, max_x, max_y, max_z] for each chunk containing cells.

Return type:

List[numpy.ndarray[float, float, float, float, float, float]]

get_node_name()
shapes_composition

Composite shape representing the Hemitype.

class bsb.connectivity.geometric.shape_shape_intersection.ShapeToShapeIntersection(*args, _parent=None, _key=None, **kwargs)[source]

Bases: ConnectionStrategy

affinity

Ratio of apositions to keep over the total number of contact points

connect(pre, post)[source]
get_node_name()
get_region_of_interest(chunk)[source]

Returns the list of chunks containing the potential postsynaptic neurons, based on a chunk containing the presynaptic neurons.

Parameters:

chunk (bsb.storage._chunks.Chunk) – Presynaptic chunk

Returns:

List of postsynaptic chunks

Return type:

List[bsb.storage._chunks.Chunk]

postsynaptic: Hemitype

Postsynaptic (target) neuron population

presynaptic: Hemitype

Presynaptic (source) neuron population

pruning_ratio

Ratio of conections to keep over the total number of apositions