braincell.channel.q10_factor

Contents

braincell.channel.q10_factor#

braincell.channel.q10_factor(q10, temp, temp_ref)[source]#

Return the Q10 rate-scaling factor for one temperature offset.

Parameters:
  • q10 (ArrayLike) – Q10 coefficient – the multiplicative change in rate per ten kelvin. Dimensionless.

  • temp (ArrayLike) – Absolute temperature the mechanism runs at, as a temperature (for example u.kelvin or u.celsius2kelvin(30.0)).

  • temp_ref (ArrayLike) – Absolute reference temperature the q10 was measured at, in the same units as temp.

Returns:

The dimensionless factor \(Q_{10}^{(T - T_{ref}) / 10}\), ready to multiply a rate, an inverse time constant, or a whole gate derivative.

Return type:

ArrayLike

Notes

The difference temp - temp_ref is divided through by u.kelvin before the exponent is formed, so the result is dimensionless regardless of which absolute temperature unit the caller used. Kelvin and Celsius offsets are numerically identical, so a factor referred to “20 degrees Celsius” needs no separate conversion beyond u.celsius2kelvin on the reference itself.

HH.gate_phi() calls this for gates declaring q10 and temp_ref; channels whose .mod source applies the factor inside individual rate functions call it directly instead.

Examples

>>> import brainunit as u
>>> from braincell.channel._base import q10_factor
>>> float(q10_factor(3.0, u.celsius2kelvin(30.0), u.celsius2kelvin(20.0)))
3.0