sic_connection#
- class brainpy.state.sic_connection(*args, **kwargs)#
NEST-compatible
sic_connectionsynapse model for astrocyte-to-neuron slow inward current (SIC) coupling.This class is the NEST-parity connection spec for
sic_connection(models/sic_connection.{h,cpp}): a one-way astrocyte->neuron edge carrying the slow inward current. It stores the scalarweight(a unitless multiplier of the astrocyte’s per-stepSIC) and the integerdelay_steps, validates the sender/receiver model pair, and is consumed bySimulator, which builds the routing — anas_currentEventProjectionthat reads the astrocyte’s emission holder and depositsweight·SICinto the neuron’s labelled'I_SIC'current channel each step.1. Biological Context
Astrocytes can modulate neuronal excitability through release of gliotransmitters, triggering slow inward currents (SICs) in nearby neurons. These currents typically arise from extrasynaptic NMDA receptors activated by glutamate released from astrocytes, producing depolarizing currents that persist for hundreds of milliseconds to seconds. This connection model represents the functional coupling between astrocyte dynamics and neuronal membrane conductance.
2. Supported Model Pairings
In standard NEST model sets:
Source models (emit
SICEvent):astrocyte_lr_1994Target models (handle
SICEvent):aeif_cond_alpha_astro
Methods
supports_connection()andcheck_connection()validate model compatibility at the model-name level.3. Substrate delivery
On the
Simulatorsubstrate the astrocyte emits its per-step gradedSICcontinuously (seam-(H) emission). The Simulator reads that emission holder and deposits\[I_{\text{SIC}} = w \cdot \mathrm{SIC}[n-1]\]into the neuron’s labelled
'I_SIC'current channel, which the neuron reads (and pops) before itsI_stimread so the device current and the SIC current never collide. The edge is one-way (a NESTSICEventhas no back-channel).delay_steps=1(the NEST default / minimum delay) rides the substrate’s intrinsic one-step pipeline latency; a largerdelay_stepsadds(delay_steps - 1)buffered steps. There is no host-side event queue: the SIC current is a State-backed channel, so the whole simulation lowers into one compiledfor_loop.- Parameters:
weight (
float,array-like, optional) – Unitless weight multiplying the astrocyte’s per-stepSIC. Must be scalar. Default:1.0.delay_steps (
int,array-like, optional) – Absolute event delay in simulation steps (NEST-style). Must be scalar integer>= 1. Default:1.name (
str, optional) – Model instance name for identification. Default:None.
Parameter Mapping
Parameter
NEST Name
Unit
Description
weight
weight
unitless
Coefficient scaling factor
delay_steps
delay
steps
Absolute transmission delay
- Raises:
ValueError – If
weightordelay_stepsare not scalar, or ifdelay_steps < 1.
Notes
This class is the connection spec only. The per-step
SICis generated by the source model (astrocyte_lr_1994) and the membrane integration by the target (aeif_cond_alpha_astro); theSimulatorbuilds the routing between them.Connection objects are stateless; all state (membrane conductances, SIC time courses) is maintained by source and target neuron models.
References
Examples
Basic connection setup:
>>> from brainpy import state as bp >>> conn = bp.sic_connection(weight=0.5, delay_steps=2) >>> conn.get_status() {'weight': 0.5, 'delay_steps': 2, 'delay': 2, ...}
Wire it on a Simulator (astrocyte -> neuron):
>>> import brainunit as u >>> sim = bp.Simulator(dt=0.1 * u.ms) >>> astro = sim.create(bp.astrocyte_lr_1994, 1) >>> neuron = sim.create(bp.aeif_cond_alpha_astro, 1) >>> proj = sim.connect(astro, neuron, synapse=bp.sic_connection(weight=0.5))
Validate model compatibility:
>>> bp.sic_connection.supports_connection( ... 'astrocyte_lr_1994', 'aeif_cond_alpha_astro' ... ) True >>> bp.sic_connection.check_connection( ... 'astrocyte_lr_1994', 'iaf_psc_alpha' ... ) ValueError: Unsupported sic_connection pair...
- classmethod check_connection(source_model, target_model)[source]#
Validate source-target model pair and raise error if incompatible.
- Parameters:
source_model (
Any) – Source model (string name, class, or instance).target_model (
Any) – Target model (string name, class, or instance).
- Returns:
Always returns
Trueif validation passes.- Return type:
- Raises:
ValueError – If the model pair is not supported (see
supports_connection()). Error message includes actual and expected model names.
Examples
>>> bp.sic_connection.check_connection( ... 'astrocyte_lr_1994', 'aeif_cond_alpha_astro' ... ) True >>> bp.sic_connection.check_connection( ... 'iaf_psc_alpha', 'aeif_cond_alpha_astro' ... ) ValueError: Unsupported sic_connection pair...
- get(key='status')[source]#
Retrieve connection parameter or full status dictionary.
- Parameters:
key (
str, optional) – Parameter name to retrieve. If'status'(default), returns full status dictionary fromget_status(). Otherwise, must be a valid status key (e.g.,'weight','delay','delay_steps').- Returns:
If
key == 'status': full status dictionary. Otherwise: value of the requested parameter.- Return type:
Any- Raises:
KeyError – If
keyis not'status'and not present in the status dictionary.
Examples
>>> conn = bp.sic_connection(weight=0.8, delay_steps=2) >>> conn.get('weight') 0.8 >>> conn.get('status')['delay'] 2
- get_status()[source]#
Return complete connection state and metadata.
- Returns:
Dictionary containing:
'weight'(float): Connection weight.'delay_steps'(int): Delay in simulation steps.'delay'(int): Alias fordelay_steps(NEST compatibility).'size_of'(int): Memory footprint in bytes (Python object overhead).'has_delay','supports_wfr','supported_sources','supported_targets': Connection properties (seeproperties()).
- Return type:
dict[str,Any]
Notes
This method mirrors NEST’s
GetStatusAPI, providing a snapshot of all connection parameters and capabilities. Thedelaykey is an alias fordelay_stepsto maintain NEST naming conventions.
- property properties#
Return connection capability flags and supported model types.
- Returns:
Dictionary with keys:
'has_delay'(bool): AlwaysTrueforsic_connection.'supports_wfr'(bool): AlwaysFalse(waveform relaxation not implemented).'supported_sources'(tuple[str, …]): Model names that can emitSICEvent.'supported_targets'(tuple[str, …]): Model names that can receiveSICEvent.
- Return type:
dict[str,Any]
Notes
This property provides introspection for connection compatibility checking and simulation infrastructure setup (e.g., delay buffer allocation).
- set_delay(delay)[source]#
Update connection delay (alias for
set_delay_steps()).- Parameters:
delay (
intorarray-like) – New delay in simulation steps. Must be scalar integer>= 1.- Raises:
ValueError – If
delayis not scalar integer or< 1.
- set_delay_steps(delay_steps)[source]#
Update connection delay in simulation steps.
- Parameters:
delay_steps (
intorarray-like) – New delay in steps. Must be scalar integer>= 1.- Raises:
ValueError – If
delay_stepsis not scalar integer or< 1.
Examples
>>> conn = bp.sic_connection(delay_steps=1) >>> conn.set_delay_steps(5) >>> conn.delay_steps 5
- set_status(status=None, **kwargs)[source]#
Update connection parameters (NEST
SetStatusAPI).- Parameters:
status (
dict[str,Any], optional) – Dictionary of parameters to update. Valid keys:'weight','delay','delay_steps'. Default:None.**kwargs – Additional keyword arguments merged with
statusdict.
- Raises:
ValueError – If both
'delay'and'delay_steps'are provided with different values, or if parameter values fail validation (non-scalar, delay < 1, etc.).
Notes
If both
'delay'and'delay_steps'are present, they must be identical (they are aliases in NEST).Validation is delegated to
set_weight()andset_delay_steps().Unknown keys are silently ignored (NEST-compatible behavior).
Examples
>>> conn = bp.sic_connection(weight=1.0, delay_steps=1) >>> conn.set_status(weight=2.5, delay=3) >>> conn.get_status()['weight'] 2.5 >>> conn.get_status()['delay_steps'] 3
- set_weight(weight)[source]#
Update connection weight.
- Parameters:
weight (
floatorarray-like) – New synaptic weight. Must be scalar after conversion.- Raises:
ValueError – If
weightis not scalar.
Examples
>>> conn = bp.sic_connection() >>> conn.set_weight(2.5) >>> conn.weight 2.5
- classmethod supports_connection(source_model, target_model)[source]#
Check if source-target model pair is compatible with
sic_connection.- Parameters:
source_model (
Any) – Source model (string name, class, or instance). Must be inSUPPORTED_SOURCES('astrocyte_lr_1994').target_model (
Any) – Target model (string name, class, or instance). Must be inSUPPORTED_TARGETS('aeif_cond_alpha_astro').
- Returns:
Trueif both models are in their respective supported lists,Falseotherwise.- Return type:
Examples
>>> bp.sic_connection.supports_connection( ... 'astrocyte_lr_1994', 'aeif_cond_alpha_astro' ... ) True >>> bp.sic_connection.supports_connection( ... 'iaf_psc_alpha', 'aeif_cond_alpha_astro' ... ) False