run_example(device_id, threshold=500, result_length=1500, num_averages=1, do_plot=True)¶
Run a test of the result unit together with thresholding and statistics.
The example applies a simple square wave to the instrument using the AWG. The integration functions use the full length of the integrators, and each integration function is basically just a constant value through the entire integration window, with different values for the different channels. We then sweep the starting point of the integration in relation to the pulse generated by the AWG. Initially, the integrators will not see the pulse at all, so the result will be zero. Then, as we gradually get more and more overlap of the integration function and the pulse, we will see a ramp up until a point in time where the integration window is completely within the pulse. Then, for larger delays we have the reverse process. We configure a fixed threshold for all channels and then we show how the threshold output toggles as the integration result goes above the threshold. We also read out the results from the statistics unit and show that in a table.
Connect signal output 1 to signal input 1.
Connect signal output 2 to signal input 2.
- device_id (str): The ID of the device to run the example with. For
example, dev2006 or uhf-dev2006.
threshold (double): Quantization threshold.
result_length (int): Number of measurements.
num_averages (int): Number of averages per measurement.
do_plot (bool, optional): Specify whether to plot the polled data.
result_data (list of dicts): Transformation and thresholding results.
statistics (list of dicts): Quantization statistics.