Setting Noise in Heun Stochastic Integrator

48 views
Skip to first unread message

Borjan Milinkovic

unread,
May 11, 2021, 9:03:11 PM5/11/21
to TVB Users
Hi all,

I'm trying to set the additive noise in a Heun stochastic integrator, but keep getting errors, my code is as follows:

integrator = integrators.HeunStochastic(dt=0.1, noise=noise.Additive(nsig=0.053))

And this is the error I recieve:

TraitTypeError: Attribute can't be set to an instance of <class 'int'> attribute tvb.simulator.noise.Additive.nsig = NArray(label=':math:`D`', dtype=float64, default=array([1.]), dim_names=(), ndim=None, required=True)

Is the code correct? I can't seem to find the solution. Any help is much appreciated.

Thanks, 
Boki

Popa Paula

unread,
May 12, 2021, 1:39:03 AM5/12/21
to tvb-...@googlegroups.com
Hi,

The nsig attribute should be an array. Please try:
integrator = integrators.HeunStochastic(dt=0.1, noise=noise.Additive(nsig=numpy.array([0.053])))

Best,
Paula

--
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/74faaed1-eef7-48f6-94d2-d2d8cdb100ben%40googlegroups.com.

Borjan Milinkovic

unread,
May 13, 2021, 12:55:02 AM5/13/21
to TVB Users
Paula!

Thank you so much! This works.

Best,
Boki
Reply all
Reply to author
Forward
0 new messages