calix.spiking.correlation.AmplitudeCalib
-
class
calix.spiking.correlation.
AmplitudeCalib
(target: Optional[Union[float, numpy.ndarray]] = 0.5, *, branches: calix.spiking.correlation.CorrelationBranches = <CorrelationBranches.CAUSAL: 1>, amp_calib: int = 0, time_calib: int = 0) Bases:
calix.common.base.Calib
Calibrate the correlation amplitude at delay zero.
Correlation traces are measured in a few quads in all CapMem quadrants. The median amplitude, extrapolated at a delay of zero, is estimated and the CapMem bias currents are tweaked accordingly.
Requirements: * CADCs are enabled and calibrated. * External correlation voltages (v_res_meas, v_reset) are set.
- Variables
measurement – Instance of the correlation measurement class, used for measuring results.
quads – List of synapse quad column coordinates. Measurements from all rows in those quads are taken as an estimate for the characteristics of the whole quadrant. All quads in the list are located in quadrant 0, the measurement is repeated in the other quadrants using corresponding offsets to the coordinates.
log – Logger used to log outputs.
branches – Correlation branch to consider. Choose from causal, acausal or both, using the Enum CorrelationBranches.
parameters – Last configured CapMem parameters.
-
__init__
(target: Optional[Union[float, numpy.ndarray]] = 0.5, *, branches: calix.spiking.correlation.CorrelationBranches = <CorrelationBranches.CAUSAL: 1>, amp_calib: int = 0, time_calib: int = 0) - Parameters
target – Target amplitude per correlated event.
amp_calib – Amplitude calibration setting to use in all synapses during measurement.
time_calib – Time constant calibration setting to use in all synapses during measurement.
capmem_current_low – Threshold to consider a current generated by the CapMem low. During calibration, the current will be increased in case amplitudes cannot be measured as expected. If the result contains low currents, a warning will be logged.
Methods
__init__
([target, branches, amp_calib, …])- param target
Target amplitude per correlated event.
configure_parameters
(builder, parameters)Configure the given store bias currents in the given builder.
measure_results
(connection, builder)Estimate correlation parameters of each quadrant.
postlude
(connection)Log a warning in case resulting CapMem currents are low.
prelude
(connection)Preconfigure the chip for correlation measurements.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configure the given store bias currents in the given builder.
- Parameters
builder – Builder to append configuration instructions to.
parameters – Correlation store bias current for each quadrant.
- Returns
Builder with configuration appended.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Estimate correlation parameters of each quadrant.
- Parameters
connection – Connection to the chip to run on.
builder – Builder to run before measurements.
- Returns
Array of each quadrant’s amplitudes.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) → None Log a warning in case resulting CapMem currents are low.
- Parameters
connection – Connection to the chip to be calibrated.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) → None Preconfigure the chip for correlation measurements.
- Parameters
connection – Connection to the chip to run on.