jaxley.synapses.Synapse#

class Synapse(name=None)[source]#

Bases: object

Base class for a synapse.

As in NEURON, a Synapse is considered a point process, which means that its conductances are to be specified in uS and its currents are to be specified in nA.

Parameters:

name (str | None)

synapse_params = None#
synapse_states = None#
property name: str | None#
change_name(new_name)[source]#

Change the synapse name.

Parameters:

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

Returns:

Renamed channel, such that this function is chainable.

update_states(delta_t, pre_voltage, post_voltage, params)[source]#

ODE update step.

Parameters:
  • states (Dict[str, Array]) – States of the synapse.

  • delta_t (float) – Time step in ms.

  • pre_voltage (Array) – Voltage of the presynaptic compartment, shape ().

  • post_voltage (Array) – Voltage of the postsynaptic compartment, shape ().

  • params (Dict[str, Array]) – Parameters of the synapse. Conductances in uS.

Returns:

Updated states.

Return type:

Dict[str, Array]

compute_current(pre_voltage, post_voltage, params)[source]#

Return current through one synapse in nA.

Internally, we use jax.vmap to vectorize this function across many synapses.

Parameters:
  • states (Dict[str, Array]) – States of the synapse.

  • pre_voltage (Array) – Voltage of the presynaptic compartment, shape ().

  • post_voltage (Array) – Voltage of the postsynaptic compartment, shape ().

  • params (Dict[str, Array]) – Parameters of the synapse. Conductances in uS.

Returns:

Current through the synapse in nA, shape ().

Return type:

Array