exa.core.observation_set_utils.adjust_trigger_delays_in_stash

exa.core.observation_set_utils.adjust_trigger_delays_in_stash#

adjust_trigger_delays_in_stash(stash, tag_with, controller_types, shift, save=False)#

Copy trigger_delay observations shifted by shift into a new ObservationStash.

Parameters:
  • stash (ObservationStash) – Stash whose DB observations are the source values.

  • tag_with (list[str]) – Tags applied to the new (shifted) local observations and to the stash.

  • controller_types (list[str]) – Substrings identifying which trigger_delay controller type to shift, e.g. ["drive", "flux", "readout"]. An empty list shifts nothing.

  • shift (float) – Amount added to each matched observation’s value, in the observation’s own unit.

  • save (bool) – If True, save the new observations to the DB.

Returns:

A new ObservationStash containing the shifted trigger_delay observations as local observations and everything else preserved as DB observations.

Return type:

ObservationStash