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.
Alternating current
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.
Other solutions are creating your own current clamp mechanisms but that involves creating your own mod-files.
save to ses file
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.
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.
-
- Site Admin
- Posts: 6393
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Sample the function at a high enough frequency to ensure that the sampled waveform isI 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.
"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.
That's strange. If you paste a waveform into a VectorPlay window, then save that windowI can not save the vector reloaded to "Vector Play" window on ses file.
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
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=
^^;;
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=
^^;;