ibex_bluesky_core.devices.simpledae

A simple interface to the DAE for bluesky.

Submodules

controllers

DAE control strategies.

reducers

DAE data reduction strategies.

strategies

Base classes for DAE strategies.

waiters

DAE waiting strategies.

Members

SimpleDae

Configurable DAE with pluggable strategies for data collection, waiting, and reduction.

check_dae_strategies

Check that the provided dae instance has appropriate controller/reducer/waiter configured.

monitor_normalising_dae

Create a simple DAE which normalises using a monitor and waits for frames.

class ibex_bluesky_core.devices.simpledae.SimpleDae(*, prefix: str, name: str = 'DAE', controller: TController_co, waiter: TWaiter_co, reducer: TReducer_co)[source]

Bases: Dae, Triggerable, AsyncStageable, Generic[TController_co, TWaiter_co, TReducer_co]

Configurable DAE with pluggable strategies for data collection, waiting, and reduction.

This class should cover many simple DAE use-cases, but for complex use-cases a custom Dae subclass may still be required to give maximum flexibility.

Initialize a simple DAE interface.

Parameters:
  • prefix – the PV prefix of the instrument being controlled.

  • name – A friendly name for this DAE object.

  • controller – A DAE control strategy, defines how the DAE begins and ends data acquisition Pre-defined strategies in the ibex_bluesky_core.devices.controllers module

  • waiter – A waiting strategy, defines how the DAE waits for an acquisition to be complete Pre-defined strategies in the ibex_bluesky_core.devices.waiters module

  • reducer – A data reduction strategy, defines the post-processing on raw DAE data, for example normalization or unit conversion. Pre-defined strategies in the ibex_bluesky_core.devices.reducers module

stage() None[source]

Pre-scan setup. Delegate to the controller.

trigger() None[source]

Take a single measurement and prepare it for subsequent reading.

This waits for the acquisition and any defined reduction to be complete, such that after this coroutine completes all relevant data is available via read()

unstage() None[source]

Post-scan teardown, delegate to the controller.

ibex_bluesky_core.devices.simpledae.check_dae_strategies(dae: SimpleDae, *, expected_controller: type[Controller] | None = None, expected_waiter: type[Waiter] | None = None, expected_reducer: type[Reducer] | None = None) None[source]

Check that the provided dae instance has appropriate controller/reducer/waiter configured.

Parameters:
  • dae – The simpledae instance to check.

  • expected_controller – The expected controller type, on None to not check.

  • expected_waiter – The expected controller type, on None to not check.

  • expected_reducer – The expected controller type, on None to not check.

ibex_bluesky_core.devices.simpledae.monitor_normalising_dae(*, det_pixels: list[int], frames: int, periods: bool = True, monitor: int = 1, save_run: bool = False) SimpleDae[source]

Create a simple DAE which normalises using a monitor and waits for frames.

This is really a shortcut to reduce code in plans used on the majority of instruments that normalise using a monitor, wait for a number of frames and optionally use software periods.

Parameters:
  • det_pixels – list of detector pixel to use for scanning.

  • frames – number of frames to wait for.

  • periods – whether or not to use software periods.

  • monitor – the monitor spectra number.

  • save_run – whether or not to save the run of the DAE.