calix.common.madc_base.Calib
-
class
calix.common.madc_base.
Calib
(parameter_range: calix.common.base.ParameterRange, inverted: bool, errors: Optional[List[str]] = None, n_instances: int = 512) Bases:
calix.common.base.Calib
,calix.common.madc_base.Recorder
Abstract base class for neuron calibrations using the MADC.
During prelude, the MADC is enabled and the current readout section config is saved. During calibration, the readout config is changed continuously to measure one neuron’s properties after another. The stimuli during measurement have to be implemented as well as the evaluation of samples. Also, the recording timing per neuron can be set.
-
__init__
(parameter_range: calix.common.base.ParameterRange, inverted: bool, errors: Optional[List[str]] = None, n_instances: int = 512) Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(parameter_range, inverted[, …])Initialize self.
evaluate
(samples)Process the given array of samples and return an array of results.
measure_results
(connection, builder)Measure and evaluate the results.
postlude
(connection)Restore original readout and neuron configuration.
prelude
(connection)Prepares chip for the experiment.
-
abstract
evaluate
(samples: List[numpy.ndarray]) → numpy.ndarray Process the given array of samples and return an array of results.
The given samples are a list of samples for each neuron. Evaluation will typically involve fitting some parameters. The relevant obtained result is to be returned.
- Parameters
samples – MADC samples received per neuron.
- Returns
Array containing results per neuron.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Measure and evaluate the results.
Calls record_traces() to acquire an MADC trace per neuron, and calls evaluate() to get an array of results from, e.g., fits.
- Parameters
connection – Connection to the chip to calibrate.
builder – Builder to append measurement program to.
- Returns
Numpy array, containing evaluated results.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) Restore original readout and neuron configuration.
- Parameters
connection – Connection to the chip to calibrate.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) Prepares chip for the experiment.
Configures the MADC and sets necessary bias currents. Reads and saves readout config and neuron config to restore original state after the experiment.
- Parameters
connection – Connection to the chip.
-