If I wished to know peak synaptic current on an IntFire4, this is presumably through IntFire4.E ?
How would I record the current to a vector so that I can then find the maximum value?
I tried vector.record(IF.E) and similar variations. Help? Thanks!
vector.record()
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: vector.record()
E, I, and M are functions, not doubles. Attempting to use the Vector class's record(), e.g. by
vec.record(&foo.E)
will produce error messages like this:
You can instead record the actual state e itself
vec.record(&foo.e)
It won't be pretty because e is evaluated only when a new event arrives so e will look like a staircase, but it should work.
vec.record(&foo.E)
will produce error messages like this:
Code: Select all
nrniv: Not a double pointer
near line 10
vec.record(&foo.E)
^
vec.record(&foo.e)
It won't be pretty because e is evaluated only when a new event arrives so e will look like a staircase, but it should work.
Re: vector.record()
This ModelDB http://senselab.med.yale.edu/modeldb/Sh ... del=115357 entry with accession number 115357 contains code for printing the function M over time, and also for a special combination of E and I.
That being said I like to point out that all "currents" in the IntFire4 (excitatory and inhibitory) are normalized such that the peak value of m (M) due to an isolated single synaptic activation equals the weight of the activated synapse (NetCon). The same holds for the intermediate currents e and i2.
That being said I like to point out that all "currents" in the IntFire4 (excitatory and inhibitory) are normalized such that the peak value of m (M) due to an isolated single synaptic activation equals the weight of the activated synapse (NetCon). The same holds for the intermediate currents e and i2.
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: vector.record()
Good point, Raj. And anything that can be printed can also be appended to a Vector. So that's one way to capture the "time course" of E, I, etc..Raj wrote:This ModelDB http://senselab.med.yale.edu/modeldb/Sh ... del=115357 entry with accession number 115357 contains code for printing the function M over time, and also for a special combination of E and I.
A general strategy for doing any kind of calculation before or after each time step is to use a custom proc advance(). The advance() built into NEURON's standard run system is
Code: Select all
proc advance() {
fadvance()
}
Code: Select all
objref evec, ivec, mvec
evec = new Vector()
ivec = new Vector()
mvec = new Vector()
proc capture() {
evec.append(cell.E())
ivec.append(cell.I())
mvec.append(cell.M())
}
proc advance() {
fadvance()
capture()
}
If you decide to run another simulation without exiting NEURON, you must first resize these three vectors to 0. That can be done with an FInitializeHandler.that calls a procedure to resize the Vectors (left as an exercise to the reader, who is referred to the Programmer's Reference for documentation of the FInitializeHandler and Vector classes).