MorrisLecar#

class brainpy.state.MorrisLecar(in_size, V_Ca=Quantity(130., "mV"), g_Ca=Quantity(4.4, "mS"), V_K=Quantity(-84., "mV"), g_K=Quantity(8., "mS"), V_leak=Quantity(-60., "mV"), g_leak=Quantity(2., "mS"), C=Quantity(20., "uF"), V1=Quantity(-1.2, "mV"), V2=Quantity(18., "mV"), V3=Quantity(2., "mV"), V4=Quantity(30., "mV"), phi=Quantity(0.04, "kHz"), V_th=Quantity(10., "mV"), V_initializer=Uniform(low=-70. mV, high=-60. mV), W_initializer=Constant(value=0.02), spk_fun=ReluGrad(alpha=0.3, width=1.0), spk_reset='soft', name=None)#

The Morris-Lecar neuron model.

Model Descriptions

The Morris-Lecar model (Also known as \(I_{Ca}+I_K\)-model) is a two-dimensional “reduced” excitation model applicable to systems having two non-inactivating voltage-sensitive conductances. This model was named after Cathy Morris and Harold Lecar, who derived it in 1981. Because it is two-dimensional, the Morris-Lecar model is one of the favorite conductance-based models in computational neuroscience.

The original form of the model employed an instantaneously responding voltage-sensitive Ca2+ conductance for excitation and a delayed voltage-dependent K+ conductance for recovery. The equations of the model are:

\[\begin{split}\begin{aligned} C\frac{dV}{dt} =& - g_{Ca} M_{\infty} (V - V_{Ca}) - g_{K} W(V - V_{K}) - g_{Leak} (V - V_{Leak}) + I_{ext} \\ \frac{dW}{dt} =& \frac{W_{\infty}(V) - W}{\tau_W(V)} \end{aligned}\end{split}\]

Here, \(V\) is the membrane potential, \(W\) is the “recovery variable”, which is almost invariably the normalized \(K^+\)-ion conductance, and \(I_{ext}\) is the applied current stimulus.

Parameters:
  • in_size (Size) – Size of the input to the neuron.

  • V_Ca (ArrayLike, default 130. * u.mV) – Equilibrium potential of Ca+.

  • g_Ca (ArrayLike, default 4.4 * u.msiemens) – Maximum conductance of Ca+.

  • V_K (ArrayLike, default -84. * u.mV) – Equilibrium potential of K+.

  • g_K (ArrayLike, default 8. * u.msiemens) – Maximum conductance of K+.

  • V_leak (ArrayLike, default -60. * u.mV) – Equilibrium potential of leak current.

  • g_leak (ArrayLike, default 2. * u.msiemens) – Conductance of leak current.

  • C (ArrayLike, default 20. * u.ufarad) – Membrane capacitance.

  • V1 (ArrayLike, default -1.2 * u.mV) – Potential at which M_inf = 0.5.

  • V2 (ArrayLike, default 18. * u.mV) – Reciprocal of slope of voltage dependence of M_inf.

  • V3 (ArrayLike, default 2. * u.mV) – Potential at which W_inf = 0.5.

  • V4 (ArrayLike, default 30. * u.mV) – Reciprocal of slope of voltage dependence of W_inf.

  • phi (ArrayLike, default 0.04 / u.ms) – Temperature factor.

  • V_th (ArrayLike, default 10. * u.mV) – Spike threshold.

  • V_initializer (Callable) – Initializer for membrane potential.

  • W_initializer (Callable) – Initializer for recovery variable.

  • spk_fun (Callable, default surrogate.ReluGrad()) – Surrogate gradient function.

  • spk_reset (str, default 'soft') – Reset mechanism after spike generation.

  • name (str, optional) – Name of the neuron layer.

V#

Membrane potential.

Type:

HiddenState

W#

Recovery variable.

Type:

HiddenState

See also

HH

Full Hodgkin-Huxley four-variable model.

WangBuzsakiHH

Modified HH model for hippocampal interneurons.

Notes

  • The Morris-Lecar model is a two-dimensional reduction of the Hodgkin-Huxley model [1].

  • This implementation uses exponential Euler integration for numerical stability.

  • For detailed analysis and applications of this model, see [2] and [3].

References

Examples

>>> import brainpy
>>> import brainstate
>>> import saiunit as u
>>> # Create a Morris-Lecar neuron layer with 10 neurons
>>> ml = brainpy.state.MorrisLecar(10)
>>> # Initialize the state
>>> ml.init_state(batch_size=1)
>>> # Apply an input current and update the neuron state
>>> spikes = ml.update(x=100.*u.uA)
get_spike(V=None)[source]#

Generate spikes based on neuron state variables.

This abstract method must be implemented by subclasses to define the spike generation mechanism. The method should use the surrogate gradient function self.spk_fun to enable gradient-based learning.

Parameters:
  • *args – Positional arguments (typically state variables like membrane potential)

  • **kwargs – Keyword arguments

Returns:

Binary spike tensor where 1 indicates a spike and 0 indicates no spike.

Return type:

ArrayLike

Raises:

NotImplementedError – If the subclass does not implement this method.

init_state(batch_size=None, **kwargs)[source]#

State initialization function.

reset_state(batch_size=None, **kwargs)[source]#

State resetting function.