• Comparing complex simulations: grvec.hoc\b
  • Running a simulation
  • Saving and loading simulations
  • Using trays
  • Comparing simulations
  • Evaluating multiple parameters (parset)
  • grvec reference
  • decvec.hoc routines
  • spkts.hoc routines
  • boxes.hoc routines
  • Using outvec

    Comparing complex simulations: grvec.hoc (TOC)

    There are many ways of doing graphics in neuron. The simplest is simply to put up graphics windows and graph directly onto them. If one is running large simulations or lots of simulations this is impractical for two reasons. You will not be able to graph everything so you will have to rerun the sim if you want to see anything else. Also the graphics will slow you down - lots of graphics will slow you down a lot. The obvious alternative is to save the data as you go along. Data can be saved to disk but then has to be reaccessed to look at it graphically. Alternatively, data can be stored in memory and then graphed or saved. This is most efficiently done using Zach Mainen's vector package.

    Grvec contains a set of routines for rapid and memory-efficient storage, access and graphing of data. A variety of routines are used but the basic steps are save, write, read and graph.

    Saving uses the vec.record command. The data to be stored is listed in a list called printlist. Each item in the printlist gives the name of the variable being stored and the vector in which the data is being stored. Items can be added to the printlist in 2 ways: new printlist item("cell[0].soma.v(0.5)") will do the obvious record(tmplist,"soma.v(0.5)") will take all the objects in tmplist (perhaps a list of all cell[#]) and add their soma voltage to the printlist

    Graphing or saving can be done after a simulation has been done. This is done from the vecpanel which is launched using the procedure of the same name. The basic commands are all menu driven and quite simple. Complexities in the package come primarily when one is superimposing different simulations.

    Saving and reading using grvec are highly efficient since fwrite and fread commands are used to rapidly copy chunks of memory between RAM and disk. For optimal speed grvec uses a nasty mixed file format with both ascii and byte storage. This allows data to be picked up very quickly with a seek and fread.

    Reading saved files is now quite simple using the file chooser window that comes up with the appropriate button. Since a major goal of the package is to permit comparisons between different simulations, one can read multiple files whose data can then be superimposed. In order to implement this, each file is associated with a separate attribute panel which is identified by a number. Attribute panel #0 is always the current simulation if there is one, which has not necessarily been saved to disk. The attribute panel for a particular data set will control things like line color and line type and permit you to do global things like graph all of the data, rescale all the associated graphs or remove all of the associated graphs.

    There are also associated utility files: 1) parset.hoc assists with parameter explorations 2) spkts.hoc calculates spike times, instantaneous frequencies etc. 3) boxes.hoc allows you to graph rows and columns in a tray, 4) utility files decvec.hoc and declist.hoc declare utility routines. Basic routines from these ancillary files are listed at bottom.

    Running a simulation (TOC)

    Saving and loading simulations (TOC)

    Using trays (TOC)

    Comparing simulations (TOC)

    Evaluating multiple parameters (parset) (TOC)

    grvec reference (TOC)

    Contains GUI and hoc routines for managing and displaying vectors.
    The major panels are vecpanel() and attribute panels.

    decvec.hoc routines (TOC)

    spkts.hoc routines (TOC)

    boxes.hoc routines (TOC)

    Using outvec (TOC)

    Generally grvec stores the complete time course of a run in individual vectors for each state variable chosen. If simulation duration is long then these vectors will take a lot of memory. outvec == 'output vector' allows the use of smaller vectors by dumping them at shorter time intervals.