calix.spiking.neuron_threshold.ThresholdCalibCADC
-
class
calix.spiking.neuron_threshold.
ThresholdCalibCADC
(target: Union[int, numpy.ndarray] = 125) Bases:
calix.common.base.Calib
Calibrate the neurons’ spike threshold potential using the CADC.
An offset current is injected onto the membranes, which results in regular spiking. The CADC samples all neurons at its maximum sample rate. The maximum read for each neuron is treated as the threshold potential, as it should be just below the threshold.
We use a high number of CADC samples to ensure we catch the neurons at a potential close to the threshold, even with the slow sampling rate of the CADC. As long as the sample rate and inter-spike-interval is not perfectly aligned, the low sample rate should not be an issue, and ultimately electrical noise should ensure the two will never stay perfectly synchronous.
Requirements: * Neuron membrane readout is connected to the CADCs (causal and acausal).
- Variables
original_neuron_configs – List of neuron configs from before the calibration, used to restore them in the postlude.
-
__init__
(target: Union[int, numpy.ndarray] = 125) Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([target])Initialize self.
configure_parameters
(builder, parameters)Configure the given array of threshold voltages.
measure_results
(connection, builder)Samples the membrane repeatedly and returns the maximum obtained value as the voltage measurement closest to the threshold.
postlude
(connection)Disable offset current CapMem cell again and restore original neuron configs.
prelude
(connection)Prepares chip for calibration, reads original neuron config in order to restore it after calibration.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configure the given array of threshold voltages.
- Parameters
builder – Builder to append configuration instructions to.
parameters – Array of threshold voltages to set up.
- Returns
Builder with configuration appended.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Samples the membrane repeatedly and returns the maximum obtained value as the voltage measurement closest to the threshold.
- Parameters
connection – Connection to the chip.
builder – Builder to append measurement to.
- Returns
Array of near-threshold CADC reads.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) Disable offset current CapMem cell again and restore original neuron configs.
- Parameters
connection – Connection to the chip to run on.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) Prepares chip for calibration, reads original neuron config in order to restore it after calibration.
Disable leak, set a low reset voltage and the offset current. Note that only the amplitude of the current is set but it is not enabled.
- Parameters
connection – Connection to the chip to calibrate.