TriatTypeError - models.JansenRit

41 views
Skip to first unread message

Pragha

unread,
May 28, 2021, 2:01:19 PM5/28/21
to TVB Users
Dear TVB team,
I am new to TVB platform. I would like to replicate the tutorial on "how to perform multi-scale simulation of Alzheimer's disease on The Virtual Brain Simulation Platform". 
I think this would help me to understand the basics and from here I would like to move forward with my project. 

I got the following error when I was running the model cells. Could you please help me to fix the error?  I am using Windows 10 OS. 

Code:
#b = 0.07 # default Jansen-Rit inhibitory membrane constant
b = transform_abeta_exp(abeta_burden)
 init = np.random.rand(4000,6,SCnorm.shape[0],1);
mu = 0.1085
jrm = models.JansenRit(v0=6., mu=mu, p_max=mu, p_min=mu, 
                       b = b,
                       variables_of_interest=['y1 - y2'])

Error:
TraitTypeError: Attribute can't be set to an instance of <class 'float'> attribute tvb.simulator.models.jansen_rit.JansenRit.v0 = NArray(label=':math:`v_0`', dtype=float64, default=array([5.52]), dim_names=(), ndim=None, required=True)

Thank you,
Pragha.



NeuroLife

unread,
May 29, 2021, 12:52:03 PM5/29/21
to TVB Users
Hi,

I am still very new to TVB, but I believe that your issue comes with the inputs being floats instead of numpy arrays. So I think that if you put the values in arrays as such: mu=numpy.array([0.1085]) instead it could work. You would have to identify which of the inputs have to be arrays, but I'm pretty confident that all parameters of the model should be in arrays because it allows the configuration of region specific parameter values.

Hope this helps,
Dominic.

Reply all
Reply to author
Forward
0 new messages