evspikesim.Spike

class evspikesim.Spike

Spike event. Spikes are fired and received by spiking neurons. They drive the computation during inference.

__init__(self: evspikesim.Spike, index: int, time: float) None

Constructs a spike with a given index and timing.

Parameters
  • index (int) – The index of the neuron that fired the spike.

  • time (float) – The timing of the spike.

Methods

Attributes

index

The index of the neuron that fired the spike.

time

The timing of the spike.

__eq__(self: evspikesim.Spike, arg0: evspikesim.Spike) bool

Checks if two spikes occured within a time distance of 1e-6, i.e. abs(self.time - arg0.time) < 1e-6.

Parameters

arg0 (Spike) – The other spike to compare.

Returns

True if the absolute difference between the two spike timings is bellow 1e-6.

Return type

bool

__ge__(self: evspikesim.Spike, arg0: evspikesim.Spike) bool

Checks if the spike occured after or at the same time as given spike, i.e. self.time >= arg0.time.

Parameters

arg0 (Spike) – The other spike to compare.

Returns

True if the spike occured after or at the same time as arg0.

Return type

bool

__gt__(self: evspikesim.Spike, arg0: evspikesim.Spike) bool

Checks if the spike occured after a given spike, i.e. self.time > arg0.time.

Parameters

arg0 (Spike) – The other spike to compare.

Returns

True if the spike occured after arg0.

Return type

bool

__le__(self: evspikesim.Spike, arg0: evspikesim.Spike) bool

Checks if the spike occured before or at the same time as given spike, i.e. self.time <= arg0.time.

Parameters

arg0 (Spike) – The other spike to compare.

Returns

True if the spike occured before or at the same time as arg0.

Return type

bool

__lt__(self: evspikesim.Spike, arg0: evspikesim.Spike) bool

Checks if the spike occured before a given spike, i.e. self.time < arg0.time.

Parameters

arg0 (Spike) – The other spike to compare.

Returns

True if the spike occured before arg0.

Return type

bool

__ne__(self: evspikesim.Spike, arg0: evspikesim.Spike) bool

Checks if two spikes did not occur within a time distance of 1e-6, i.e. abs(self.time - arg0.time) >= 1e-6.

Parameters

arg0 (Spike) – The other spike to compare.

Returns

True if the absolute difference between the two spike timings is above 1e-6.

Return type

bool

__repr__(self: evspikesim.Spike) str

Formats the spike to a string.

Returns

A formated string describing the spike.

Return type

str

property index

The index of the neuron that fired the spike.

property time

The timing of the spike.