calix.hagen.neuron
Calibrate neurons for integrating synaptic inputs, as it is desired using the hagen mode. Call the function calibrate(connection) to run the calibration.
Classes
|
Class providing numpy-array access to calibrated parameters. |
|
Further options for the neuron calibration. |
|
Result object of a neuron calibration. |
|
Target parameters for the neuron calibration. |
Functions
-
calix.hagen.neuron.
calibrate
(connection: pyhxcomm_vx.ConnectionHandle, target: Optional[calix.hagen.neuron_dataclasses.NeuronCalibTarget] = None, options: Optional[calix.hagen.neuron_dataclasses.NeuronCalibOptions] = None) → calix.hagen.neuron_dataclasses.NeuronCalibResult Set up the neurons for integration.
This calibration aims to equalize the neurons’ leak and reset potentials as well as the synaptic input strength and time constants.
Initially, the leak bias currents are calibrated such that the membrane time constants are equal for all neurons. This has to be done before matching the synaptic input strengths, as a neuron with higher leakage would show smaller integrated amplitudes even if the current inputs were matched. For this calibration, the neurons are reset to a potential below the leak, and the rise of the voltage is captured using the CADCs. This allows to roughly match the membrane time constant to the given value.
The synaptic input OTA bias currents are calibrated such that they yield the same charge output to the membrane for each synaptic input. The synaptic input reference potentials are recalibrated in every run of the search for the bias currents, as the required voltage offset between the two inputs of the OTA changes with the bias current.
Afterwards, the leak OTA bias current is reduced while keeping the noise in CADC readouts after the integration near the target. Reducing the target noise results in higher leak bias currents and thus a lower membrane time constant, which means fast decay of the synaptic inputs. Increasing the target noise means the neuron does a better job at integrating the inputs, but at the cost of reproducibility of the results, since noise of the synaptic input is more amplified. Apart from the pure statistical noise, systematic offsets are considered in this part of the calibration. The leak potential was calibrated before adjusting the leak biases. If a neuron drifts away from the expected leak potential, the leak bias current will be increased as well.
The whole leak bias current readjustment can be disabled by setting the parameter target_noise to None.
After setting the leak bias currents low, the resting potential of the neurons is prone to floating away from the leak potential. Thus, the synaptic input reference potentials are recalibrated, which can compensate systematic effects like a constant leakage current onto the membrane. Eventually, leak and reset potentials are calibrated.
Requirements: - The CADCs are enabled and calibrated. You can achieve this using
the function calix.common.cadc.calibrate().
- Parameters
connection – Connection to the chip to calibrate.
target – Calib target, given as an instance of NeuronCalibTarget. Refer there for the individual parameters.
options – Further calibration options, given as an instance of NeuronCalibOptions. Refer there for the individual parameters.
- Returns
NeuronCalibResult, containing all calibrated parameters.
- Raises
ValueError – If target parameters are not in a feasible range.
ValueError – If target parameters are not shaped as specified.
TypeError – If time constants are not given with a unit from the quantities package.
-
calix.hagen.neuron.
calibrate_baseline
(connection: pyhxcomm_vx.ConnectionHandle, target_read: int = 128) → calix.common.base.ParameterCalibResult Calibrate the CADC channel offsets such that the neuron baseline, that is reading shortly after a reset without getting synaptic input, reads the given target value.
This calibration can only be called after the neuron calibration has finished, as it permanently overwrites the CADC offsets. Thus, the CADCs can no longer read constant voltages precisely.
This eases the calculation of amplitudes of inputs, as no extra baseline read is required.
- Parameters
connection – Connection to the chip to calibrate.
target_read – Target CADC read of all neurons at baseline.
- Returns
CalibResult, containing: * Calibrated CADC channel offsets. * Success mask of calibration - False for CADC channels that could
not be matched to the target read.