Record i_membrane from extracellular in Python
Posted: Sun Feb 27, 2011 11:41 am
Hi, could use some help with recording float variables. I have some existing .hoc-code I want to transfer to Python;
I want to declare the same function in Python, but cannot locate some _ref_ for the i_membrane variable arising after inserting the extracellular mechanism, right now I have:
which do not work of course, since seg.i_membrane is a float. Any way I can do this properly? How can I find if there exist some h._ref_ for this or some other variable?
Code: Select all
objref memirec,memireclist
proc set_imem_recorders() { //Arguments: timeres_python, len(tvec)
memireclist = new List()
//records passive and capacitive currents
forsec allseclist {
for (x,0) {
//add recorder for i_membrane to each pos(x)
memirec = new Vector(size=$2)
memirec.record(&i_membrane(x),$1)
memireclist.append(memirec)
}
}
}
Code: Select all
def set_imem_recorders(self, tstopms):
'''record membrane currents for all compartments'''
memireclist = self.h.List()
for seg in self.h.allseclist:
memirec = self.h.Vector(size=tstopms/self.timeres_python+1)
memirec.record(seg.i_membrane, self.timeres_python) #Doesn't work!!
memireclist.append(memirec)