Using my own generated spike trains as input

The basics of how to develop, test, and use models.
Post Reply
steve

Using my own generated spike trains as input

Post by steve »

Hi,

I am very new to NEURON and wanted to know how I would go about to do the following:

I generated a set of spike trains in matlab. I want to "input" those spike trains to the dendrites of an L5 pyramidal model I found on modeldb. I found the following FAQ page section: http://www.neuron.yale.edu/neuron/faq#playevents. Would the best way to procede be to write the +/- 5000 spike trains I generated in matlab out to a file and then read them into NEURON vectors and procede as the FAQ shows?

Thanks a lot
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

Unless there is someone out there who created a more elegant solution already, my guess would be yes, but admittedly I haven't tried the VecStim code .

The event delivery system is described in the folllowing documents at which you might want to have glance before starting out:
http://www.neuron.yale.edu/neuron/paper ... poster.pdf
http://www.neuron.yale.edu/ftp/ted/book/chap10.pdf

The vector class has its own facilities for reading directly from a ascii file
http://www.neuron.yale.edu/neuron/stati ... html#scanf
http://www.neuron.yale.edu/neuron/stati ... ml#scantil

Because the vector class has the ability to read ascii files built in, I guess that with a few hours of coding you should be able to get a working solution.

The alternatives probably require more coding and might even involve learning to write mod-files.

Elsewhere in this forum you can find a post on reading neuron binary data into matlab, so if you want to use a binary format you might start there.
ted
Site Admin
Posts: 6302
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Using my own generated spike trains as input

Post by ted »

steve wrote:I generated a set of spike trains in matlab. I want to "input" those spike trains to the dendrites of an L5 pyramidal model I found on modeldb. I found the following FAQ page section: http://www.neuron.yale.edu/neuron/faq#playevents.
The answer to that particular faq was out of date--sorrry about that! I have now fixed it.

In brief, the NetCon class has an event() method which, in conjunction with the
FInitializeHandler class, can be used to do exactly what you want very easily.
Also straightforward to extend to multiple synapses and spike event streams.
Would the best way to procede be to write the +/- 5000 spike trains I generated in matlab out to a file and then read them into NEURON vectors and procede as the FAQ shows?
Write them as plain ASCII. Quickest way to read them from a file into a Vector is with
the Vector class's scanf() method. Then use the Vector as per the faq.
Post Reply