Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Unit of measure for current of pulse train

53 views
Skip to first unread message

Lorenzo Prione

unread,
Jun 20, 2024, 6:34:22 AM6/20/24
to TVB Users
I am using the simulator to perform a surface stimulus using a pulse train. The intention is to observe the effect of the stimulus on EEG
While setting the parameters, I came across 'amp'. I entered 1.0. But I have doubts about the actual interpretability of the unit.
Can I consider it as a current stimulus whose unit of measurement is Ampere?

If so, how can I modify the stimulus with a customised function and not among those available on tvb?

Thank you.

WOODMAN Michael

unread,
Jun 20, 2024, 7:22:58 AM6/20/24
to tvb-...@googlegroups.com

hi


the effective units would be determined by the model you're stimulating, but here 'amp' is just an abbreviation of amplitude.


if the stimulus function you require is not implemented by tvb, then you can implement a subclass by copying and pasting an existing case into your code and modifying it as required.


cheers,

Marmaduke


From: tvb-...@googlegroups.com <tvb-...@googlegroups.com> on behalf of Lorenzo Prione <prione...@gmail.com>
Sent: Thursday, June 20, 2024 12:34:22 PM
To: TVB Users
Subject: [RESEAUX SOCIAUX] [TVB] Unit of measure for current of pulse train
 

Ce mail provient de l'extérieur, restons vigilants

--
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/8b395169-fc07-42a2-a4ad-1ea6713aa202n%40googlegroups.com.

Lorenzo Prione

unread,
Jun 24, 2024, 6:33:35 AM6/24/24
to TVB Users
Hi,

thanks for your answer.

While I understood the part about implementing my stimulus function, I'm a bit confused on how to determine the effective units based on the model.
Could you explain in detail what do you mean?

Cheers

WOODMAN Michael

unread,
Jul 1, 2024, 10:27:27 AM7/1/24
to tvb-...@googlegroups.com

hi


A stimulus applied to a state variable has units corresponding to the time derivative of the units of that state variable.  The most common case would be currents applied to the membrane potential.


cheers,

Marmaduke


Sent: Monday, June 24, 2024 12:33:35 PM
To: TVB Users
Subject: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] [TVB] Unit of measure for current of pulse train
 

Lorenzo Prione

unread,
Jul 2, 2024, 4:51:20 AM7/2/24
to TVB Users
Thank you Marmaduke for your reply,

at the moment I am using a 2d oscillator as a model, but I think I will later change it to a Jansen-Rit.
I am trying to evaluate the evoked potentials post stimulation in the EEG activity of the simulation but, for some reason, while in the temporal average monitor the artefacts given by the stimulus are very clear and present, the eeg monitor pre and post stimulus are pretty much the same, almost as if my stimulus has no influence.
Any idea why this is so?

I leave the code attached.
Untitled.ipynb

Lorenzo Prione

unread,
Jul 3, 2024, 5:25:00 AM7/3/24
to TVB Users
I'm gonna correct myself. It seems like the stimulation is indeed present in the EEG, but it is not visible due to the huge values of the EEG. How to rescale them pre simulation?

Cheers

WOODMAN Michael

unread,
Jul 3, 2024, 10:03:12 AM7/3/24
to tvb-...@googlegroups.com

hi


you can change the 'amp' parameter or the stimulation weights.


Sent: Wednesday, July 3, 2024 11:25:00 AM
To: TVB Users
Subject: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] [TVB] Unit of measure for current of pulse train
 
Message has been deleted

Lorenzo Prione

unread,
Jul 3, 2024, 10:14:44 AM7/3/24
to TVB Users
Hello, already done, both for weight and 'amp'. But beyond a certain value they do not go, otherwise these errors are reported and the graph shows an abnormal simulation.

 \TVB_Distribution\tvb_data\Lib\site-packages\numba\np\ufunc\gufunc.py:170: RuntimeWarning: overflow encountered in _numba_dfun_g2d return self.ufunc(*args, **kwargs)
\TVB_Distribution\tvb_data\Lib\site-packages\numba\np\ufunc\gufunc.py:170: RuntimeWarning: invalid value encountered in _numba_dfun_g2d return self.ufunc(*args, **kwargs)\TVB_Distribution\tvb_data\Lib\site-packages\tvb\simulator\coupling.py:166: RuntimeWarning: invalid value encountered in reduceat sum[:, nzr] = numpy.add.reduceat(weights_col * pre, lri, axis=1)\TVB_Distribution\tvb_data\Lib\site-packages\tvb\simulator\models\oscillator.py:379: RuntimeWarning: invalid value encountered in multiply lc_0 = local_coupling * vw[0, :, 0]

WOODMAN Michael

unread,
Jul 3, 2024, 10:16:12 AM7/3/24
to tvb-...@googlegroups.com

hi again, set the dt lower or use an adaptive stepping scheme.


Sent: Wednesday, July 3, 2024 4:14:44 PM
To: TVB Users
Subject: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] [TVB] Unit of measure for current of pulse train
 

Lorenzo Prione

unread,
Jul 3, 2024, 10:18:55 AM7/3/24
to TVB Users
Thank you, I'll try that.

Eventually, is there any way in which i can rescale the EEG values (before the stimulation) and not the stimulus value?

Cheers

WOODMAN Michael

unread,
Jul 4, 2024, 4:34:15 AM7/4/24
to tvb-...@googlegroups.com

hi


In principle, yes, but it is unlikely that this is the problem you wish to solve.  The effect of the stimulus is proportional to its amplitude relative to the state variables themselves.  If a stronger stimulus requires a smaller dt, then you're already in a regime where the stimulation is strong enough, tho it maybe targeted in a way that is ineffective for your model.  Rescaling the model (and thus the EEG) will not help.


cheers,

Marmaduke




Sent: Wednesday, July 3, 2024 16:18
To: TVB Users
Subject: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] Re: [RESEAUX SOCIAUX] [TVB] Unit of measure for current of pulse train
 

Ce mail provient de l'extérieur, restons vigilants

Thank you, I'll try that.


Eventually, is there any way in which i can rescale the EEG values (before the stimulation) and not the stimulus value?

Cheers

--
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.
Reply all
Reply to author
Forward
0 new messages