CurrentMixin

class CurrentMixin(currents: Tensor, interpolation: Interpolation, interp_kwargs: dict[str, Any], overbound: float | None, tolerance: float)[source]

Bases: object

Mixin for synapses with current primitive.

Parameters:
  • data (torch.Tensor) – initial synaptic currents, in \(\text{nA}\).

  • interpolation (Interpolation) – interpolation function used when selecting prior currents.

  • interp_kwargs (dict[str, Any]) – keyword arguments passed into the interpolation function.

  • overbound (float | None) – value to replace currents out of bounds, uses values at observation limits if None.

  • tolerance (float) – maximum difference in time from an observation to treat as co-occurring, in \(\text{ms}\).

property current: Tensor

Currents of the synapses at present, in nanoamperes.

Parameters:

value (torch.Tensor) – new synapse currents.

Returns:

present synaptic currents.

Return type:

torch.Tensor

current_at(selector: Tensor) Tensor[source]

Retrieves previous synaptic currents, in nanoamperes.

Parameters:

selector (torch.Tensor) – time before present for which synaptic currents should be retrieved, in \(\text{ms}\).

Returns:

selected synaptic currents.

Return type:

torch.Tensor

Shape

selector:

\(B \times N_0 \times \cdots \times [D]\)

return:

\(B \times N_0 \times \cdots \times [D]\)

Where:
  • \(B\) is the batch size.

  • \(N_0 \times \cdots\) is the shape of the synapse.

  • \(D\) is the number of selectors per synapse.