In [1]:
%matplotlib inline
from tvb.simulator.lab import *
import numpy

Generate surrogate connectivity

Testing specific hypotheses about inter-node interactions can often be simpler with just a handful of nodes and connectivity created by hand. TVB makes it simple to construct common scenarios.

In [2]:
# Create empty connectivity
wm = connectivity.Connectivity()

# First weights and distances
nor = 4

# Centers, specify the number of regions, otherwise it'll use a default value.

# By default, the new regions labels are numeric characters, ie [0, 1, ...]

# But custom region labels can be used
wm.region_labels = numpy.array(['a1', 'b1', 'a2', 'b2'])

plot_matrix(wm.weights, connectivity=wm, binary_matrix=True)