As I'm actually interested in the total current of each kind, so I figured I can run the simulation for 100ms, calculate the total current, and resume for another 100ms, and so on.
The part I'm missing is how to restart recording using vectors. Documentation say (in http://www.neuron.yale.edu/neuron/stati ... tml#record) that recording works until the vector is destroyed, so I thought you may just create a new vector and remove the reference for the previous one, and python's gc will do the rest:
Code: Select all
def record_var(sec, var):
vec = neuron.h.Vector()
varRef = '_ref_' + var
vec.record(getattr(sec, varRef))
my_variables[sec][var] = vec
What do I miss here? Is the old vec which was in my_variables[sec][var] still alive, preventing me from recording the same variable into the new vector?