nengolib.synapses.HeteroSynapse¶
- 
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
outputparameter for some intermediatenengo.Nodein a Nengo model.Parameters: - 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
dtisNone(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 sosize_out == size_in*len(synapses). The output dimensions are ordered by input dimension, such that indexi*len(synapses) + jis thei’th input dimension convolved with thej’th filter.If
elementwise == True,len(synapses)must matchsize_in, in which case each synapse is applied separately to each dimension, and sosize_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
Examples
See Heterogeneous Synapses for a notebook example.
Methods
__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.- systems : (one or more)