BranchSpecific

BranchSpecific#

class braintools.conn.BranchSpecific(branch_indices=None, connection_prob=0.3, weight=None, delay=None, allow_self_connections=False, **kwargs)#

Branch-specific dendritic targeting.

Targets specific branches within the dendritic tree based on branch indices or branch-specific rules.

Parameters:
  • branch_indices (List[int] | None) – Specific branch indices to target. These map to compartment types. Default targets basal and apical dendrites.

  • connection_prob (float) – Connection probability per branch.

  • weight (Initialization | float | int | ndarray | Array | Quantity | None) – Weight initialization.

  • delay (Initialization | float | int | ndarray | Array | Quantity | None) – Delay initialization.

Notes

Branch indices are mapped to dendritic compartment types. By default: - Index 0, 1: BASAL_DENDRITE - Index 2+: APICAL_DENDRITE This can be extended with full morphological information.

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).

generate(pre_size, post_size, pre_positions=None, post_positions=None, **kwargs)[source]#

Generate branch-specific connections.

Return type:

ConnectionResult