Exp2Syn#
- class braincell.synapse.Exp2Syn(size, name=None, tau1=Quantity(0.1, 'ms'), tau2=Quantity(10., 'ms'), e=Quantity(0., 'mV'))[source]#
NEURON-compatible Exp2Syn template.
This class follows the dynamics in NEURON’s
exp2syn.mod:states:
AandBinuSdecay:
A' = -A / tau1,B' = -B / tau2conductance:
g = B - Ainward-positive point current:
I = g * (e - V_post)step-boundary event:
A <- A + weighted_pre_drive * factorand same forB
- Parameters:
size (
int|Sequence[int] |integer|Sequence[integer]) – Packed synapse shape.tau1 (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – Positive rise time constant, default 0.1 ms.tau2 (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – Decay time constant greater than tau1, default 10 ms.e (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – Reversal voltage, default 0 mV.
- compute_derivative(V_post=None)[source]#
Compute the derivative of the channel’s state variables.
This method should be implemented by subclasses to calculate how the channel’s state changes over time.
- Parameters:
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Raises:
NotImplementedError – This method must be implemented by subclasses.
- current(V_post)[source]#
Calculate the current for this ion channel.
This method should be implemented by subclasses to compute the current based on the channel’s specific properties and state.
- Parameters:
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Raises:
NotImplementedError – This method must be implemented by subclasses.
- root_type#
alias of
HHTypedNeuron
- classmethod validate_parameter_values(parameters)[source]#
Require
tau1 < tau2elementwise.- Return type:
Notes
The comparison runs in numpy, not
u.math/jnp. Under an open JAX trace every jax operation returns a tracer even when all its inputs are concrete, sobool()on au.math.anyreduction would raiseTracerBoolConversionErrorand make this class impossible to construct inside a jitted setup function. numpy stages nothing, and it is what the siblingpositive()validator already uses.Both mantissas are taken in
msrather than compared as quantities, so that a caller mixingusandmsis ordered on physical duration rather than on raw magnitude.