Skip to content

Using Acquired ResultsΒΆ

The measured data is stored on the Results as a dictionary of AcquiredResult objects.

If my_results contains results for a measurement handle named q0/result, the AcquiredResult can be retrieved either using the "classic" results interface:

acquired_results = my_results.acquired_results
my_acquired_data = acquired_results["q0/result"]

or the "workflow" interface:

my_acquired_data = my_results.q0.result

Read the previous page to learn more about these two interfaces.

The AcquiredResult object contains the measured data itself, as well as one or multiple measurement axes together with their names, as defined in the SweepParameters that were used in the measurement. The data, axis and axis names can be accessed with:

my_data = my_acquired_data.data
my_axis = my_acquired_data.axis
my_axis_name = my_acquired_data.axis_name

Using the "workflow" interface, various other convenient approaches for accessing the data are possible. For example:

my_data = my_results[handle].data
my_axis = my_results[handle].axis
my_axis_name = my_results[handle].axis_name

The data and associated axes are returned directly as numpy arrays for quick re-use. The dimensionality of the data array directly reflects the dimensionality of the experimental sweep, i.e., a simple sweep returns a one dimensional array whereas concatenated sweeps will return multi-dimensional arrays. The axes and axes names are returned as a list of arrays and strings respectively, with the number of entries corresponding to the number of dimensions in the data array.

For a one dimensional sweep, simple data visualization with Python is possible, for example through:

import matplotlib.plotlib as plt

my_data = my_results[handle].data
my_axis = my_results[handle].axis[0]
my_axis_name = my_results[handle].axis_name[0]

plt.plot(my_axis, my_data)
plt.x_label(my_axis_name)
plt.y_label('acquired data')

The AcquiredResult object also contains the last_nt_step property, which indicates the index of the last acquired data point within a near-time sweep. This information is useful when accessing partial results, e.g., in a near-time callback context, for processing during the near-time loop.