qblox_scheduler.analysis.data#

Contains helper functions to reshape data.

Functions#

reshape_for_analysis(→ xarray.Dataset)

Process a dataset returned by a gettable.get() or

Module Contents#

reshape_for_analysis(gettable_dataset: xarray.Dataset, x_label: str | list[str] = '', x_unit: str | list[str] = 'a.u.', x_values: collections.abc.Sequence[int | float | complex | numpy.number] | None = None, name: str = 'processed_measurement', batched: bool = True, real_imag: bool = True, tuid: quantify_core.data.types.TUID | str | None = None) xarray.Dataset[source]#

Process a dataset returned by a gettable.get() or instrument_coordinator.run() into a complete xarray Dataset similar to what would be returned by MeasurementControl.run(). The dataset is compatible with the analysis classes in qblox_scheduler.analysis.

Parameters:
  • gettable_dataset – A “raw” dataset returned by gettable.get() or instrument_coordinator.run()

  • x_label – Label for the x-axis

  • x_unit – Unit for the x-axis

  • x_values – Values for the x-axis

  • name – Name for the dataset

  • batched – Whether the data is batched (True) or iterative (False)

  • real_imag – If True, returns I/Q values. If False, returns magnitude/phase (degrees)

  • tuid – The TUID for the dataset. If None, a new TUID will be generated.

Examples

dataset = instrument_coordinator.run()
dataset = reshape_for_analysis(dataset, settable)
T1Analysis(dataset).run()
Returns:

A dataset formatted like a MeasurementControl.run() result