From a6185020a51bd750fb135dcd16ea8b0615f67930 Mon Sep 17 00:00:00 2001 From: vshekar1 Date: Wed, 31 Dec 2025 16:31:42 -0500 Subject: [PATCH] Updates to loop alignment bluesky plans --- daq_macros.py | 3 ++- mxbluesky/devices/top_align.py | 7 +++++-- mxbluesky/plans/__init__.py | 2 -- mxbluesky/plans/loop_detection.py | 4 ---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/daq_macros.py b/daq_macros.py index 7045ed93..37ead2f1 100644 --- a/daq_macros.py +++ b/daq_macros.py @@ -47,7 +47,8 @@ config_bluesky_logging(level='INFO') from fmx_annealer import govStatusGet, govStateSet, fmxAnnealer, amxAnnealer # for using annealer specific to FMX and AMX from config_params import ON_MOUNT_OPTION, OnMountAvailOptions, BEAMSIZE_OPTIONS -from mxbluesky.plans import detect_loop, topview_optimized +from mxbluesky.plans.loop_detection import detect_loop +from mxbluesky.plans.top_view import topview_optimized if daq_utils.beamline == 'fmx': from setenergy_lsdc import setELsdc diff --git a/mxbluesky/devices/top_align.py b/mxbluesky/devices/top_align.py index a0b8e238..4532cc12 100644 --- a/mxbluesky/devices/top_align.py +++ b/mxbluesky/devices/top_align.py @@ -90,6 +90,8 @@ class TopAlignCam(StandardProsilica): out10_reset = Cpt(EpicsSignal, "Out10:compress.RES") out9_buffer = Cpt(EpicsSignalRO, "Out9:compress") out9_reset = Cpt(EpicsSignal, "Out9:compress.RES") + out8_buffer = Cpt(EpicsSignalRO, "Out8:compress") + out8_reset = Cpt(EpicsSignal, "Out8:compress.RES") def __init__(self, *args, **kwargs): super().__init__( @@ -119,7 +121,7 @@ def _update_stage_sigs(self, *args, **kwargs): ("cv1.inputs.input2", 3), ("cv1.inputs.input3", 1), ("cv1.inputs.input4", 3), - ("cv1.inputs.input5", 13), + ("cv1.inputs.input5", 6), ("cv1.inputs.input6", 1), ("trans1.nd_array_port", "PROC1"), ] @@ -233,7 +235,8 @@ def _configure_device(self, *args, **kwargs): ] ) - self.topcam.read_attrs = ["out9_buffer", "out10_buffer"] + self.topcam.read_attrs = [ "out8_buffer", + "out9_buffer", "out10_buffer"] self.zebra.read_attrs = ["pos_capt.data.enc4"] def _update_stage_sigs(self, *args, **kwargs): diff --git a/mxbluesky/plans/__init__.py b/mxbluesky/plans/__init__.py index c9d52bed..e69de29b 100644 --- a/mxbluesky/plans/__init__.py +++ b/mxbluesky/plans/__init__.py @@ -1,2 +0,0 @@ -from .loop_detection import detect_loop -from .top_view import topview_optimized \ No newline at end of file diff --git a/mxbluesky/plans/loop_detection.py b/mxbluesky/plans/loop_detection.py index 8a706381..ad311405 100644 --- a/mxbluesky/plans/loop_detection.py +++ b/mxbluesky/plans/loop_detection.py @@ -91,10 +91,6 @@ def detect_loop(sample_detection: "Dict[str, float|int]"): yield from bps.mv(gonio.o, sample_detection["face_on_omega"]+90) yield from trigger_two_click() - try: - yield from bp.count([two_click_low], 1) - except FailedStatus: - yield from bp.count([two_click_low], 1) loop_detector.get_threshold.set(True) loop_detector.x_start.set(int(box_coords_face[0]-mean_x))