calix.hagen.neuron_potentials.ResetPotentialCalib
-
class
calix.hagen.neuron_potentials.
ResetPotentialCalib
(target: Optional[Union[int, numpy.ndarray]] = None, highnoise: bool = False) Bases:
calix.common.base.Calib
Calibrate the neurons’ reset target voltage such that it matches the leak potential.
The refractory time is extended in order to measure the membrane potentials while the neuron is at reset potential. The CapMem settings which yield CADC reads which match the potential without reset are searched.
Requirements: * Neuron membrane readout is connected to the CADCs (causal and acausal). * Reset bias current is set not too low, such that a resting potential
is reached during the refractory period. Note that this calibration has to be re-run after the reset bias current was changed, due to the OTA’s characteristics.
Target CADC read at reset potential is given, or membrane potential is not floating (i.e. the leak bias current is not too low). You may use the highnoise flag to indicate multiple measurements of the resting potential shall be taken in order to find the target reset potential.
- Variables
highnoise – Decides whether to expect high noise on the membrane potential to be present. Setting this to True results in multiple reads of the resting potential when finding the calibration target value.
backend_configs – List containing neuron backend configs as read in the prelude of the calibration. Used to restore the original config in the postlude.
common_backend_configs – List containing common neuron backend configs as read during the prelude. Used to restore the original config in the postlude.
-
__init__
(target: Optional[Union[int, numpy.ndarray]] = None, highnoise: bool = False) Initialize the ResetPotentialCalib class.
- Parameters
target – Target CADC reads during reset. If not given, they are measured during prelude. If given, the highnoise option has no effect.
Methods
__init__
([target, highnoise])Initialize the ResetPotentialCalib class.
configure_parameters
(builder, parameters)Configure the reset potentials of all neurons to the values given in the parameter array.
measure_results
(connection, builder)Test the configured settings.
postlude
(connection)Log statistics of the results.
prelude
(connection)Measure a calibration target (the leak reads) if not provided.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configure the reset potentials of all neurons to the values given in the parameter array.
- Parameters
builder – Builder to append configuration to.
parameters – CapMem values of the reset potential.
- Returns
Builder with configuration appended.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Test the configured settings. The neurons are artificially reset and their membrane potentials are read using the CADCs.
- Parameters
connection – Connection to a chip to run on.
builder – Builder to append read instructions.
- Returns
Membrane potentials of neurons during reset.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) → None Log statistics of the results.
Restore original configuration of the neuron backends.
- Parameters
connection – Connection to the chip to run on.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) → None Measure a calibration target (the leak reads) if not provided.
Select the slower clock in the digital neuron backend and set the refractory counter values in each neuron to keep the neuron refractory long enough so that the CADCs can read the potentials. The original neuron backend config is stored to be restored.
- Parameters
connection – Connection to the chip to run on.