iqm.cpc.core.dataset.annotate

Contents

iqm.cpc.core.dataset.annotate#

iqm.cpc.core.dataset.annotate(data, annotation=None, prefix='')#

Add parameter data to an array.

Attaches a name to a DataArray. Also adds “parameter” data to the attributes.

Various Exa functions leverage the additional metadata, mostly for display purposes.

Parameters:
  • data (DataArray) – Array to be modified.

  • annotation (str | Parameter | None) – new name for the array. If annotation is a Parameter, use its name and label instead. If not given, prefix will be added to existing names.

  • prefix (str) – If given, this prefix is added to the new name and labels. If the new name already has the same prefix, it won’t be duplicated.

Returns:

The modified array.

Return type:

DataArray