calix.common.cadc.RampSlopeCalib
-
class
calix.common.cadc.
RampSlopeCalib
(target: int = 220, dynamic_range_max: int = 550) Bases:
calix.common.base.Calib
CADC Calibration part 2: Calibrate the steepness of the ramp, i.e. the current onto the ramp capacitor.
This is done by adjusting the value until the upper end of the given dynamic range reads a target value at the CADCs.
This class implements functions to configure the capmem cell that controls the ramp current and to measure the results. It also contains necessary preconfiguration of the CapMem.
Requirements: * All CADC channels are connected to the CADC debug line (can be
achieved with cadc_helpers.configure_chip()).
CADC debug line connected to CapMem cell stp_v_charge_0 (can be archived with cadc_helpers.configure_readout_cadc_debug())
- Variables
dynamic_range_max – Upper end of the desired dynamic range of the CADCs. Given in LSB of a global CapMem cell. The voltage is configured as stp_v_charge_0, which has to be connected to the CADCs via the CapMem debug readout.
-
__init__
(target: int = 220, dynamic_range_max: int = 550) Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([target, dynamic_range_max])Initialize self.
configure_parameters
(builder, parameters)Set CapMem cells cadc_i_ramp_slope of each quadrant to the values given in the array.
measure_results
(connection, builder)Read all CADC channels.
prelude
(connection)Function to preconfigure capmem parameters for the calibration runs.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Set CapMem cells cadc_i_ramp_slope of each quadrant to the values given in the array. :param builder: Builder to append configuring instructions. :param parameters: Array of ramp currents to be configured.
- Returns
Builder with configuration instructions appended.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Read all CADC channels. Compute means of quadrants and return those.
- Parameters
connection – Connection to read CADCs with.
builder – Builder to append read instructions to.
- Returns
Array with mean CADC reads of each quadrant.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) → None Function to preconfigure capmem parameters for the calibration runs. Sets the the common voltage applied to all CADC channels to the upper end of the specified dynamic range.
- Parameters
connection – Connection to the chip to be calibrated.