My problem is I am new to NEURON and neuroscience. I need your help with two things.
1. I need to know the reference which can explain me what output is generated(membrane potential, spike plot, sodium current) from modelling of a network has a physical meaning.
2. I am able to create a gui for a spinal cord which 2 Right cell and 2 left cells connected through inhibitory and excitatory synapses and receives the stimulus from artifical neuron.
What I want to know, how to go from this stage to export membrane potential data and spike plot data for cells as .dat file
and if I have to increase the number of cells, what should I change in .hoc code which is generated automatically form gui.
how to export data from NEURON
Moderator: wwlytton
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to export data from NEURON
The sentence is broken so I don't understand it. Did you accidentally leave out one or more words? Or maybe you meant to write two shorter sentences? If you need general background information about NEURON, try reading chapters 5 and 6 of The NEURON Book, or readKG_UIUC wrote:I need to know the reference which can explain me what output is generated(membrane potential, spike plot, sodium current) from modelling of a network has a physical meaning.
Hines, M.L. and Carnevale, N.T.
The NEURON simulation environment.
Neural Computation 9:1179-1209, 1997
which is available from links at http://www.neuron.yale.edu/neuron/nrnpubs
Seehow to go from this stage to export membrane potential data and spike plot data for cells as .dat file
Exporting data generated by a simulation
viewtopic.php?f=15&t=1222
In brief, extract the cell class definitions (templates) from that file, then use them with your own hoc statements that create the necessary number of instances of each cell class and connect them with the appropriate network architecture, weights, and delays. This involves significant programming effort. This paperif I have to increase the number of cells, what should I change in .hoc code which is generated automatically form gui.
Hines, M.L. and Carnevale, N.T.
Translating network models to parallel hardware in NEURON.
J. Neurosci. Methods 169:425-455, 2008
(available from a link at http://www.neuron.yale.edu/neuron/nrnpubs, source code available from ModelDB https://senselab.med.yale.edu/modeldb/)
may be helpful, particularly the serial implementations of the ring and random network. The templates used in those were exported from a NetworkBuilder-managed toy model.
Re: how to export data from NEURON
Ted
I have 4 sets of data to be saved i.e four cells in a network for which I want to the v(0.5) for each cell.
after creating the gui of the network
I wrote following in the command window
>forall {
>print secname()
>}
C_Cell[0].soma
C_Cell[1].soma
C_Cell[2].soma
C_Cell[3].soma
%%%% then I wrote a code on command window to save the membrane potential vector from each cell from t=0 to 150;
proc setuprecording() { localobj tobj
iveclist = new List()
forall for x,o {
tobj.record(C_Cell[x].soma.v(0.5))
iveclist.append(tobj)
}
}
%%%% then I called this function
setuprecording()
but it gives me error
bad stack access:expecting(double*);really(double)
nrniv: interpreter stack error
near line 111
setuprecording()
^
Vector[144].record(23.917 )
%%%%%%%%%% and then I did following
>iveclist.count()
0
I really want to get this going..don't know..where I am making a mistake.
______________________________________________________________
Is there any key control to paste the commands or copy the commands
I have 4 sets of data to be saved i.e four cells in a network for which I want to the v(0.5) for each cell.
after creating the gui of the network
I wrote following in the command window
>forall {
>print secname()
>}
C_Cell[0].soma
C_Cell[1].soma
C_Cell[2].soma
C_Cell[3].soma
%%%% then I wrote a code on command window to save the membrane potential vector from each cell from t=0 to 150;
proc setuprecording() { localobj tobj
iveclist = new List()
forall for x,o {
tobj.record(C_Cell[x].soma.v(0.5))
iveclist.append(tobj)
}
}
%%%% then I called this function
setuprecording()
but it gives me error
bad stack access:expecting(double*);really(double)
nrniv: interpreter stack error
near line 111
setuprecording()
^
Vector[144].record(23.917 )
%%%%%%%%%% and then I did following
>iveclist.count()
0
I really want to get this going..don't know..where I am making a mistake.
______________________________________________________________
Is there any key control to paste the commands or copy the commands
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to export data from NEURON
Everything that appears in NEURON's terminal can be copied to the clipboard, whether under MSWin, OS X, or UNIX/Linux. But except for reporting bugs, that has relatively little utility.KG_UIUC wrote:Is there any key control to paste the commands or copy the commands
Direct entry into the interpreter terminal is OK for "one liners" e.g. forall print secname(). For anything more involved, it is best to use a plain text editor and save to a hoc file, which can then be xopened from the interpreter (or opened by a load_file() or xopen() statement in your program's main hoc file).then I wrote a code on command window
What is the "from t=0 to 150" supposed to do?then I wrote a code on command window to save the membrane potential vector from each cell from t=0 to 150;
1. Your code will be more readable if you use indentation to indicate the level of nesting. The Forum preserves indentation if you select the affected text and then click on the button labeled "Code" (just above the text entry area).proc setuprecording() { localobj tobj
iveclist = new List()
forall for x,o {
tobj.record(C_Cell[x].soma.v(0.5))
iveclist.append(tobj)
}
}
2. "forall for x,o" contains several errors. First and foremost, there is no need to try to iterate over all internal nodes if you merely want to iterate over the midpoint of each C_Cell's soma. forall will do the job.
3. Had iveclist already been declared to be an objref? I guess so, given that iveclist.count() returned a numerical value rather than an error message.
Yes, we all have more than enough to do, and too little time.I really want to get this going
Re: how to export data from NEURON
Ted
I will elaborate or indent my code
Summary: I have created an oscillator of two neurons which gets stimulus from artificial cell to start.
In all I have 2 cells and 1 artificial cell. Those 2 cells +1 artificial cells have network which has inhibitory synapses, excitatory synapses. Now I want to record the spike data automatically and save it to .dat file.
for which I wrote this procedure file
proc setuprecording() { localobj tobj
iveclist = new Vector() /// iveclist will be the vector which will have spike data
forall for x,o {
tobj.record(C_Cell[x].soma.v(0.5)) //// for all cells which is 2 cells, I want to record the spike data which is essentially the time when the membrane potential has reached threshold
iveclist.append(tobj) /////// this is so that I can concatenate the data of all cells or shall I create new vector for each cell?
}
}
I will elaborate or indent my code
Summary: I have created an oscillator of two neurons which gets stimulus from artificial cell to start.
In all I have 2 cells and 1 artificial cell. Those 2 cells +1 artificial cells have network which has inhibitory synapses, excitatory synapses. Now I want to record the spike data automatically and save it to .dat file.
for which I wrote this procedure file
proc setuprecording() { localobj tobj
iveclist = new Vector() /// iveclist will be the vector which will have spike data
forall for x,o {
tobj.record(C_Cell[x].soma.v(0.5)) //// for all cells which is 2 cells, I want to record the spike data which is essentially the time when the membrane potential has reached threshold
iveclist.append(tobj) /////// this is so that I can concatenate the data of all cells or shall I create new vector for each cell?
}
}
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to export data from NEURON
1. "time when the membrane potential has reached threshold" is not well defined. For example, the squid axon spike mechanism (Hodgkin-Huxley equations) does not have a "threshold." Some investigators like to define "spike time" as the time when the spike reaches its maximum depolarization. The problem with this definition is that you don't know you reached the maximum until after you pass it. A more practical definition of "spike time" is the point in the rising phase of the spike where membrane potential rises above a certain level; many investigators choose a value in the range of -20 to +10 mV.KG_UIUC wrote:I want to record the spike data which is essentially the time when the membrane potential has reached threshold
2. If you want to record spike times, why record the detailed time course of membrane potential? Why not just record the times at which membrane potential rises above whatever level you decide on? Use the NetCon class's record() method to do this (see the Programmer's Reference, and the examples in Translating network models to parallel hardware in NEURON (cited above).