class HH_GATING_VARIABLES(par={})[source]
plot()[source]

Plot gating variables and time constants of the HH model

class HH_SOLUTION(par={})[source]
class HH_REFRACTORINESS(par=None)[source]

Refractoriness of the HH model.

f_sys(x0, t, i_ext, PULSE_ONSET)[source]

define HH Model

simulate(tspan=None, *args)[source]

Simulate the HH model.

Parameters:
tspanarray_like, optional

Time points (ms) at which to solve for membrane potential and gating variables. Default is np.arange(0, 50, 0.01).

argstuple, optional

Additional arguments to pass to the ODE solver.

Returns:
dict

Dictionary with keys “t”, “v”, “m”, “h”, “n” and values being the corresponding time points and membrane potential and gating variables.

class RTM_GATING_VARIABLES(par={})[source]
class Erisir_Burst(par={})[source]

The Erisir neuron with a slow potassium current that is strengthened by firing which turns the neuron into a burster.

Reference: An introduction to modeling neuronal dynamics, Borgers, Chapter 19.

f_sys(x0, t)[source]

define Erisir Model

class HH(par={})[source]

Hudgkin Huxley Model

>>> par = {'i_ext': 1.5, 't_end': 100.0, 'v0': -70.0, 'dt': 0.01}
>>> model = HH(par)
>>> sol = model.simulate()
>>> plt.plot(sol['t'], sol['v'])
check_parameters(par)[source]

Check if the parameters are valid

f_sys(x0, t)[source]

define HH Model

simulate(tspan=None, x0=None)[source]

simulate the model

Parameters:
tspanarray

time span for simulation

Returns:
dict: {t, v, m, h, n}

time series of v, m, h, n

class HH_Reduced(par={})[source]
f_sys(x0, t)[source]

define HH Model

simulate(tspan=None, x0=None)[source]

simulate the model

Parameters:
tspanarray

time span for simulation

Returns:
dict: {t, v, n}

time series of v, n

class HH_F_I_CURVE(par={})[source]
simulate_F_I(vec_i_ext, tspan=None, directions='both')[source]

simulate the model with given vector of i_ext and calculate F-I curve

Parameters:
vec_i_extarray

vector of i_ext

tspanarray

time span for simulation

directionsstr

‘forward’ or ‘backward’ or ‘both’

Returns:
dict: {i_ext, freq}
plot_F_I(data, ax=None)[source]

plot F-I curve

class HH_2D_F_I_CURVE(par={})[source]
simulate_F_I(vec_i_ext, tspan=None, directions='both')[source]

simulate F-I curve for reduced HH model

Parameters:
vec_i_extarray_like

external current

tspanarray_like, optional

time span, by default None

directionsstr or list, optional

direction of current, by default ‘both’ options: ‘forward’, ‘backward’, ‘both’

Returns:
dict {i_ext, freq}
plot_F_I(data, ax=None)[source]

plot F-I curve

class Inapik(par: dict = {})[source]

Inapik neuron model

>>> par = {'}
>>> model = Inapik(par)
>>> sol = model.simulate()
>>> plt.plot(sol['t'], sol['v'])
check_parameters(par)[source]

Check if the parameters are valid

f_sys(x0, t)[source]

define Model

class LIF(par={})[source]

Linear Integrate-and-Fire (LIF) Model

>>> par = {'i_ext': 0.11, 't_end': 100.0, 'v0': -70.0, 'dt': 0.01}
>>> model = LIF(par)
>>> sol = model.simulate()
>>> plt.plot(sol['t'], sol['v'])
check_parameters(par)[source]

Check if the parameters are valid

class LIF_Addapt(par={})[source]

Linear Integrate-and-Fire (LIF) Model with Adaptation

>>> par = {'i_ext': 0.13, 't_end': 100.0, 'v0': -70.0, 'dt': 0.01}
>>> model = LIF_Addapt(par)
>>> sol = model.simulate()
>>> plt.plot(sol['t'], sol['v'])
class RTM(par: dict = {})[source]

Reduced Traub-Miles Model of a Pyramidal Neuron in Rat Hippocampus

>>> par = {'i_ext': 1.5, 't_end': 100.0, 'v0': -70.0, 'dt': 0.01}
>>> model = RTM(par)
>>> sol = model.simulate()
>>> plt.plot(sol['t'], sol['v'])
check_parameters(par)[source]

Check if the parameters are valid

f_sys(x0, t)[source]

define RTM Model

class RTM_M(par: dict = {})[source]

Reduced Traub-Miles neuron model with M-current Simulate the model with parameters given in the dictionary par:

>>> par = {'i_ext': 1.5, 't_end': 100.0, 'v0': -70.0, 'dt': 0.01}
>>> model = RTM_M(par)
>>> sol = model.simulate()
>>> plt.plot(sol['t'], sol['v'])
f_sys(x0, t)[source]

define RTM Model with M-current

simulate(tspan=None, x0=None)[source]

simulate the model

Parameters:
tspanarray_like

time span

x0array_like

initial state

Returns:
dict

time series of membrane potential (v), activation variables m, h, n and w

class RTM_AHP(par: dict = {})[source]
f_sys(x0, t)[source]

define RTM Model with AHP-current

class RTM_2D(par: dict = {})[source]

Reduced 2-dimensional Traub-Miles Model of a Pyramidal Neuron in Rat Hippocampus as defined in Eq. 12.1-2 in [1]

References: [1] Börgers, C., 2017. An introduction to modeling neuronal dynamics (Vol. 66). Berlin: Springer.

check_parameters(par)[source]

Check if the parameters are valid

f_sys(x0, t)[source]

define Reduced 2D RTM Model

jacobian(x0)[source]

Jacobian of the Reduced 2D RTM Model

classify_eig(E)[source]

Classify the eigenvalues of the Jacobian both real and negative: stable both real and positive: unstable complex conjugate pair, negative real part: stable spiral complex conjugate pair, positive real part: unstable spiral both real, one positive, one negative: saddle

simulate_bif(i_ext_vec)[source]

Simulate the bifurcation diagram

plot_bif(stability, ax=None)[source]

Plot the bifurcation diagram

class RTM_F_I_CURVE(par={})[source]
simulate_F_I(vec_i_ext, tspan=None, directions='both')[source]

Simulate the F-I curve with a sequence of i_ext

plot_F_I(data, ax=None)[source]

plot F-I curve

class RTM_ins(par: dict = {})[source]

Reduced Traub-Miles Model of a Pyramidal Neuron in Rat Hippocampus with nearly instantaneous rise synapse.

f_sys(x0, t)[source]

define RTM Model

class RTM_gra(par: dict = {})[source]

Reduced Traub-Miles Model of a Pyramidal Neuron in Rat Hippocampus with gradual rise synapse.

f_sys(x0, t)[source]

define RTM Model

class RTM_2s(par: dict = {})[source]

Reduced Traub-Miles Model of a Pyramidal Neuron in Rat Hippocampus with 2 variable for synaptic gating variables. Eq 20.8-10

f_sys(x0, t)[source]

define RTM Model