In [1]:
from tvb.simulator.lab import *
In [2]:
import matplotlib.pyplot as plt
In [3]:
LOG.info("Reading default connectivity...")
white_matter = connectivity.Connectivity(load_default=True)
white_matter.configure()
con = connectivity.Connectivity(load_default=True)
con.configure()
In [4]:
#scale weights by the maximum absolute value
con.weights = white_matter.scaled_weights(mode='tract')
plot_connectivity(con, num="tract_mode", plot_tracts=False)
In [5]:
#undo scaling
con.weights = white_matter.scaled_weights(mode='none')
plot_connectivity(con, num="default_mode", plot_tracts=False)
In [6]:
#re-scale using another `` mode``
con.weights = white_matter.scaled_weights(mode='region')
plot_connectivity(con, num="region_mode", plot_tracts=False)
In [7]:
#undo scaling
con.weights = white_matter.scaled_weights(mode='none')
plot_connectivity(con, num="default_mode", plot_tracts=False)
In [8]:
#binarize
con.weights = white_matter.transform_binarize_matrix()
plot_connectivity(con, num="default_mode", plot_tracts=False)
In [9]:
#remove-self connections
con.weights = white_matter.transform_remove_self_connections()
plot_connectivity(con, num="default_mode", plot_tracts=False)
In [10]:
pyplot.show()