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(synapse_states, synapse_params, pre_voltage, post_voltage, pre_states, post_states, pre_params, post_params, delta_t)[source]#

ODE update step.

Parameters:
  • states – 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 – Parameters of the synapse. Conductances in uS.

  • synapse_states (dict[str, Array])

  • synapse_params (dict[str, Array])

  • pre_states (dict[str, Array])

  • post_states (dict[str, Array])

  • pre_params (dict[str, Array])

  • post_params (dict[str, Array])

Returns:

Updated states.

Return type:

dict[str, Array]

compute_current(synapse_params, pre_voltage, post_voltage, pre_states, post_states, pre_params, post_params, delta_t)[source]#

Return current through one synapse in nA.

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

Parameters:
  • states – States of the synapse.

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

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

  • params – Parameters of the synapse. Conductances in uS.

  • synapse_states (dict[str, Array])

  • synapse_params (dict[str, Array])

  • pre_states (dict[str, Array])

  • post_states (dict[str, Array])

  • pre_params (dict[str, Array])

  • post_params (dict[str, Array])

  • delta_t (float)

Returns:

Current through the synapse in nA, shape ().

Return type:

Array