calix.common.madc_characterization.MADCCharacterization
-
class
calix.common.madc_characterization.MADCCharacterization(test_values: Sequence[int], readout_pad: int = 0) Bases:
calix.common.adc_characterization.ADCCharacterizationUse an external voltage source to determine the relationship between MADC values and voltages.
The external voltage source is set to a number of desired values and the MADC is read at these values.
-
__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 MADC samples.
extract_mean_madc_values(samples)Extract mean madc value for each test value and return dictioanry with mean madc values and applied external voltages.
measure_results(connection, builder)Executes measurement on chip and resturn recorded MADC samples
prelude(connection)- param connection
Connection to the chip to calibrate.
run(connection)Perform measurement.
Attributes
-
build_measurement_program(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → calix.common.base.WriteRecordingPlaybackProgramBuilder Build a program which sets the desired values of the external voltage source and records MADC samples.
- Parameters
builder – Builder to append configuring instructions.
-
extract_mean_madc_values(samples: numpy.ndarray) → dict Extract mean madc value for each test value and return dictioanry with mean madc values and applied external voltages.
- Parameters
samples – MADC samples
- Returns
Dictionary of mean MADC values and applied external voltages
-
log= <pylogging.Logger object>
-
measure_results(connection: calix.common.base.StatefulConnection, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Executes measurement on chip and resturn recorded MADC samples
- Parameters
connection – Connection to the chip to calibrate.
builder – Builder to append measurement program to.
- Returns
Numpy array of results.
-
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.
-