ApplyProfile#

class braintools.init.ApplyProfile(base, func)#

Apply an arbitrary function to a distance profile’s output.

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

weight_scaling(distances)[source]#

Calculate weight scaling factor based on distance.

Parameters:

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

Returns:

scaling – Weight scaling factors (typically between 0 and 1).

Return type:

ndarray