Plan wrappers
Plan wrappers that temporarily modify DAE (Data Acquisition Electronics) settings during a plan, automatically restoring the original values afterwards. This ensures that your experiments don’t permanently change instrument configuration.
Available Wrappers
~dae_table_wrapper
A function that wraps a plan to temporarily modify the DAE wiring/detector/spectra tables.
RE(
with_dae_tables(
bps.null(),
dae=dae,
new_settings=modified_settings
)
)
def plan():
yield from with_dae_tables(scan(...), dae=dae, new_settings=modified_settings)
(where modified_settings is a dataset in the form DaeSettingsData)
with_num_periods
A function that wraps a plan to temporarily modify the number of DAE software periods.
RE(
with_num_periods(
bps.null(),
dae=dae,
number_of_periods=1000
)
)
def plan():
yield from with_num_periods(scan(...), dae=dae, number_of_periods=1000)
with_time_channels
A function that wraps a plan to temporarily modify the DAE time channel boundaries.
RE(
with_time_channels(
bps.null(),
dae=dae,
new_settings=modified_settings
)
)
def plan():
yield from with_time_channels(scan(...), dae=dae, new_settings=modified_settings)
(where modified_settings is a dataset in the form DaeTCBSettingsData)
Usage
To use these wrappers, pass a user plan as the first argument to the wrappers in this module:
from ibex_bluesky_core.plan_stubs import with_num_periods
from ibex_bluesky_core.devices.simpledae import SimpleDae
dae = SimpleDae() # Give your DAE options here
def plan():
yield from with_num_periods(scan(...), dae=dae, number_of_periods=1000)
the plan with the modified DAE settings, restoring the original settings after the scan completes (whether successfully or not).