myogen.simulator.neuron.network.Network.connect_one_to_one#
- Network.connect_one_to_one(
- source: str,
- target: str,
- probability: float = 1.0,
- weight__uS: Quantity__uS = DEFAULT_SYNAPTIC_WEIGHT,
- delay__ms: Quantity__ms = DEFAULT_SYNAPTIC_DELAY,
- threshold__mV: Quantity__mV = DEFAULT_SPIKE_THRESHOLD,
- inhibitory: bool = False,
Connect two neural populations with one-to-one mapping.
Creates individual connections between source[i] and target[i] for each neuron pair at matching indices with specified probability. This is particularly useful for modeling independent noise sources (e.g., independent Poisson drives) where each target neuron should receive input from exactly one source neuron.
- Parameters:
source (str) – Name of source population (must exist in populations dict).
target (str) – Name of target population (must exist in populations dict).
probability (float, optional) – Probability that each source[i] -> target[i] connection is made, by default 1.0. Must be between 0.0 and 1.0.
weight__uS (Quantity__uS, optional) – Synaptic weight in microsiemens, by default 0.6.
delay__ms (Quantity__ms, optional) – Synaptic delay in milliseconds, by default 1.0.
threshold__mV (Quantity__mV, optional) – Spike threshold in millivolts, by default -10.0.
inhibitory (bool, optional) – If True, connect to inhibitory synapses on target neurons (reversal < -40 mV). If False, connect to excitatory synapses (reversal >= -40 mV). Default False.
- Returns:
List of created NEURON NetCon objects for connections that were made.
- Return type:
list[h.NetCon]
- Raises:
ValueError – If source or target populations don’t exist, have different sizes, or probability is not in [0.0, 1.0].
Examples
>>> # Create independent noise for each motor neuron >>> noise_pool = DescendingDrive__Pool(n=10, poisson_batch_size=16, timestep__ms=0.05) >>> mn_pool = AlphaMN__Pool(n=10) >>> network = Network({"noise": noise_pool, "mn": mn_pool}) >>> network.connect_one_to_one("noise", "mn", weight__uS=0.5)