Demonstrate the effect of different normalisation modes on the connectivity strength range.

Current modes are re-scaling methods.


In [1]:
from tvb.simulator.lab import *

In [2]:
import matplotlib.pyplot as plt


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-eff513f636fd> in <module>()
----> 1 import matplotlib.pyplot as plt

/home/tim/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py in <module>()
    178 # cbook must import matplotlib only within function
    179 # definitions, so it is safe to import from it here.
--> 180 from matplotlib.cbook import is_string_like
    181 from matplotlib.compat import subprocess
    182 

/home/tim/anaconda/lib/python2.7/site-packages/matplotlib/cbook.py in <module>()
     11 
     12 import six
---> 13 from six.moves import xrange, zip
     14 from itertools import repeat
     15 

ImportError: No module named moves

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()