Saving results in a file?

Anything that doesn't fit elsewhere.
Post Reply
Sandrine

Saving results in a file?

Post 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.
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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.
Sandrine

Post 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)
}

??
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Did you declare
objref nil
?
Sandrine

Post 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.
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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.
Post Reply