In [1]:
from brian import *
from brian.library.ionic_currents import *
In [2]:
defaultclock.dt = .01 * ms
El = 10.6 * mV
EK = -12 * mV
ENa = 120 * mV
In [3]:
eqs = MembraneEquation(1 * uF) + leak_current(.3 * msiemens, El)
eqs += K_current_HH(36 * msiemens, EK) + Na_current_HH(120 * msiemens, ENa)
eqs += Current('I:amp')
neuron = NeuronGroup(1, eqs, implicit=True, freeze=True)
In [4]:
trace = StateMonitor(neuron, 'vm', record=True)
In [5]:
run(100 * ms, report='text')
neuron.I = 10 * uA
run(100 * ms, report='text')
neuron.I = 1e-5 * uA
run(200 * ms, report='text')
In [6]:
plot(trace.times / ms, trace[0] / mV)
show()