Page 1 of 1
Alternating current
Posted: Tue May 15, 2007 1:10 pm
by magpie
Dear all,
I am trying to inject the alternating current into the cell, but I can not find any way to do this in NEURON.
Could anyone advice on this for me?
Thank you in advance.
Posted: Wed May 16, 2007 5:51 am
by Raj
You might have a look at the play method of the vector class. It allows you to play any vector in to a variable. So if you create a sine wave in a vector and play it into a currentclamp mechanism you should be in business.
Other solutions are creating your own current clamp mechanisms but that involves creating your own mod-files.
Posted: Wed May 16, 2007 8:47 am
by ted
If your model is passive, or if you only need to do "small signal analysis," consider using the
Impedance class. Just be sure to initialize the model first so that all voltage-gated channels
are in their proper states.
Thank you
Posted: Wed May 16, 2007 11:33 am
by magpie
Thank you. I will try it.
save to ses file
Posted: Wed May 16, 2007 10:17 pm
by magpie
My approach is like below:
1) make a vector using "Grapher" in GUI.
2) copy the vector to clipboard using "pick vector".
3) reload the vector on the "Vector Play" window in GUI.
4) connect the variable (i.e. current amp) in my model with this vector paly.
5) save this as ses file with other windows.
6) use ses file for another simulation that needs this vector.
I am trying to make a sinusoidal vector with 250Hz during 1s using "Grapher" in main menu of GUI, but I can not make perfect sinusoidal curve with above frequency. Also I can not save the vector reloaded to "Vector Play" window on ses file.
Am I doing something wrong?
Thank you.
Posted: Thu May 17, 2007 9:47 am
by ted
I am trying to make a sinusoidal vector with 250Hz during 1s using "Grapher" in main menu of GUI, but I can not make perfect sinusoidal curve with above frequency.
Sample the function at a high enough frequency to ensure that the sampled waveform is
"smooth enough." Grapher's default is 100 intervals (101 samples) over 10 ms, i.e. 0.1 ms
intervals. 0.1 ms is good enough to give a pretty smooth looking sinusoid; at that rate, you'll
need 1e4 intervals for 1 s of data. If you want the sample rate to be the same as NEURON's
default dt, you'll need 4e4 intervals.
I can not save the vector reloaded to "Vector Play" window on ses file.
That's strange. If you paste a waveform into a VectorPlay window, then save that window
to a ses file, the data will be saved to that file. If you subsequently open that ses file, you'll
get a new VectorPlay window, complete with data (although you might have to use
View = plot to rescale the axes to see the waveform).
Sinusoidal current injection
Posted: Thu May 31, 2007 2:20 am
by kelvin
Dear Mr Magpie,
I'm not sure if you found a good solution to your need to generate AC inputs. If you are still looking for ideas you can check out my reply on another thread.
https://www.neuron.yale.edu/phpBB2/view ... highlight=
^^;;
Posted: Mon Jun 04, 2007 9:47 pm
by ted
Kelvin's suggestion is really the best way to do what you want, because you won't have
to set up a long Vector.