I'm trying to record the membrane potential of a presynaptic and postsynaptic neuron. I've tried:
Code: Select all
cv = h.CVode(1)
cv.active(1)
t_record = linspace(0, tstop, (tstop/dt))
t_rec = h.Vector(t_record)
zeroed_rec = zeros((tstop/dt),dtype=float)
vpost_rec = h.Vector(zeroed_rec)
vpre_rec = h.Vector(zeroed_rec)
h.finitialize(h.v_init)
h.fcurrent()
cv.re_init()
precell.soma.push()
cv.record(precell.soma(0.5)._ref_v, vpre_rec, t_rec, 1)
h.pop_section()
postcell.dend[2].push()
cv.record(postcell.dend[2](0.5)._ref_v, vpost_rec, t_rec, 1)
h.pop_section()
h.run()
t_output = array(t_rec)
vpost_output = array(vpost_rec)
vpre_output = array(vpre_rec)
What is the correct way to do this? How can I record multiple variables while using a variable timestep integration?
thanks in advance.