ibex_bluesky_core.devices.simpledae
A simple interface to the DAE for bluesky.
Submodules
DAE control strategies. |
|
DAE data reduction strategies. |
|
Base classes for DAE strategies. |
|
DAE waiting strategies. |
Members
Configurable DAE with pluggable strategies for data collection, waiting, and reduction. |
|
Check that the provided dae instance has appropriate controller/reducer/waiter configured. |
|
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
- 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.