sim_tools.make_D

sim_tools.make_D(target, source, names, values=None)[source]

Create matrix of afferent/efferent dopamine regions in the model

Parameters:

target : Python list or NumPy 1darray

Python list or NumPy 1darray of region names that are affected by dopamine release (has to be the same length as source).

source : Python list or NumPy 1darray

Python list or NumPy 1darray of region names that steer dopamine release. (has to be the same length as target).

names : Python list or NumPy 1darray

Names of all regions in the model. If names has length N, the resulting dopamine connection matrix will by N-by-N.

values : Python list or NumPy 1darray

By default, dopamine links are binary, i.e., all links have unit weight. By passing a values array, certain links can be emphasized (weight > 1) or weakened (weight < 1). Entries of the values array have to be calibrated based on the values of b_hi, b_lo, and a.

Returns:

D : NumPy 2darray

A N-by-N array. Every row that has a non-zero entry signifies a dopamine target, and every non-zero column corresponds to a dopamine source.

See also

None

Notes

None

Examples

For the sake of simplicity consider a brain “parcellation” consisting of three (bilateral) regions, called A, B, and C. Thus, we define the following names array

>>> names = ['L_A','L_B','L_C','R_A','R_B','R_C']

Assume that in the left hemisphere dopamine is mainly concentrated in region B, its release is steered by neural firing in region A. In the right hemisphere, dopamine release in region C is depending on neural activity in area B. Then the target and source arrays are given by

>>> target = ['L_B','R_C']
>>> source = ['L_A','R_B']

Then the call

>>> D = make_D(target,source,names)
>>> D
array([[ 0.,  0.,  0.,  0.,  0.,  0.],
       [ 1.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  1.,  0.]])

generates a 6-by-6 NumPy array D, that has non-zero entries in rows 2 and 6 (because ‘L_B’ is the second, and ‘R_C’ the sixth element of the list names), and columns 1 and 5 (because ‘L_A’ is the first, and ‘R_B’ the 5th element of the list names). Thus, the row/column index of each non-zero entry in D has the format target-by-source.