DendriticTree

DendriticTree#

class braintools.conn.DendriticTree(branch_targeting, tree_structure=None, weight=None, delay=None, allow_self_connections=False, **kwargs)#

Dendritic tree connectivity with separate basal/apical probabilities.

Generates axon-to-dendrite connections using two independent connection probabilities: branch_targeting['proximal'] is applied to basal dendrites and branch_targeting['distal'] to apical dendrites. The 'proximal'/'distal' keys are treated purely as the basal/apical probabilities respectively (no actual proximal/distal position model).

Parameters:
  • branch_targeting (Dict) – Per-target connection probabilities. 'proximal' -> basal dendrite probability (default 0.5), 'distal' -> apical dendrite probability (default 0.3). Both must be in [0, 1].

  • tree_structure (Dict | None) – Reserved descriptive metadata about the dendritic tree. It is stored on the result metadata but does not affect connection generation.

  • 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. Default False.

Notes

Generation runs on the host with NumPy and cannot be traced by jax.jit, jax.vmap or jax.grad.

Changed in version 0.4.0: Connected pairs are sampled by drawing a binomial edge count and then that many distinct pairs, without a dense pre_size x post_size matrix, so time and memory grow with the number of edges. The edges for a given seed differ from 0.3 (same distribution).

Examples

>>> from braintools.conn import DendriticTree
>>> dend_tree = DendriticTree(
...     branch_targeting={'proximal': 0.8, 'distal': 0.2},
...     seed=0,
... )
>>> result = dend_tree(pre_size=50, post_size=50)
>>> result.n_connections
2450
generate(pre_size, post_size, pre_positions=None, post_positions=None, **kwargs)[source]#

Generate dendritic tree connections.

Return type:

ConnectionResult