#!/usr/bin/env python # coding: utf-8 # # Connectivity normalization # # # With significant variability between methods of obtaining structural connectivity, it is often useful to normalize, in one sense or another, the connectivity when comparing, for example, across subjects, or standardizing parameter ranges. # # Logging level # To set the logging level simply call set_loggers_level() method with the desired level # In[3]: from tvb.basic.logger.builder import set_loggers_level import logging #sets the console's logging level set_loggers_level(logging.DEBUG) # In[2]: get_ipython().run_line_magic('matplotlib', 'widget') from tvb.simulator.lab import connectivity , plot_connectivity # In[4]: conn = connectivity.Connectivity.from_file() conn.configure() def plot_with_weights(weights): conn = connectivity.Connectivity.from_file() conn.configure() conn.weights = weights plot_connectivity(conn, num="tract_mode", plot_tracts=False) plot_with_weights(conn.scaled_weights(mode='tract')) # In[5]: plot_with_weights(conn.scaled_weights(mode='region')) plot_with_weights(conn.scaled_weights(mode='none')) plot_with_weights(conn.transform_binarize_matrix()) plot_with_weights(conn.transform_remove_self_connections()) # In[ ]: # In[ ]: # In[5]: