From a178762c7e481946253caa4757892dee10ecb37e Mon Sep 17 00:00:00 2001 From: appleb_m Date: Mon, 15 Jun 2026 16:56:34 +0200 Subject: [PATCH] workflows: added new transitions removed mysterious ws mode that ahs never been used. --- src/aare/daq/workflows.py | 42 ++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/src/aare/daq/workflows.py b/src/aare/daq/workflows.py index 8238c22d..53834b66 100644 --- a/src/aare/daq/workflows.py +++ b/src/aare/daq/workflows.py @@ -141,38 +141,56 @@ def sa2xrf(devs: BeamlineDevices, cfg: BeamlineConfig): def xrf2sa(devs: BeamlineDevices, cfg: BeamlineConfig): """XrfCollection to sample alignment""" - pass + devs.samcam_auto(AutoEnum.AUTO) + devs.bec_worker.move_to(BeamlineState.SAMPLE_ALIGNMENT) + devs.samcam_auto(AutoEnum.ONCE) -#todo CONNECT WS AND BA MODES -def sa2ws(devs: BeamlineDevices, cfg: BeamlineConfig): - pass +def common2flux_measurement(devs: BeamlineDevices, cfg: BeamlineConfig): + devs.bec_worker.move_to(BeamlineState.FLUX_MEASUREMENT) +def sa2flux_measurement(devs: BeamlineDevices, cfg: BeamlineConfig): + devs.bec_worker.move_to(BeamlineState.FLUX_MEASUREMENT) -def ws2sa(devs: BeamlineDevices, cfg: BeamlineConfig): - pass +def flux_measurement2sa(devs: BeamlineDevices, cfg: BeamlineConfig): + devs.bec_worker.move_to(BeamlineState.SAMPLE_ALIGNMENT) +def flux_measurement2ba(devs: BeamlineDevices, cfg: BeamlineConfig): + devs.bec_worker.move_to(BeamlineState.BEAMSTOP_ALIGNMENT) + +def flux_measurement2bl(devs: BeamlineDevices, cfg: BeamlineConfig): + devs.bec_worker.move_to(BeamlineState.BEAM_VISUALISATION) + +def ba2flux_measurement(devs: BeamlineDevices, cfg: BeamlineConfig): + devs.bec_worker.move_to(BeamlineState.FLUX_MEASUREMENT) + +def bl2flux_measurement(devs: BeamlineDevices, cfg: BeamlineConfig): + devs.bec_worker.move_to(BeamlineState.FLUX_MEASUREMENT) def sa2ba(devs: BeamlineDevices, cfg: BeamlineConfig): - pass - + """Sample alignment to BeamstopAlignment""" + devs.bec_worker.move_to(BeamlineState.BEAMSTOP_ALIGNMENT) + devs.samcam_auto(AutoEnum.ONCE) def ba2sa(devs: BeamlineDevices, cfg: BeamlineConfig): - pass + devs.bec_worker.move_to(BeamlineState.SAMPLE_ALIGNMENT) + devs.samcam_auto(AutoEnum.ONCE) def sa2bl(devs: BeamlineDevices, cfg: BeamlineConfig): devs.bec_worker.move_to(BeamlineState.BEAM_VISUALISATION) devs.samcam_settings.exposure = 0.001 - #TODO SAMCAM SETTINGS SHOULD BE HARDCODED FOR BEAM VISUALISATION STATE NOT AUTO + #TODO SAMCAM SETTINGS SHOULD BE DOEN via zoom settings def bl2sa(devs: BeamlineDevices, cfg: BeamlineConfig): devs.bec_worker.move_to(BeamlineState.SAMPLE_ALIGNMENT) devs.samcam_auto(AutoEnum.ONCE) def bl2ba(devs: BeamlineDevices, cfg: BeamlineConfig): - pass + devs.bec_worker.move_to(BeamlineState.BEAMSTOP_ALIGNMENT) + devs.samcam_auto(AutoEnum.ONCE) def ba2bl(devs: BeamlineDevices, cfg: BeamlineConfig): - pass + devs.bec_worker.move_to(BeamlineState.BEAM_VISUALISATION) + devs.samcam_settings.exposure = 0.001 def sa2dh(devs: BeamlineDevices, cfg: BeamlineConfig): common2dh(devs, cfg)