MorphologyDistance#
- class braintools.conn.MorphologyDistance(sigma, decay_function='gaussian', compartment_mapping=None, weight=None, delay=None, allow_self_connections=False, **kwargs)#
Distance-dependent connectivity based on neuron positions.
Connection probabilities decay with the Euclidean distance between presynaptic and postsynaptic neuron positions (the soma positions passed as
pre_positions/post_positions); the chosen target compartments come fromcompartment_mapping. Positions are required.- Parameters:
sigma (
float|Quantity) – Characteristic distance scale for connectivity.decay_function (
str) – Distance decay function (‘gaussian’, ‘exponential’, ‘linear’).compartment_mapping (
Dict) – Mapping of which compartments can connect to which.weight (
Initialization|float|int|ndarray|Array|Quantity|None) – Weight initialization.delay (
Initialization|float|int|ndarray|Array|Quantity|None) – Delay initialization.allow_self_connections (
bool) – Whether a neuron may connect to itself. DefaultFalse.
Examples
>>> import brainunit as u >>> morph_dist = MorphologyDistance( ... sigma=50 * u.um, ... decay_function='gaussian', ... compartment_mapping={AXON: [BASAL_DENDRITE, APICAL_DENDRITE]} ... )