ANNarchy 5.0.0
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

  • ANNarchy
  • Core components
    • Network
    • Population
    • Projection
    • Monitor
    • PopulationView
    • Dendrite
  • Neuron and Synapse models
    • Neuron
    • Synapse
    • Parameter
    • Variable
    • Creating
    • Pruning
    • Constant
  • Neuron models
    • LeakyIntegrator
    • Izhikevich
    • IF_curr_exp
    • IF_cond_exp
    • IF_curr_alpha
    • IF_cond_alpha
    • HH_cond_exp
    • EIF_cond_alpha_isfa_ista
    • EIF_cond_exp_isfa_ista
  • Synapse models
    • Hebb
    • Oja
    • IBCM
    • STP
    • STDP
  • Inputs
    • InputArray
    • TimedArray
    • PoissonPopulation
    • TimedPoissonPopulation
    • SpikeSourceArray
    • HomogeneousCorrelatedSpikeTrains
    • CurrentInjection
    • DecodingProjection
    • ImagePopulation
    • VideoPopulation
  • Random Distributions
    • Uniform
    • DiscreteUniform
    • Normal
    • LogNormal
    • Exponential
    • Gamma
    • Binomial
  • Functions
    • add_function
    • functions
  • Callbacks
    • every
  • Utilities
    • report
    • timeit
    • sparse_random_matrix
    • sparse_delays_from_weights
    • magic_network
  • Convolution
    • Convolution
    • Pooling
    • Transpose
    • Copy
  • BOLD monitoring
    • BoldMonitor
    • BoldModel
    • balloon_RN
    • balloon_RL
    • balloon_CN
    • balloon_CL
    • balloon_maith2021
    • balloon_two_inputs
  • Tensorboard logging
    • Logger
  • ANN-to-SNN conversion
    • ANNtoSNNConverter
  • DEPRECATED Top-level API
    • setup
    • compile
    • clear
    • reset
    • set_seed
    • get_population
    • get_projection
    • populations
    • projections
    • monitors
    • simulate
    • simulate_until
    • step
    • enable_learning
    • disable_learning
    • get_time
    • set_time
    • get_current_step
    • set_current_step
    • dt
    • save
    • load
    • save_parameters
    • load_parameters
    • callbacks_enabled
    • disable_callbacks
    • enable_callbacks
    • clear_all_callbacks

On this page

  • Synapse
    • Parameters

Synapse

Synapse(
    self,
    parameters='',
    equations='',
    psp=None,
    operation='sum',
    pre_spike=None,
    post_spike=None,
    pre_axon_spike=None,
    functions=None,
    pruning=None,
    creating=None,
    name=None,
    description=None,
    extra_values={},
)

Base class to define a synapse model.

Synapses expect parameters as a dictionary and equations as a list of variable updates (including w if there is synaptic plasticity).

Rate-coded synapses can define psp and operation to modify synaptic transmission:

nonlinear_synapse = ann.Synapse( 
    psp = "log( (pre.r * w + 1 ) / (pre.r * w - 1) )",
    operation = 'max',
)

Spiking synapses can define event-based rules, such as pre_spike (a pre-synaptic spike arrives at the synapse) and post_spike (the post-synaptic neuron emits a spike):

STDP = ann.Synapse(
    parameters = dict(
        tau_pre = 10.0,
        tau_post = 10.0,
        cApre = 0.01,
        cApost = 0.0105,
        wmax = 0.01,
    ),
    equations = [
        ann.Variable('tau_pre * dApre/dt = - Apre', method='event-driven'),
        ann.Variable('tau_post * dApost/dt = - Apost', method='event-driven'),
    ],
    pre_spike = '''
        g_target += w
        Apre += cApre * wmax
        w = clip(w - Apost, 0.0 , wmax)
    ''',                  
    post_spike = '''
        Apost += cApost * wmax
        w = clip(w + Apre, 0.0 , wmax)
    ''' 
)

Parameters

Name Type Description Default
parameters str | dict dictionary of parameters and their initial value. ''
equations str | list list of equations defining the temporal evolution of variables. ''
psp str continuous influence of a single synapse on the post-synaptic neuron (default for rate-coded: w*pre.r). Synaptic transmission in spiking synapses occurs in pre_spike. None
operation str operation (sum, max, min, mean) performed by the post-synaptic neuron on the individual psp (rate-coded only). 'sum'
pre_spike str | list updating of variables when a pre-synaptic spike is received (spiking only). None
post_spike str | list updating of variables when a post-synaptic spike is emitted (spiking only). None
pre_axon_spike str updating of variables when an axonal spike was emitted (spiking only, default None). The usage of this arguments prevents the application of learning rules. None
functions str additional functions used in the equations. None
pruning str Condition for pruning the synapse. None
creating str Condition for creating the synapse. None
name str name of the synapse type (used for reporting only). None
description str short description of the synapse type (used for reporting). None
Neuron
Parameter
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker