The linear integrate-and-fire (LIF) model keeps the passive accumulation of a membrane but replaces an action potential's ionic mechanism with a threshold and reset rule. The examples also measure the effective subthreshold behavior of the HH model before comparing the two descriptions.
Below threshold, voltage decays toward a driven equilibrium with membrane time
constant
The subthreshold equation and event rule are
Here
All five examples now live in one notebook, chapter07.ipynb,
with two simulate_* functions covering them: simulate_hh_subthreshold
backs LIF_NEURON_WITH_HH, SUBTHR_FOR_HH, and TAU_M_FOR_HH's figures
(HH voltage vs. the LIF linear approximation, the current decomposition,
and the effective time constant); simulate_lif_neuron(tau_m, i) backs
LIF_VOLTAGE_TRACE and LIF_VOLTAGE_TRACE_2. Each has an ipywidgets
slider to explore its parameters interactively.
In the LIF traces, the discontinuous reset is a declared convention, not a
numerically resolved membrane event. Compare it with the smooth HH trace in
LIF_NEURON_WITH_HH, then use SUBTHR_FOR_HH and TAU_M_FOR_HH to see why a
single fixed passive time constant is only an approximation.
- Run
LIF_VOLTAGE_TRACEand identify threshold and reset. - Run
LIF_VOLTAGE_TRACE_2to connect input strength with interspike timing. - Read the three HH comparison examples in the order listed above.
Chapters 01--04 provide the HH currents, gates, and trajectories used for comparison. Chapter 08 replaces the linear subthreshold term with a quadratic one; Chapter 09 adds slow adaptation to a LIF-style model.
Open chapter07.ipynb in Jupyter, or via the Colab
badge at the top of the notebook. Run all cells top to bottom; each
section's static figure reproduces the book's plot, and the interact(...)
cell below it lets you adjust that example's parameters with sliders.