exa.core.observation_set_utils.copy_station_specific_observations

exa.core.observation_set_utils.copy_station_specific_observations#

copy_station_specific_observations(set_id, dut_label, *, set_type=None, dry_run=False)#

Make copies of existing station-specific observations in an existing observation set, linking them to a new QPU.

Currently all observations and most observation sets are linked to a specific QPU via the dut_label attribute. However, some observations are more correctly associated with other parts of the station, e.g. the instrumentation and wiring. Their values do not change (much) when the QPU is changed. These include e.g. instrument trigger delays, pulse precompensation settings, and TWPA settings.

This function takes an existing observation set, and makes copies of all station-specific observations in it in the DB, linking them with a new dut_label. It then groups them in a new observation set, which can e.g. be used as the starting point of a new calibration run for the station after the QPU has been changed.

Note

The station-specific observations are determined using a fixed whitelist which must be updated when new observations are introduced.

Parameters:
  • set_id (UUID) – ID of an existing observation set.

  • dut_label (str) – DUT label of the new QPU.

  • set_type (ObservationSetType | None) – Observation set type for the new set. If None, use the type of the existing set.

  • dry_run (bool) – Iff True, only log the observations that would be copied, do not make actual copies.

Returns:

ID of the new observation set, containing of copies of all the station-specific observations in the existing observation set but linked to dut_label, or None on a dry run.

Return type:

UUID | None