CalciumFirstOrder#
- class braincell.ion.CalciumFirstOrder(size, temp=Quantity(309.15, "K"), alpha=0.13, beta=0.075, Co=None, Ci_initializer=Constant(value=0.00024 mM), name=None, **channels)#
First-order calcium concentration model with rectified current drive.
- Parameters:
size (
int|Sequence[int] |integer|Sequence[integer]) – The size of the simulation target, typically the number of neurons or compartments. Forwarded unchanged toCalcium.temp (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – Absolute temperature used by the Nernst equation inE. Defaults to 36 degrees Celsius, converted to kelvin viau.celsius2kelvinbefore being stored.alpha (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – Scale factor applied to the rectified current-drive term inderivative(). Defaults to0.13(a bare, unitless number).beta (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – First-order decay rate applied toCiinderivative(). Defaults to0.075(a bare, unitless number).Co (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable|None) – Extracellular calcium concentration. Defaults toNone, which falls back toCalcium.default_CoinsideDynamicNernstIon._init_dynamic_nernst_ion().Ci_initializer (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|Callable) – Initializer for the dynamicCistate. Defaults to a constant2.4e-4 mMinitializer.name (
str|None) – Runtime ion instance name. Defaults toNone.**channels – Channel instances to attach to this ion, forwarded unchanged to
Calcium.
- Raises:
ValueError – If
tempis explicitly passed asNone.DynamicNernstIon._init_dynamic_nernst_ion()requires an explicit temperature and does not fall back to a class default.
See also
CalciumBase calcium ion family this class computes a reversal potential for.
CalciumDetailedSibling dynamic calcium ion with a first-order relaxation model driven by a unit-converted current term.
Notes
derivative()computes\[\frac{dCi}{dt} = \max(\alpha \cdot I_{Ca},\ 0) - \beta \cdot Ci\]i.e. a rectified, positively-scaled current drive minus a first-order decay – not a symmetric
-alpha*I_Ca - beta*Caform.alphaandbetaare generic first-order-model coefficients with no identified literature source; they are not traceable to a specific paper from the code alone, so none is cited here.alphaandbetaare stored as bare, unitless numbers, whiletotal_current(the calcium current summed over attached channels) carries current-density units such as \(\mathrm{\mu A/cm^2}\). Becausederivative()comparesself.alpha * total_currentdirectly against0.0 * u.mMinu.math.maximum, callingderivativewith any real, unit-typedtotal_currentraisesbrainunit.UnitMismatchError; calling it with no channels attached instead raisesTypeError, becausecurrent()returnsNonerather than a zero quantity when there are no channels to sum. UnlikeCalciumDetailed, which divides its current term by \(2Fd\) before clamping (so the clamped quantity and the zero it is compared against share the same derived unit), this class performs no such conversion, soderivativeis not currently callable with a realtotal_currentin either configuration. This is an existing implementation defect, not a documentation issue; it is recorded here rather than fixed, since this change is documentation-only.- uses_total_current = True#
When true, the template precomputes the aggregate ion current and passes it to
derivative(..., total_current=...).