utility#

Utility functions for the instrument coordinator and components.

Module Contents#

Functions#

search_settable_param(→ qcodes.instrument.Parameter)

Searches for a settable parameter in nested instrument hierarchies.

lazy_set(→ None)

Set the value of a QCoDeS parameter only if it is different from the value in cache.

check_already_existing_acquisition(new_dataset, ...)

Verifies non-overlapping data in new_dataset and current_dataset.

Attributes#

logger

logger[source]#
search_settable_param(instrument: qcodes.instrument.base.InstrumentBase, nested_parameter_name: str) qcodes.instrument.Parameter[source]#

Searches for a settable parameter in nested instrument hierarchies.

For example instrument.submodule_1.channel_1.parameter.

Parameters:
  • instrument – The root QCoDeS instrument where the parameter resides.

  • nested_parameter_name – Hierarchical nested parameter name.

Return type:

Parameter

lazy_set(instrument: qcodes.instrument.base.InstrumentBase, parameter_name: str, val: Any) None[source]#

Set the value of a QCoDeS parameter only if it is different from the value in cache.

Parameters:
  • instrument – The QCoDeS instrument to set the parameter on.

  • parameter_name – Name of the parameter to set.

  • val – Value to set it to.

check_already_existing_acquisition(new_dataset: xarray.Dataset, current_dataset: xarray.Dataset)[source]#

Verifies non-overlapping data in new_dataset and current_dataset.

If there is, it will raise an error.

Parameters:
  • new_dataset – New dataset.

  • current_dataset – Current dataset.