from neuron import h
from cell import Cell

h.load_file('stdrun.hoc')

my_cell = Cell(0)


ns = h.NetStim()
ns.number = 1
ns.start = 4  # ms

nc = h.NetCon(ns, my_cell.syn)
nc.delay = 1  # ms
nc.weight[0] = 0.01

h.tstop = 50

ps = h.PlotShape()
ps.show(0)

g = h.Graph()
g.addvar('soma(0.5).v', my_cell.soma(0.5)._ref_v)
g.size(0, 50, -80, 50)
h.graphList[0].append(g)

print('running the new version')

h.finitialize(-65)
h.continuerun(h.tstop)
