Gate

Contents

Gate#

class braincell.channel.Gate(name, power=1, phi=None, q10=None, temp_ref=None, time_unit=Unit('ms'), clip=False)[source]#

Metadata for one HH gate.

Parameters:
  • name (str) – Gate name. The state is stored under this attribute and the rate methods are looked up as f_<name>_inf / f_<name>_tau or f_<name>_alpha / f_<name>_beta.

  • power (int) – Exponent applied to the gate in HH.conductance_factor().

  • phi (Any | None) – Explicit temperature factor. Mutually exclusive with q10. A str names an instance attribute; see _resolve_value().

  • q10 (Any | None) – Q10 coefficient, used together with temp_ref and self.temp. Resolved the same way as phi.

  • temp_ref (Any | None) – Reference temperature for q10, as an absolute temperature. Resolved the same way as phi.

  • time_unit (Any) – Unit assumed when a rate method returns a bare (dimensionless) value. f_<name>_tau returning 5.0 is read as 5 * time_unit and f_<name>_alpha returning 0.3 as 0.3 / time_unit. Rate methods that return a properly united quantity are used as-is and ignore this field.

  • clip (bool) – Project the gate into [0, 1] when evaluating HH.conductance_factor(). Off by default: NEURON does not clip HH gates either, so clipping would diverge from the reference mechanisms this catalogue is validated against. Enable it per gate when a solver is expected to overshoot and an odd power would otherwise yield a negative conductance. The stored state is never rewritten – only the value used for the conductance product.

Raises:

ValueError – If phi is provided together with q10 or temp_ref, if q10 and temp_ref are not both provided together, or if time_unit does not have a time dimension.