I was examining the electrotonic properties, especially "V(measure)/V(inject) ", of a model cell with the Impedance tool and I could see the results in "LogAvsX[0]" window. However, I couldn't find the way to record all results to the text file for further analysis. Is there any way to do so? In addition to this, can I look at the source codes for member functions in Impedance class such as compute(), input(), loc() and so on?
Thanks in advance.
How to record data from the graph to text file ??
Re: How to record data from the graph to text file ??
A getting-started-tutorial for the Impedance class has recently been posted:magpie wrote:I was examining the electrotonic properties, especially "V(measure)/V(inject) ", of a model cell with the Impedance tool and I could see the results in "LogAvsX[0]" window. However, I couldn't find the way to record all results to the text file for further analysis. Is there any way to do so?
https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=771
There are several options to save results into a text file:
1. If you are using the GUI, you can right-click on a Graph, select "Pick Vector", left-click on the Graph line you are interested in, and then save this into a text file by selecting "Save to File" from the "Vector" entry of the main menu.
2. You can also write some hoc code to save your results. Here is a slight modification of the tutorial's calcZ() procedure:
Code: Select all
proc calcZ() {
soma zz.loc(WHERE) // sets origin for impedance calculations
zz.compute(FREQ, 1) // takes the impedance contributions of
// gating state differential equations into account
// but requires mechanisms to be compatible with CVODE
wopen("textfile.txt")
fprint("x\tdistance(x)\tinput(x)\tinput_phase(x)\ttransfer(x)\ttransfer_phase(x)\tratio(x)\n")
forall {
fprint("%s\n",secname())
for (x) {
fprint("%g\t%g\t%g\t%g\t%g\t%g\t%g\n", x, distance(x), zz.input(x), zz.input_phase(x), zz.transfer(x), zz.transfer_phase(x), zz.ratio(x))
}
}
wopen()
}
It would probably be most helpful to have a look at the original publication:magpie wrote:In addition to this, can I look at the source codes for member functions in Impedance class such as compute(), input(), loc() and so on?
Tsai KY, Carnevale NT, Claiborne BJ, Brown TH (1994) Efficient mapping from neuroanatomical to electrotonic space. Network 5:21-46.
To my knowledge, the algorithms are implemented in src/nrniv/Impedanc.cpp
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
The electrotonic transformation and the GUI Impedance tools
Thanks, csh, I couldn't have done that better myself. Here are a couple more articles that
may be of interest:
Carnevale, N.T., Tsai, K.Y., Claiborne, B.J., and Brown, T.H.. The electrotonic
transformation: a tool for relating neuronal form to function. In: Advances in Neural
Information Processing Systems, vol. 7, eds. Tesauro, G., Touretzky, D.S., and Leen, T.K..
MIT Press, Cambridge, MA, 1995, pp. 69-76. Preprint available at
http://www.neuron.yale.edu/neuron/paper ... psfin.html
O'Boyle, M.P., Carnevale, N.T., Claiborne, B.J., and Brown, T.H. A new graphical
approach for visualizing the relationship between anatomical and electrotonic
structure. In: Computational Neuroscience: Trends in Research 1995, edited by
J.M. Bower. San Diego: Academic Press, 1996, p. 423-428. Preprint available at
http://www.neuron.yale.edu/neuron/paper ... s95pre.pdf
A tutorial on the use of the Impedance class's GUI tools
http://www.neuron.yale.edu/neuron/stati ... zclass.htm
may be of interest:
Carnevale, N.T., Tsai, K.Y., Claiborne, B.J., and Brown, T.H.. The electrotonic
transformation: a tool for relating neuronal form to function. In: Advances in Neural
Information Processing Systems, vol. 7, eds. Tesauro, G., Touretzky, D.S., and Leen, T.K..
MIT Press, Cambridge, MA, 1995, pp. 69-76. Preprint available at
http://www.neuron.yale.edu/neuron/paper ... psfin.html
O'Boyle, M.P., Carnevale, N.T., Claiborne, B.J., and Brown, T.H. A new graphical
approach for visualizing the relationship between anatomical and electrotonic
structure. In: Computational Neuroscience: Trends in Research 1995, edited by
J.M. Bower. San Diego: Academic Press, 1996, p. 423-428. Preprint available at
http://www.neuron.yale.edu/neuron/paper ... s95pre.pdf
A tutorial on the use of the Impedance class's GUI tools
http://www.neuron.yale.edu/neuron/stati ... zclass.htm
Re: How to record data from the graph to text file ??
Along similar lines as the original question in this posting:
I'm using the GUI, and have generated a plot of V(measure)/V(inject) as a function of distance from the soma, using the LogAvsX impedance tools. So now I have a plot with many (~200) vectors in it.
How do I have save all of the vectors to a text file(s), so I can perform some analysis and plotting with other software (e.g., averaging as a function of distance, averaging and statistics across cells/models, making 3D plots of V(measure)/V(inject) as a function of distance from soma and frequency)?
THANKS!
Matt
I'm using the GUI, and have generated a plot of V(measure)/V(inject) as a function of distance from the soma, using the LogAvsX impedance tools. So now I have a plot with many (~200) vectors in it.
How do I have save all of the vectors to a text file(s), so I can perform some analysis and plotting with other software (e.g., averaging as a function of distance, averaging and statistics across cells/models, making 3D plots of V(measure)/V(inject) as a function of distance from soma and frequency)?
THANKS!
Matt
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: How to record data from the graph to text file ??
Start with proc calcZ() shown above and add a bit of file i/o code, referring as necessary to the Programmer's Reference for documentation (especially of the File class and its methods).
Re: How to record data from the graph to text file ??
There really is no easier way to save the source data for a plot in the NEURON GUI?
I'll see what I can figure out.
Thanks.
I'll see what I can figure out.
Thanks.
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: How to record data from the graph to text file ??
Short of having somebody else write your code for you, not really.