Setting Stimulus Weight and selecting Node in Jupyter Notebook

20 views
Skip to first unread message

Pallab K

unread,
May 7, 2022, 5:14:54 PM5/7/22
to TVB Users
Dear TVB Community,

I am trying to run a simulation with stimulus in a single node. (For e.g Frontal_Lobe).

1. How do I find that out node number of my Region-of-Interest?

2. How do I set the Stimulus Weight to it?

P.S : I tried running with the simulate_region_stimulus.py demo file given with the TVB package, but I always get the error "ValueError: shape mismatch: value array of shape (1,67,1) could not be broadcast to indexing result of shape (1,69,1)"  while running the Simulator.

Thanks in advance for the help!

Best,
Pallab


WOODMAN Michael

unread,
May 9, 2022, 3:52:20 AM5/9/22
to tvb-...@googlegroups.com
hi,

The connectivity datatype contains the list of ROI names for each node in the network, so you can use something like np.argwhere(conn.region_labels == 'Frontal_Lobe') to get indices.  Once you have these indices, you set the weights in a numpy array, as shown in the demo 


If you have such a shape error, your weights array may not be the right shape. 

cheers,
Marmaduke




--
You received this message because you are subscribed to the Google Groups "TVB Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tvb-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tvb-users/682af3da-8c6e-4825-99e6-533d4b9a0c9cn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages