sfa.vis.utils module

sfa.vis.utils.compute_graphics(F, act, A, n2i, lw_min=1.0, lw_max=10.0, pct_link=90, pct_act=50, dg=None)[source]

Compute graphics of signal flow.

This method performs a calculation for generating colors of nodes and links for visualizing purpose.

Parameters
Fnumpy.ndarray

A matrix of signal flows. It is usually calculated as W2*x1 - W1*x1, where W is weight matrix and x is a vector of activities at steady-state.

actnumpy.ndarray

Change in the activities. It is usually calculated as x2 - x1, where x is the a vector of activities at steady-state.

Anumpy.ndarray

Adjacency matrix of the network.

n2idict

Name to index dictionary.

lw_minfloat, optional

Minimum link width, which is also used for unchanged flow.

lw_maxfloat, optional

Maximum link width.

pct_linkint, optional

Percentile of link width, which is used to set the maximum value for setting link widths. Default value is 90.

pct_actint, optional

Percentile of activity, which is used to set the maximum value for coloring nodes. Default value is 50.

dgNetworkX.DiGraph, optional

Existing NetworkX object to contain graphics information for visualizing nodes and links.

Returns
dgNetworkX.DiGraph

NetworkX object containing graphics information for visualizing nodes and links.