Help exporting neuron geometry and voltages over time
Posted: Fri May 22, 2015 11:20 am
I am trying to export the voltage at each compartment of a 3d neuron geometry over time (100ms). The code I am using creates a physiologically realistic neuron model (Cortex Layer V), and I need to create a matrix of voltages at each compartment at each time point. Below is the basic matrix that I am trying to create.
0 1 2 3 4 5 ..... T
x1 y1 z1 d1 . . .
x2 y2 z2 d2 . .
. . . . .
. . . .
. . . .
xn yn zn dn
I am trying to split this into two parts. First, I am getting the position data into an array with the following code:
This works pretty well.
Now I need to record the voltages at each position. I am trying to do something similar, but it is not working. This is what I have so far.
My only question is, what do I put in the parenthesis of in order to record the voltage at that 3d location? If I just put &v, I get the same voltage for every position of a given segment. Is this the best I can do, or can I get a specific voltage at each section?
Thanks!
0 1 2 3 4 5 ..... T
x1 y1 z1 d1 . . .
x2 y2 z2 d2 . .
. . . . .
. . . .
. . . .
xn yn zn dn
I am trying to split this into two parts. First, I am getting the position data into an array with the following code:
Code: Select all
num3d=0
forall { num3d=num3d+n3d() }
objref positionArray[num3d]
proc RECpositions() {
i=0
forall {
for j=0,n3d()-1 {
positionArray[i]=new Vector(4)
positionArray[i].x[0]=x3d(j)
positionArray[i].x[1]=y3d(j)
positionArray[i].x[2]=z3d(j)
positionArray[i].x[3]=diam3d(j)
i=i+1
}
}
}
RECpositions()
Now I need to record the voltages at each position. I am trying to do something similar, but it is not working. This is what I have so far.
Code: Select all
objref voltageArray[num3d+1]
for i=0,num3d {voltageArray[i]=new Vector()}
proc RECvoltages() {
voltageArray[0].record(&t)
i=0
forall {
for j=0,n3d()-1 {
i=i+1
voltageArray[i].record(WHAT GOES HERE?)
}
}
}
Code: Select all
voltageArray[i].record()
Thanks!