Hi Ted,
Thanks for the quick reply. I think my issue is resolved, but let me give the long form of my question for completeness. When parsing through the McIntyre MRG model, I came across this block of code:
Code: Select all
for i=0, paranodes1-1 {
MYSA[i]{
nseg=1
diam=fiberD
L=paralength1
Ra=rhoa*(1/(paraD1/fiberD)^2)/10000
cm=2*paraD1/fiberD
insert pas
g_pas=0.001*paraD1/fiberD
e_pas=-80
insert extracellular xraxial=Rpn1 xg=mygm/(nl*2) xc=mycm/(nl*2)
}
I conceptually understood what was going on until the the last line. After importing the mechanism using python, I tried to edit the variables of my section by doing:
Code: Select all
cur_node.insert("extracellular")
cur_node.xraxial = x
but I was thrown a:
Digging into the extracellular mechanism documentation, I found that the variable xraxial is actually a list of 2 variables, so they can be properly accessed with:
Code: Select all
cur_node.insert("extracellular")
cur_node.xraxial[0] = 5
cur_node.xraxial[1] = 5
My conclusion from all of this is the Hoc syntax actually changed the value of both variables, where in python you need to explicitly set each one individually. I am aware that all of this could be avoided by using the neuron.hoc.HocObject() class, but as a python enthusiast, I wanted to understand the equivalent syntax between the two ways of accessing neuron.
Thanks,
Gordon