Page 1 of 1

Exporting data generated by a simulation

Posted: Mon Apr 21, 2008 2:55 am
by kathryn
I've had a look at various Neuron help documents (e.g. FAQ) and searched the forum, but can't find an answer to this question...

Can you export the results plotted in a Neuron graph (e.g. membrane potential vs time) as 'raw data' for use in other software? If so, how?

I would like to view the simulated results in programs such as Origin or AxoScope, so only a basic text file format is required.

Posted: Mon Apr 21, 2008 9:35 am
by ted
If you only want to do this once, use the Print & File Window Manager to print to an ASCII file--
see this item in the FAQ list:
Q: How do I print a hard copy of a NEURON window?

But if you need to do this more than just a very few times, it's best to do it under program
control by capturing streams of values to one or more Vectors with the Vector class's
record() method. Then after the end of the simulation write them to one or more files with
the Vector class's printf() method. The Vector class and its methods are described here:
http://www.neuron.yale.edu/neuron/stati ... tml#Vector

This discussion thread contains additional information about Vector record:
https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=495