Generic2DOscillatory - Parameter Exploration of Global Coupling and Mean Delay

60 views
Skip to first unread message

Orestis Stylianou

unread,
Jul 7, 2022, 9:14:49 AM7/7/22
to TVB Users
Hello,

I am trying to do a parameter exploration using the Generic2DOscillatory based on this paper: J. Cabral, E. Hugues, O. Sporns, G. Deco. *Role of local network oscillations in resting-state functional connectivity*. NeuroImage, 57, 1, 2011.

This means, I will explore k = 0:2:60 (global coupling) and τ = 1:1:15 (mean delay). I have two questions:

i) Which parameters correspond to k and τ in TVB? I did: 
oscillator = models.Generic2dOscillator(tau = numpy.array([t[iteration_t]])) # for τ
global_coupling = coupling.Linear(a=numpy.array(G[iteration_G])) # for k
Is this correct? 

ii) If I selected the correct parameters, why do I get an error for k>10: 
C:\tools\Anaconda3\lib\site-packages\tvb\simulator\models\oscillator.py:381: RuntimeWarning: invalid value encountered in multiply
  lc_0 = local_coupling * vw[0, :, 0]
C:\tools\Anaconda3\lib\site-packages\numba\np\ufunc\gufunc.py:170: RuntimeWarning: invalid value encountered in _numba_dfun_g2d
  return self.ufunc(*args, **kwargs)

Courtiol, Julie

unread,
Jul 7, 2022, 9:51:20 AM7/7/22
to TVB Users

Hi Orestis,


Please see below my reply.



This means, I will explore k = 0:2:60 (global coupling) and τ = 1:1:15 (mean delay). I have two questions:

i) Which parameters correspond to k and τ in TVB? I did: 
oscillator = models.Generic2dOscillator(tau = numpy.array([t[iteration_t]])) # for τ
global_coupling = coupling.Linear(a=numpy.array(G[iteration_G])) # for k
Is this correct? 



The time-delays corresponds to the signal transmission delays between two remote areas. It is a parameter of the long-range connectivity matrix and not of the local node dynamics.
It is computed from the tract-length matrix and the conduction velocity of your signal.

In Cabral et al., the parameter <tau> is the mean time-delays and it is the control parameter that is computed from the speed conduction as: <tau> = <L> / V  (with <L>, mean weights in the connectome). It is then the conductivity, your parameter control in your simulation.



Best,
Julie



---Best regards,

Dr. Julie Courtiol
Scientific Manager, Brain Simulation Section

1644242313315


Charité - Universitätsmedizin Berlin
Berlin Institut of Health
Brain Simulation
Robert-Kosh-Platz 4
Charitéplatz 1 | 10117 Berlin | Germany

Orestis Stylianou

unread,
Jul 8, 2022, 5:57:25 AM7/8/22
to TVB Users
Hi Julie, 

Thank you for the clarification. Even after fixing this, I am still having problems. I am using a Linear coupling (global_coupling = coupling.Linear(a)). When a>8.8 the result of the simulation is just NaNs and when a>10 I get NaNs and the following messages: 

C:\tools\Anaconda3\lib\site-packages\tvb\simulator\models\oscillator.py:381: RuntimeWarning: invalid value encountered in multiply
  lc_0 = local_coupling * vw[0, :, 0]
C:\tools\Anaconda3\lib\site-packages\numba\np\ufunc\gufunc.py:170: RuntimeWarning: invalid value encountered in _numba_dfun_g2d
  return self.ufunc(*args, **kwargs)


When I change the coupling from linear to something else e.g. HyperbolicTangent everything works fine. But if I want to base my parameter exploration on Cabral et al. I should use something in the form aX, i.e. Linear or Scaling coupling. Am I missing something here?

Best, Orestis

Julie Courtiol

unread,
Jul 8, 2022, 8:18:30 AM7/8/22
to tvb-...@googlegroups.com
Hi Orestis,

Your system diverges and cannot be integrated. The values injected by a HyperbolicTangent coupling are smaller than a Linear one.
It can depend on different parameters you use.

Without seeing the code, I cannot determine it exactly. Did you normalize your connectome?

Best,
Julie


---Best regards,

Dr. Julie Courtiol
Scientific Manager, Brain Simulation Section

1644242313315


Charité - Universitätsmedizin Berlin
Berlin Institut of Health
Brain Simulation
Robert-Kosh-Platz 4
Charitéplatz 1 | 10117 Berlin | Germany

Twitter: @Courtioljulie
LinkedIn: juliecourtiol

--
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/213c2fcb-1298-4631-b6b2-4c35c26804den%40googlegroups.com.

Orestis Stylianou

unread,
Jul 8, 2022, 9:27:46 AM7/8/22
to TVB Users
Hi, 
I haven't thought about normalizing, thanks. After normalizing the connectome, I could go all the way up to k=28 before getting NaNs. This is an improvement but I need a long way to go to reach 60.... Is there anything else I could do? Here is my script, the TVB-relevant code is between lines 31 and 48. 

Best, Orestis

Julie Courtiol

unread,
Jul 8, 2022, 10:10:27 AM7/8/22
to tvb-...@googlegroups.com
Hi,

In which unit is your sampling rate?
The monitors' sampling period is defined in milliseconds by default in TVB.

Also, as mentioned in my previous email, the coupling function used in the paper is not the same as yours. The input values are largely smaller compared with the linear coupling you are using. The range of values explored should then be different. Your systems might diverge in any case.

Best,
Julie


---Best regards,

Dr. Julie Courtiol
Scientific Manager, Brain Simulation Section

1644242313315


Charité - Universitätsmedizin Berlin
Berlin Institut of Health
Brain Simulation
Robert-Kosh-Platz 4
Charitéplatz 1 | 10117 Berlin | Germany

Twitter: @Courtioljulie
LinkedIn: juliecourtiol

Orestis Stylianou

unread,
Jul 11, 2022, 6:36:36 AM7/11/22
to TVB Users
Hello, 

Sorry for the late reply, half of the time I don't get any notifications from Google Groups....

My sampling rate is 1200 Hz. This is why in the EEG monitor I set up the period as 1000/samping_rate.

I just realized that Cabral 2011 used a Kuramoto model so I will have to base my parameter exploration on some other paper. Hopefully I will figure it out. Thanks for the help!

PS. This is what I am using to figure out what models I can use. Is there a better way to see all available models that I don't know? If not, who can I contact about suggestions/improvements of TVB's user-friendliness? 

Courtiol, Julie

unread,
Jul 11, 2022, 7:02:00 AM7/11/22
to TVB Users

Hi Orestis,


You can see the last updated TVB code on our GitHub, in tvb-root:

https://github.com/the-virtual-brain/tvb-root


for the models:

https://github.com/the-virtual-brain/tvb-root/tree/master/tvb_library/tvb/simulator/models



If you have any questions/suggestions for us, please use this TVB Forum.




Best,

Julie

---Best regards,

Dr. Julie Courtiol
Scientific Manager, Brain Simulation Section

1644242313315


Charité - Universitätsmedizin Berlin
Berlin Institut of Health
Brain Simulation
Robert-Kosh-Platz 4
Charitéplatz 1 | 10117 Berlin | Germany


De : tvb-...@googlegroups.com <tvb-...@googlegroups.com> de la part de Orestis Stylianou <oest...@gmail.com>
Envoyé : lundi 11 juillet 2022 12:36:36
À : TVB Users
Objet : Re: [ext] [TVB] Generic2DOscillatory - Parameter Exploration of Global Coupling and Mean Delay
 

Orestis Stylianou

unread,
Jul 11, 2022, 8:10:35 AM7/11/22
to TVB Users
Alright, Thanks!
Reply all
Reply to author
Forward
0 new messages