finitialize() not working?
Posted: Sat Feb 08, 2020 10:10 am
I am preparing a simple PYTHON-NEURON tutorial and found I am unable to use finitialize() properly.
In the minimal code, below, the initial condition set by finitialize(-100) is ignored and the simulated voltage trace starts at -65mV. Why?
Can anybody help me, understanding where is my mistake? Thank you!
In the minimal code, below, the initial condition set by finitialize(-100) is ignored and the simulated voltage trace starts at -65mV. Why?
Can anybody help me, understanding where is my mistake? Thank you!
Code: Select all
from neuron import h
from matplotlib import pyplot
h.load_file('stdrun.hoc')
soma = h.Section(name='soma')
soma.insert('pas')
v_vec = h.Vector()
v_vec.record(soma(0.5)._ref_v)
h.finitialize(-100)
h.tstop = 50.0
h.run()
pyplot.plot(v_vec)
pyplot.show()