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
A function that wraps a plan to temporarily modify the DAE table.
API reference: dae_table_wrapper
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)
Num Periods
A function that wraps a plan to temporarily modify the number of periods.
API reference: num_periods_wrapper
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)
Time Channels
A function that wraps a plan to temporarily modify the time channels boundaries.
API reference: time_channels_wrapper
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, the plan written by the user must be wrapped by the function within the RunEngine:
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 afterwards.