Previously, connections between the same objects were drawn on top of each
other. This patch draws connections between the same objects as arcs of
different radii, making it possible to distinguish them visually.
This is of primary interest when having separate excitatory/inhibitory connections.
Note that connections from/to networks are still drawn as a single line. This is controlled by the has_arcs variable in Connection.redraw().
Here is the code I used for testing:
import nengo
import numpy as np
model = nengo.Network()
with model:
stim = nengo.Node([0])
a = nengo.Ensemble(n_neurons=50, dimensions=1)
b = nengo.Ensemble(n_neurons=50, dimensions=1)
c = nengo.Ensemble(n_neurons=50, dimensions=1)
with nengo.Network() as net1:
d = nengo.Ensemble(n_neurons=50, dimensions=1)
e = nengo.Ensemble(n_neurons=50, dimensions=1)
nengo.Connection(d, e)
nengo.Connection(d, e)
nengo.Connection(d, e)
with nengo.Network() as net2:
f = nengo.Ensemble(n_neurons=50, dimensions=1)
g = nengo.Ensemble(n_neurons=50, dimensions=1)
nengo.Connection(f, g)
nengo.Connection(f, g)
nengo.Connection(stim, a)
nengo.Connection(stim, a.neurons, transform=-np.ones((50, 1)))
nengo.Connection(stim, b)
nengo.Connection(stim, c)
nengo.Connection(a, d)
nengo.Connection(a, e)
nengo.Connection(d, e)
nengo.Connection(d, f)
nengo.Connection(b, c)
nengo.Connection(c, b.neurons, transform=-100*np.ones((50, 1)))
Previously, connections between the same objects were drawn on top of each other. This patch draws connections between the same objects as arcs of different radii, making it possible to distinguish them visually.
This is of primary interest when having separate excitatory/inhibitory connections.
Note that connections from/to networks are still drawn as a single line. This is controlled by the
has_arcs
variable inConnection.redraw()
.Here is the code I used for testing: