sic_connection#

class brainpy.state.sic_connection(*args, **kwargs)#

NEST-compatible sic_connection synapse 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 scalar weight (a unitless multiplier of the astrocyte’s per-step SIC) and the integer delay_steps, validates the sender/receiver model pair, and is consumed by Simulator, which builds the routing — an as_current EventProjection that reads the astrocyte’s emission holder and deposits weight·SIC into 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_1994

  • Target models (handle SICEvent): aeif_cond_alpha_astro

Methods supports_connection() and check_connection() validate model compatibility at the model-name level.

3. Substrate delivery

On the Simulator substrate the astrocyte emits its per-step graded SIC continuously (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 its I_stim read so the device current and the SIC current never collide. The edge is one-way (a NEST SICEvent has no back-channel). delay_steps=1 (the NEST default / minimum delay) rides the substrate’s intrinsic one-step pipeline latency; a larger delay_steps adds (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 compiled for_loop.

Parameters:
  • weight (float, array-like, optional) – Unitless weight multiplying the astrocyte’s per-step SIC. 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

weight#

Validated scalar weight.

Type:

float

delay_steps#

Validated delay in steps (≥ 1).

Type:

int

name#

Optional instance identifier.

Type:

str or None

HAS_DELAY#

Class attribute, always True (supports delayed transmission).

Type:

bool

SUPPORTS_WFR#

Class attribute, always False (waveform relaxation not supported).

Type:

bool

SUPPORTED_SOURCES#

Valid source model names ('astrocyte_lr_1994').

Type:

tuple of str

SUPPORTED_TARGETS#

Valid target model names ('aeif_cond_alpha_astro').

Type:

tuple of str

Raises:

ValueError – If weight or delay_steps are not scalar, or if delay_steps < 1.

Notes

  • This class is the connection spec only. The per-step SIC is generated by the source model (astrocyte_lr_1994) and the membrane integration by the target (aeif_cond_alpha_astro); the Simulator builds 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 True if validation passes.

Return type:

bool

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 from get_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 key is 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 for delay_steps (NEST compatibility).

  • 'size_of' (int): Memory footprint in bytes (Python object overhead).

  • 'has_delay', 'supports_wfr', 'supported_sources', 'supported_targets': Connection properties (see properties()).

Return type:

dict[str, Any]

Notes

This method mirrors NEST’s GetStatus API, providing a snapshot of all connection parameters and capabilities. The delay key is an alias for delay_steps to maintain NEST naming conventions.

property properties#

Return connection capability flags and supported model types.

Returns:

Dictionary with keys:

  • 'has_delay' (bool): Always True for sic_connection.

  • 'supports_wfr' (bool): Always False (waveform relaxation not implemented).

  • 'supported_sources' (tuple[str, …]): Model names that can emit SICEvent.

  • 'supported_targets' (tuple[str, …]): Model names that can receive SICEvent.

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 (int or array-like) – New delay in simulation steps. Must be scalar integer >= 1.

Raises:

ValueError – If delay is not scalar integer or < 1.

set_delay_steps(delay_steps)[source]#

Update connection delay in simulation steps.

Parameters:

delay_steps (int or array-like) – New delay in steps. Must be scalar integer >= 1.

Raises:

ValueError – If delay_steps is 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 SetStatus API).

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 status dict.

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() and set_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 (float or array-like) – New synaptic weight. Must be scalar after conversion.

Raises:

ValueError – If weight is 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 in SUPPORTED_SOURCES ('astrocyte_lr_1994').

  • target_model (Any) – Target model (string name, class, or instance). Must be in SUPPORTED_TARGETS ('aeif_cond_alpha_astro').

Returns:

True if both models are in their respective supported lists, False otherwise.

Return type:

bool

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