jaxley.synapses.Synapse#
- class Synapse(name=None)[source]#
Bases:
objectBase 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#
- 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:
delta_t (float) – Time step in ms.
pre_voltage (Array | ndarray | bool | number | bool | int | float | complex) – Voltage of the presynaptic compartment, shape ().
post_voltage (Array | ndarray | bool | number | bool | int | float | complex) – Voltage of the postsynaptic compartment, shape ().
params (dict[str, Array]) – Parameters of the synapse. Conductances in uS.
- Returns:
Updated states.
- Return type:
- 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:
pre_voltage (Array | ndarray | bool | number | bool | int | float | complex) – Voltage of the presynaptic compartment, shape ().
post_voltage (Array | ndarray | bool | number | bool | int | float | complex) – 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: