I have another question with regard to this post.
I am making shape plots of the max PSP deflection at each point of a neuron caused by an inhibitory synapse. To calculate the deflection I use a mechanism:
minv.mod
Code: Select all
NEURON {
SUFFIX minv
RANGE v0, vipsp
}
ASSIGNED {
v (millivolt)
v0 (millivolt)
vipsp (millivolt)
}
INITIAL {
v0 = v
vipsp = v - v0
}
AFTER SOLVE {
if (v - v0 < vipsp) {
vipsp = v - v0
}
}
I insert this mechanism into my code via:
After I make the PlotShape() I want to scale the range of the plot automatically. To do this I need to calculate the minimum and maximum vipsp_minv values so I can set them as the limits. To do this I do:
Code: Select all
min = 1000
max = -min
forall for (x,0) {
if (vipsp_minv(x)>max) max = vipsp_minv(x)
if (vipsp_minv(x)<min) min = vipsp_minv(x)
sizePSPvector=sizePSPvector+1
}
Then I can use min and max to set the range of my shape plot:
Code: Select all
objref sh
sh = new PlotShape()
sh.variable("vipsp_minv")
sh.scale(min, max)
sh.exec_menu("Shape Plot") //brings out color
All of this works great. Now is where I am running into problems. I want to make another shape plot; only, in this one I would like to plot the same vipsp_minv values normalized by the maximal voltage deflection generated at the location of the synapse (this is equal to min since this is an inhibitory synapse). Basically I want to do the equivalent of:
Code: Select all
objref sh
sh = new PlotShape()
sh.variable("vipsp_minv/min")
sh.scale(0, 1)
sh.exec_menu("Shape Plot") //brings out color
The code above doesn't work. So, I am trying to put vipsp_minv/min in a vector or something so that I can put that variable into the sh.variable(" "). I have tried things like:
Code: Select all
objref normminv
normminv = new Vector(sizePSPvector)
i=-1
forall for (x ,0){
i=i+1
normminv.set(i, vipsp_minv(x)/min)
print i, x, vipsp_minv(x)/min, normminv.get(i)
}
However this does not put all the values (which I have confirmed are being calculated via the print statement) into the normminv variable. Can you suggest a way to do what I am trying to do?
Thanks in advance!
Corinne