jaxley.channels.Channel#

class Channel(name=None)[source]#

Bases: object

Channel base class. All channels inherit from this class.

A channel in Jaxley is everything that modifies the membrane voltage via its current returned by the compute_current() method.

As in NEURON, a Channel is considered a distributed process, which means that its conductances are to be specified in S/cm2 and its currents are to be specified in uA/cm2.

Parameters:

name (str | None)

channel_params = None#
channel_states = None#
current_name = None#
property name: str | None#

The name of the channel (by default, this is the class name).

change_name(new_name)[source]#

Change the channel name.

Parameters:

new_name (str) – The new name of the channel.

Returns:

Renamed channel, such that this function is chainable.

update_states(states, params, voltage, delta_t)[source]#

Return the updated states.

Parameters:
  • states (dict[str, Array]) – All states of the compartment.

  • params (dict[str, Array]) – Parameters of the channel (conductances in S/cm2).

  • voltage (Array) – Voltage of the compartment in mV.

  • delta_t (float) – The time step in ms.

Returns:

A dictionary of updated state values.

Return type:

dict[str, Array]

compute_current(states, params, voltage, delta_t)[source]#

Given channel states and voltage, return the current through the channel.

Parameters:
  • states (dict[str, Array]) – All states of the compartment.

  • params (dict[str, Array]) – Parameters of the channel (conductances in S/cm2).

  • voltage (Array) – Voltage of the compartment in mV.

  • delta_t (float) – The time step in ms.

Returns:

Current in uA/cm2.

Return type:

Array

init_state(states, params, voltage, delta_t)[source]#

Initialize states of channel.

Parameters:
  • states (dict[str, Array]) – All states of the compartment.

  • params (dict[str, Array]) – Parameters of the channel (conductances in S/cm2).

  • voltage (Array) – Voltage of the compartment in mV.

  • delta_t (float) – The time step in ms.

Returns:

A initial state that is written into module.nodes when the user runs module.init_states().

Return type:

dict[str, Array]

init_params(states, params, voltage, delta_t)[source]#

Initialize the maximal conductances given the temperature.

Parameters:
  • states (dict[str, Array]) – All states of the compartment.

  • params (dict[str, Array]) – Parameters of the channel (conductances in S/cm2).

  • voltage (Array) – Voltage of the compartment in mV.

  • delta_t (float) – The time step in ms.

Returns:

Initial parameters that are written into module.nodes when the user runs module.init_params().

Return type:

dict[str, Array]