Re: [TVB] Additive Noise Error in Heun Stochastic Integrator

20 views
Skip to first unread message

WOODMAN Michael

unread,
May 12, 2021, 2:40:18 AM5/12/21
to tvb-...@googlegroups.com
hi

you need to check your imports.  You would usually use

from tvb.simulator import noise 

noise.Additive(nsig=np.r_[0.053])

Please check the examples in the documentation. 

cheers,
Marmaduke

On 12 May 2021, at 02:53, Borjan Milinkovic <borjan.m...@gmail.com> wrote:

Also,  don't mind the first line of code. That should be hashed out.

B.

On Wednesday, May 12, 2021 at 10:42:11 AM UTC+10 Borjan Milinkovic wrote:
Hi all,

I'm getting this error when trying to set the nsig = 0.053 

My code:

# 4. INTEGRATOR

noise = simulator.noise.Additive(nsig=0.053)

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

Error:

AttributeError Traceback (most recent call last) <ipython-input-33-30f51f6efe48> in <module> 1 # 4. INTEGRATOR 2 ----> 3 noise = simulator.noise.Additive(nsig=0.053) 4 5 stoch_integr = integrators.HeunStochastic(dt=0.1, noise=noise.Additive(nsig=0.053))AttributeError: module 'tvb.simulator.simulator' has no attribute 'noise' 

I've approached this in a few different ways, but I keep getting this error, or if I use noise=Additive(nsig=0.053) I get that Additive is not defined.

Cheers,
Boki




-- 
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/ff0f20f1-ea29-469e-a140-0b2e3ef40553n%40googlegroups.com.

Borjan Milinkovic

unread,
May 13, 2021, 12:57:14 AM5/13/21
to TVB Users
Thanks Marmaduke,

I was able to solve the problem. Regarding imports however, it seemed that I had imported everything properly. Hence why this error was a little confusing to me. 

Thanks so much for the response though - kindly appreciated!

Boki

Reply all
Reply to author
Forward
0 new messages