superneuromat.Synapse#

class superneuromat.Synapse(snn=<object object>, idx: int = <object object>, *args, **kwargs)[source]#

Synapse accessor class for synapses in an SNN

Warning

Instances of Synapse are cached at access time as of v3.4.0. i.e. snn.synapses[0] is snn.synapses[0]. Prior to v3.4.0, new Synapse instances were created on each access.

Attributes:
delay

The delay of before a spike is sent to the post-synaptic neuron.

delay_chain

Returns a list of neurons in the delay chain for this synapse.

delay_chain_synapses

A list of synapses in the delay chain for this synapse.

m

The SNN that this object is associated with.

num_onmodel

The number of synapses in the SNN.

post

The post-synaptic neuron of this synapse.

post_id

The index of the post-synaptic neuron of this synapse.

pre

The pre-synaptic neuron of this synapse.

pre_id

The index of the pre-synaptic neuron of this synapse.

stdp_enabled

If True, STDP learning is enabled on this synapse.

weight

The weight of the synapse connecting the pre- and post-synaptic neurons.

Methods

info()

Returns a string containing information about this synapse.

info_row()

Returns a string containing information about this synapse for use in a table.

row_cont

row_header

property delay: int[source]#

The delay of before a spike is sent to the post-synaptic neuron.

Currently, the delay cannot be modified once set.

property delay_chain[source]#

Returns a list of neurons in the delay chain for this synapse.

The list is in the same order that spikes will pass through the chain.

Returns [] if synapse is not the last synapse in a delay chain.

property delay_chain_synapses[source]#

A list of synapses in the delay chain for this synapse.

The list is in the same order that spikes will pass through the chain.

Returns [] if synapse is not the last synapse in a delay chain.

info()[source]#

Returns a string containing information about this synapse.

Note that a dash - is used to represent that the synapse is the last in a delay chain. See create_synapse().

info_row()[source]#

Returns a string containing information about this synapse for use in a table.

Note that a dash - is used to represent that the synapse is the last in a delay chain. See create_synapse().

property m[source]#

The SNN that this object is associated with.

property num_onmodel[source]#

The number of synapses in the SNN.

See also

SNN.num_synapses, SynapseList.__len__

property post: Neuron[source]#

The post-synaptic neuron of this synapse.

property post_id: int[source]#

The index of the post-synaptic neuron of this synapse.

property pre: Neuron[source]#

The pre-synaptic neuron of this synapse.

property pre_id: int[source]#

The index of the pre-synaptic neuron of this synapse.

property stdp_enabled: bool[source]#

If True, STDP learning is enabled on this synapse.

property weight: float[source]#

The weight of the synapse connecting the pre- and post-synaptic neurons.

If a synapse connects neurons A and B with a weight of 2.0, then when neuron A fires, neuron B will receive a spike with an amplitude of 2.0.