class nengolib.synapses.HeteroSynapse(systems, dt=None, elementwise=False, method='zoh')[source]

Callable class for applying different synapses to an input vector.

This is typically to be used as the output parameter for some intermediate nengo.Node in a Nengo model.

systems : (one or more) linear_system_like

One or more linear system representations, providing each synapse.

dt : float, optional

Simulation time-step used to discretize each of the systems. If dt is None (the default), then all of the systems must already be digital.

elementwise : boolean, optional

If elementwise == False (default), each synapse is applied to every dimension, and so size_out == size_in*len(synapses). The output dimensions are ordered by input dimension, such that index i*len(synapses) + j is the i’th input dimension convolved with the j’th filter.

If elementwise == True, len(synapses) must match size_in, in which case each synapse is applied separately to each dimension, and so size_out == size_in.

The latter can be used to connect to a population of neurons with a different synapse for each neuron. The former can be used to apply a number of synapses to each dimension in state-space.

method : string, optional

Method passed to cont2discrete(). Defaults to 'zoh'.

See also



See Heterogeneous Synapses for a notebook example.


__call__(t, u) Node function called by simulator on each time-step.
from_vector(x) Inverse of to_vector; recovers matrix from output vector.
to_vector(y) Inverse of from_vector; flattens matrix into an output vector.