Alpha#
- class brainpy.state.Alpha(in_size, name=None, tau=Quantity(8., "ms"), g_initializer=Constant(value=0. mS))#
Alpha synapse model.
This class implements the alpha function synapse model, which produces a smooth, biologically realistic synaptic conductance waveform. The model is characterized by the differential equation system:
dh/dt = -h/tau dg/dt = -g/tau + h/tau
This produces a response that rises and then falls with a characteristic time constant \(\tau\), with peak amplitude occurring at time \(t = \tau\).
- Parameters:
in_size (
Size) – Size of the input.name (
str, optional) – Name of the synapse instance.tau (
ArrayLike, default8.0*u.ms) – Time constant of the alpha function in milliseconds.g_initializer (
ArrayLikeorCallable, defaultinit.Constant(0. * u.mS)) – Initial value or initializer for synaptic conductance.
- g#
Synaptic conductance state variable.
- Type:
HiddenState
- h#
Auxiliary state variable for implementing the alpha function.
- Type:
HiddenState
- tau#
Time constant of the alpha function.
- Type:
Parameter
See also
Notes
The alpha function is defined as g(t) = (t/tau) * exp(1-t/tau) for t ≥ 0. This implementation uses an exponential Euler integration method. The output of this synapse is the conductance value.
References
Examples
>>> import brainpy >>> import brainstate >>> import saiunit as u >>> # Create an alpha synapse with 8 ms time constant >>> syn = brainpy.state.Alpha(100, tau=8.*u.ms) >>> syn.init_state(batch_size=1) >>> # Step the synapse >>> g = syn.update()