Maximum frequency of current stimulation

NMODL and the Channel Builder.
Post Reply
jaehoonlee13
Posts: 2
Joined: Wed Jun 17, 2020 2:10 am

Maximum frequency of current stimulation

Post by jaehoonlee13 »

Hi,

I am trying to simulate current injection stimulation with high frequency( ~MHz).

However, when I plot the Curren injection profile, it looks like NEURON cannot follow MHz speed due to the fixed time step(dt) value.

What is the maximum frequency that I can apply and is there any way to simulate MHz sinusoidal current injection stimulation?

Regards,
Jaehoon
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Maximum frequency of current stimulation

Post by ted »

jaehoonlee13 wrote: Thu Jun 18, 2020 4:56 amHowever, when I plot the Curren injection profile, it looks like NEURON cannot follow MHz speed due to the fixed time step(dt) value.
So make dt smaller. If you only want to satisfy the Nyquist criterion, 5e-4 ms would be sufficient. If you really want the sampled current to approximate a sine wave, dt will have to be significantly smaller (1/10 of the period, i.e. 1e-4 ms).
jaehoonlee13
Posts: 2
Joined: Wed Jun 17, 2020 2:10 am

Re: Maximum frequency of current stimulation

Post by jaehoonlee13 »

Hi Ted,

How can I make dt smaller? I have read NEURON NMODL instruction manuel and it said that "neither t nor the time step dt should be changed in NMODL".

What is the default dt value and how I can change it?
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Maximum frequency of current stimulation

Post by ted »

Where did you get the idea that NMODL controls t or dt? Did you read that somewhere? I ask because there's all kinds of nonsense in print and online, and if there's rubbish somewhere about NEURON, we need to know about it in order to be able to deal with it effectively.

t and dt are built-in variables that are managed by NEURON's computational engine. Their values are known to hoc as t and dt, and to Python as h.t and h.dt (assuming that Python has imported h from the neuron library). An ordinary assignment statement is sufficient to specify the value of dt. You can assign any value you like to dt as long as it is >0. However, if NEURON's gui has been loaded, during initialization dt will automatically be checked and, if necessary, forced to be consistent with the parameter steps_per_ms (in Python it's h.steps_per_ms) which controls how many points are plotted per ms. "Consistent with steps_per_ms" means that dt must equal 1/(N*steps_per_ms) where N is a whole number 1, 2, 3 . . .. This ensures that, between plotted points, the solution advances by a whole number of dt time steps.
Post Reply