calix.common.cadc_characterization.CADCCharacterization

class calix.common.cadc_characterization.CADCCharacterization(test_values: Sequence[int], readout_pad: int = 0)

Bases: calix.common.adc_characterization.ADCCharacterization

Use an external voltage source to determine the relationship between CADC values and voltages.

The external voltage source is set to a number of desired values and the CADC is read at these values.

Variables

num_samples – Number of samples to take and average.

__init__(test_values: Sequence[int], readout_pad: int = 0)
Parameters
  • test_values – Values to set for the external voltage source.

  • readout_pad – Pad at which the external voltage is applied.

Methods

build_measurement_program(builder)

Build a program which sets the desired values of the external voltage source and records CADC samples.

extract_mean_cadc_values(samples)

Extract mean CADC value for each test value.

measure_results(connection, builder)

Executes measurement on chip and return recorded CADC samples

prelude(connection)

param connection

Connection to the chip to calibrate.

run(connection)

Perform measurement.

Attributes

log

num_samples

build_measurement_program(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder)Tuple[calix.common.base.WriteRecordingPlaybackProgramBuilder, List[List[pystadls_vx_v3.ContainerTicket]]]

Build a program which sets the desired values of the external voltage source and records CADC samples.

Parameters

builder – Builder to append configuring instructions.

extract_mean_cadc_values(samples: numpy.ndarray)dict

Extract mean CADC value for each test value.

Parameters

samples – CADC samples

Returns

Dictionary of mean CADC values, their std, applied external voltages and the raw samples

log = <pylogging.Logger object>
measure_results(connection: calix.common.base.StatefulConnection, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder)numpy.ndarray

Executes measurement on chip and return recorded CADC samples

Parameters
  • connection – Connection to the chip to calibrate.

  • builder – Builder to append measurement program to.

Returns

Numpy array of results with shape (n_value, n_sample, 2, 512), where the second last dimension are the causal/acausal channels and the last is the channel.

num_samples = 5
prelude(connection: calix.common.base.StatefulConnection)None
Parameters

connection – Connection to the chip to calibrate.

run(connection: calix.common.base.StatefulConnection)dict

Perform measurement.

Parameters

connection – Connection to the chip to calibrate.