Different coupling functions for one model/simulation

60 views
Skip to first unread message

Jan

unread,
Aug 17, 2015, 9:38:44 AM8/17/15
to TVB Users
Hi,

i am interested in using different coupling function for specific (long range) connections in one simulation.
To clarify: For example i want to use linear long range coupling with parameters a1, b1 for connection area1-area2 and linear coupling with parameters a2,b2 for all others. Or use another coupling function in a specific connection.

Can i construct the simulation as usual and then overwrite that specific connection some where in the simulation object? As i understand all nodes and edges in a simulation/model must have the same parameters and are constructed equally (only weighted by the connectivity matrix).
Where would i modify the code to make "special" nodes and edges (with other parameters/functions)? I usually use the TVB-library modules directly from ipython. cheers Jan

Lia Domide

unread,
Aug 17, 2015, 10:24:23 AM8/17/15
to TVB Users
Hi Jan,

As long as you use the same coupling class (e.g. LinearCoupling) for all connectivity regions, it is possible to customize as you say by simply initializing the LinearCoupling instance parameters with vectors instead of scalars. Something like:


 a = a2 * numpy.ones(74)#74being the number of regions in your connectivity
 a
[area1] = a1
 a
[area2] = a1
 coupling
= coupling.Linear(a=a)


For using different coupling classes, I do not know, but hopefully this can get you a bit further.

Regards,
Lia.


Jan

unread,
Aug 17, 2015, 10:51:41 AM8/17/15
to TVB Users
That should do.

I will probably write a custom coupling class which can be parameterized for the connections as suggested.

Thanks

Jan

Ryan Ellison

unread,
Aug 24, 2020, 1:06:19 PM8/24/20
to TVB Users
Did this simplistic approach work? Seems to throw a reshape/shape error for the linear coupling equation as I was playing around with defining node-specific long-range coupling params.

R

Julie Courtiol

unread,
Aug 24, 2020, 3:04:59 PM8/24/20
to tvb-...@googlegroups.com
Hi Ryan,

Here a concrete example using the linear coupling:

a1 = 0.0154
a2 = 0.02

white_matter_coupling = coupling.Linear()
white_matter_coupling.a = (a1) * np.ones((nregions,1))
white_matter_coupling.a[[1, 2, 3]] = (a2) * np.ones((3,1))

Hope that helps!


---
Best regards,

Julie Courtiol





--
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/5d2ec2c1-65a8-4e55-a5d1-6dc1876baeb2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages