Page 1 of 1

Saving results in a file?

Posted: Tue Mar 20, 2007 10:55 am
by Sandrine
Hi,

I have done a little network of 8 neurons (3 compartments: axon, soma, dend). Each of them are controlled by an Input neuron which is stimulated by an IClamp on its soma. Furthermore, my 8 neurons are connected together by synapses.

Now, i am trying to save the time at which my neurons are spiking in a file, after my simulation.
So i would like to have in the first column the neuron numbers (from 0 to 7) and in the second column of the file, the time at which each neuron fired (i put a threshold of -20 for all synapses).

How can i do that?

Thanks for your help,

Sandrine.

Posted: Tue Mar 20, 2007 11:17 am
by ted
Use the NetCon class's record() method to capture spike times and cell ID numbers to a
pair of Vectors (for an example see
https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=824
). Then print the Vectors to a File.

Posted: Tue Mar 20, 2007 1:57 pm
by Sandrine
Ok thanks a lot, but i have an error message which occurs:

"if arg 1 is an object it must be a point process or NULLObject
NetCon(..., NULLobject)"

when i am writting:

for i = 0, cells.count()-1 {
tobj = new NetCon(cells.object(i), nil)
tobj.record(stvec, idvec, i)
}

??

Posted: Tue Mar 20, 2007 2:20 pm
by ted
Did you declare
objref nil
?

Posted: Tue Mar 20, 2007 2:28 pm
by Sandrine
Yes.

But i think i have a problem because i didn't create a list of cells.
I have only created a list of netcon objects for all the synapses.

Posted: Tue Mar 20, 2007 4:37 pm
by ted
My mistake in (mis)interpreting the error message. I tend to think in terms of vectors and
lists, for which the the 1st item has an index of 0.

Lists are convenient because they simplify the task of iterating over a collection of things.
You have a choice: append your cells to a List, or figure out some other way to iterate over
them.