GaussianProfile#

class braintools.init.GaussianProfile(sigma, max_distance=None)#

Gaussian distance profile.

Connection probability and weight scaling follow a Gaussian (bell curve) profile.

Parameters:
  • sigma (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Standard deviation of the Gaussian profile.

  • max_distance (Array | ndarray | bool | number | bool | int | float | complex | Quantity | None) – Maximum connection distance (connections beyond this are set to 0).

Examples

>>> import numpy as np
>>> import brainunit as u
>>> from braintools.init import GaussianProfile
>>>
>>> profile = GaussianProfile(sigma=50.0 * u.um, max_distance=200.0 * u.um)
>>> distances = np.array([0, 25, 50, 100, 200]) * u.um
>>> probs = profile.probability(distances)
probability(distances)[source]#

Calculate connection probability based on distance.

Parameters:

distances (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Array of distances between neuron pairs.

Returns:

probability – Connection probabilities (values between 0 and 1).

Return type:

ndarray