NMDA#
- class braincell.synapse.NMDA(in_size, alpha1=Quantity(2., 'kHz'), beta1=Quantity(0.01, 'kHz'), alpha2=Quantity(1., 'kHz'), beta2=Quantity(0.5, 'kHz'), T=1.0)[source]#
NMDA synapse model class.
This class implements the dynamics of an NMDA-type synapse using an exponential Euler integration scheme. The synaptic conductance is updated based on presynaptic spike input and multiple time constants.
- Parameters:
in_size (
int|Sequence[int] |integer|Sequence[integer]) – The input size or shape of the synapse.alpha1 (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – The rise rate constant for the synaptic conductance g. Defaults to 2 / ms.beta1 (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – The decay rate constant for the synaptic conductance g. Defaults to 0.01 / ms.alpha2 (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – The rise rate constant for the auxiliary variable x. Defaults to 1 / ms.beta2 (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – The decay rate constant for the auxiliary variable x. Defaults to 0.5 / ms.T (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – The synaptic efficacy or scaling factor. Defaults to 1.0.
- init_state(**kwargs)[source]#
Initialize the hidden states g (synaptic conductance) and x (auxiliary variable) to zeros.
- reset_state(**kwargs)[source]#
Reset the hidden states g (synaptic conductance) and x (auxiliary variable) to zeros.
- update(pre_spike)[source]#
Update the synaptic conductance g and auxiliary variable x based on the presynaptic spike input.
- The updates follow the differential equations:
dg/dt = alpha1 * x * (1 - g) - beta1 * g braincell/dt = alpha2 * pre_spike * T * (1 - x) - beta2 * x
- Parameters:
pre_spike – Presynaptic spike input.
- Returns:
Updated synaptic conductance value g.