Page 1 of 1

Q about developing models: how to save simulation results?

Posted: Tue Nov 03, 2009 3:41 pm
by eschombu
7. Avoid writing your own "main computational loop" (i.e. a "for" or "while"
loop that calls fadvance() to march the simulation through time)--use the
standard run system's run() to launch simulations.
So then what method would you suggest for saving results? I currently use fadvance() to step through and save the data I need for later processing in vectors, lists, etc. I also don't save all the time steps in order to reduce my the number of post-simulation computations and output file size.

Re: Suggestions for how to develop models

Posted: Wed Nov 04, 2009 1:36 am
by ted
Use the Vector class's record() method, and defer writing data to file(s) until after the end of simulation execution. For documentation and examples, see the Programmer's Reference, and search the NEURON forum for "record" to find multiple posts that contain further discussion and more examples.