calix.spiking.refractory_period

Calculations related to determining the refractory clock scales as well as counter values.

Classes

Settings(refractory_counters, reset_holdoff, …)

Class providing array-like access to settings related to the refractory clock.

Functions

calix.spiking.refractory_period.calculate_settings(tau_ref: quantities.quantity.Quantity, holdoff_time: quantities.quantity.Quantity = array(0.) * us)calix.spiking.refractory_period.Settings

Determine scales of fast and slow clock as well as refractory counter settings of individual neurons.

On BSS-2 the refractory period is made up of a “reset period” where the potential is clamped to the reset potential and a “holdoff period” in which the membrane can evolve freely but no new spikes are triggered.

In this function the clock scalers and counter values are chosen such that the given targets for both parameters can be fulfilled.

Parameters
  • tau_ref – Target refractory times. This is the total time in which the neuron does not emit new spikes and therefore includes the holdoff period.

  • holdoff_time – Target length of the holdoff period. Note: Due to hardware constraint the holdoff period is always at least one clock cycle long. For a target of zero the minimal holdoff period is chosen.

Returns

Clock settings.

Raises

ValueError – If tau_ref and holdoff_time have shapes that are incompatible with the number of neurons on chip.

calix.spiking.refractory_period.dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False)

Returns the same class as was passed in, with dunder methods added based on the fields defined in the class.

Examines PEP 526 __annotations__ to determine fields.

If init is true, an __init__() method is added to the class. If repr is true, a __repr__() method is added. If order is true, rich comparison dunder methods are added. If unsafe_hash is true, a __hash__() method function is added. If frozen is true, fields may not be assigned to after instance creation.