From 41d55a417b4c272dccf64571d7c6a5e0621d895e Mon Sep 17 00:00:00 2001 From: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:23:11 +0100 Subject: [PATCH] I24 serial: Beamline test fixes (#526) * Ue opencv instead of headless to get the oav window up * Re-add all devices to shell commands in edm. Hopefully temporary * Idem for extruder * Add edm screens to ignore * Removing edl ignore as it's not needed * Add comment for opencv --------- Co-authored-by: Dominic Oram --- pyproject.toml | 2 +- .../serial/extruder/EX-gui-edm/DetStage.edl | 6 ++-- .../EX-gui-edm/DiamondExtruder-I24-py3v1.edl | 14 +++++----- .../FT-gui-edm/CustomChip_py3v1.edl | 6 ++-- .../fixed_target/FT-gui-edm/DetStage.edl | 6 ++-- .../FT-gui-edm/DiamondChipI24-py3v1.edl | 28 +++++++++---------- .../FT-gui-edm/MappingLite-oxford_py3v1.edl | 8 +++--- .../FT-gui-edm/pumpprobe-py3v1.edl | 16 +++++------ .../beamlines/i24/serial/run_serial.py | 2 +- 9 files changed, 44 insertions(+), 44 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ec3f33254..5a10a8eaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ dependencies = [ "matplotlib", "nexgen", "numpy", - "opencv-python-headless", + "opencv-python", # Needed for I24 ssx moveonclick. To be changed to headless once this is moved to separate ui. "opentelemetry-distro", "opentelemetry-exporter-otlp", "pydantic", diff --git a/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DetStage.edl b/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DetStage.edl index 8316b06fb..daa5cd187 100644 --- a/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DetStage.edl +++ b/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DetStage.edl @@ -3,8 +3,8 @@ beginScreenProperties major 4 minor 0 release 1 -x 3338 -y 572 +x 1316 +y 573 w 450 h 180 font "arial-medium-r-18.0" @@ -113,7 +113,7 @@ font "arial-medium-r-18.0" buttonLabel "Move Stage" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run setup_detector_stage '\{\"expt_type\":\"Serial Jet\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run setup_detector_stage '\{\"expt_type\":\"Serial Jet\",\"detector_stage\":\"detector_motion\"\}'" } endObjectProperties diff --git a/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DiamondExtruder-I24-py3v1.edl b/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DiamondExtruder-I24-py3v1.edl index 66bbc64c5..d770a0585 100644 --- a/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DiamondExtruder-I24-py3v1.edl +++ b/src/mx_bluesky/beamlines/i24/serial/extruder/EX-gui-edm/DiamondExtruder-I24-py3v1.edl @@ -3,8 +3,8 @@ beginScreenProperties major 4 minor 0 release 1 -x 1018 -y 277 +x 1006 +y 192 w 700 h 900 font "arial-medium-r-18.0" @@ -370,7 +370,7 @@ font "arial-medium-r-24.0" buttonLabel "Start" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run run_extruder_plan" + 0 "blueapi -c CONFIG_LOCATION controller run run_extruder_plan '\{\"zebra\":\"zebra\",\"aperture\":\"aperture\",\"backlight\":\"backlight\",\"beamstop\":\"beamstop\",\"detector_stage\":\"detector_motion\",\"shutter\":\"shutter\",\"dcm\":\"dcm\"\}'" } endObjectProperties @@ -832,7 +832,7 @@ botShadowColor index 11 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run initialise_extruder" + 0 "blueapi -c CONFIG_LOCATION controller run initialise_extruder '\{\"detector_stage\":\"detector_motion\"\}'" } endObjectProperties @@ -2179,7 +2179,7 @@ font "arial-medium-r-20.0" buttonLabel "Laser On" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_check '\{\"mode\":\"laseron\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_check '\{\"mode\":\"laseron\",\"zebra\":\"zebra\",\"detector_stage\":\"detector_motion\"\}'" } endObjectProperties @@ -2201,7 +2201,7 @@ font "arial-medium-r-20.0" buttonLabel "Laser Off" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_check '\{\"mode\":\"laseroff\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_check '\{\"mode\":\"laseroff\",\"zebra\":\"zebra\",\"detector_stage\":\"detector_motion\"\}'" } endObjectProperties @@ -2223,7 +2223,7 @@ font "arial-medium-r-18.0" buttonLabel "Enter hutch" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run enter_hutch" + 0 "blueapi -c CONFIG_LOCATION controller run enter_hutch '\{\"detector_stage\":\"detector_motion\"\}'" } endObjectProperties diff --git a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl index 8f673dc80..56ee0a60a 100644 --- a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl +++ b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl @@ -3,8 +3,8 @@ beginScreenProperties major 4 minor 0 release 1 -x 1202 -y 1158 +x 1203 +y 544 w 550 h 380 font "arial-medium-r-18.0" @@ -690,7 +690,7 @@ botShadowColor index 11 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run cs_reset" + 0 "blueapi -c CONFIG_LOCATION controller run cs_reset '\{\"pmac\":\"pmac\"\}'" } endObjectProperties diff --git a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DetStage.edl b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DetStage.edl index da3abf7e9..9c47efbaf 100644 --- a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DetStage.edl +++ b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DetStage.edl @@ -3,8 +3,8 @@ beginScreenProperties major 4 minor 0 release 1 -x 1943 -y 793 +x 1205 +y 579 w 450 h 180 font "arial-medium-r-18.0" @@ -113,7 +113,7 @@ font "arial-medium-r-18.0" buttonLabel "Move Stage" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run setup_detector_stage '\{\"expt_type\":\"Serial Fixed\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run setup_detector_stage '\{\"expt_type\":\"Serial Fixed\",\"detector_stage\":\"detector_motion\"\}'" } endObjectProperties diff --git a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl index d2f8d71f4..53082e9f7 100644 --- a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl +++ b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl @@ -3,8 +3,8 @@ beginScreenProperties major 4 minor 0 release 1 -x 2870 -y 282 +x 844 +y 238 w 1030 h 950 font "arial-medium-r-18.0" @@ -280,7 +280,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run moveto_preset '\{\"place\":\"load_position\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run moveto_preset '\{\"place\":\"load_position\",\"pmac\":\"pmac\",\"beamstop\":\"beamstop\",\"backlight\":\"backlight\",\"det_stage\":\"detector_motion\"\}'" } endObjectProperties @@ -301,7 +301,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run moveto_preset '\{\"place\":\"collect_position\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run moveto_preset '\{\"place\":\"collect_position\",\"pmac\":\"pmac\",\"beamstop\":\"beamstop\",\"backlight\":\"backlight\",\"det_stage\":\"detector_motion\"\}'" } endObjectProperties @@ -323,7 +323,7 @@ font "helvetica-bold-r-24.0" buttonLabel "Start" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run run_fixed_target_plan" + 0 "blueapi -c CONFIG_LOCATION controller run run_fixed_target_plan '\{\"zebra\":\"zebra\",\"pmac\":\"pmac\",\"aperture\":\"aperture\",\"backlight\":\"backlight\",\"beamstop\":\"beamstop\",\"detector_stage\":\"detector_motion\",\"shutter\":\"shutter\",\"dcm\":\"dcm\"\}'" } endObjectProperties @@ -615,7 +615,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run cs_maker" + 0 "blueapi -c CONFIG_LOCATION controller run cs_maker '\{\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -1157,7 +1157,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run initialise_stages" + 0 "blueapi -c CONFIG_LOCATION controller run initialise_stages '\{\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -1541,7 +1541,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run block_check" + 0 "blueapi -c CONFIG_LOCATION controller run block_check '\{\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -2915,7 +2915,7 @@ font "helvetica-medium-r-18.0" buttonLabel "Set Fiducial 2" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run fiducial '\{\"point\":\"2\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run fiducial '\{\"point\":\"2\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -2937,7 +2937,7 @@ font "helvetica-medium-r-18.0" buttonLabel "Goto Fiducial 2" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run moveto '\{\"place\":\"f2\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run moveto '\{\"place\":\"f2\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -2981,7 +2981,7 @@ font "helvetica-medium-r-18.0" buttonLabel "Set Fiducial 1" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run fiducial '\{\"point\":\"1\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run fiducial '\{\"point\":\"1\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -3003,7 +3003,7 @@ font "helvetica-medium-r-18.0" buttonLabel "Goto Fiducial 1" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run moveto '\{\"place\":\"f1\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run moveto '\{\"place\":\"f1\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -3734,7 +3734,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run moveto '\{\"place\":\"zero\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run moveto '\{\"place\":\"zero\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -3776,7 +3776,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run moveto_preset '\{\"place\":\"microdrop_position\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run moveto_preset '\{\"place\":\"microdrop_position\",\"pmac\":\"pmac\",\"beamstop\":\"beamstop\",\"backlight\":\"backlight\",\"det_stage\":\"detector_motion\"\}'" } endObjectProperties diff --git a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/MappingLite-oxford_py3v1.edl b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/MappingLite-oxford_py3v1.edl index bf510f9ad..ff7812f6b 100644 --- a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/MappingLite-oxford_py3v1.edl +++ b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/MappingLite-oxford_py3v1.edl @@ -3,8 +3,8 @@ beginScreenProperties major 4 minor 0 release 1 -x 3168 -y 155 +x 1062 +y 369 w 650 h 400 font "arial-medium-r-18.0" @@ -219,7 +219,7 @@ font "arial-medium-r-18.0" buttonLabel "Upload Parameters" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run upload_parameters" + 0 "blueapi -c CONFIG_LOCATION controller run upload_parameters '\{\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -2410,7 +2410,7 @@ font "helvetica-medium-r-18.0" buttonLabel "Define Chip In PMAC" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run define_current_chip '\{\"chipid\":\"oxford\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run define_current_chip '\{\"chipid\":\"oxford\",\"pmac\":\"pmac\"\}'" } endObjectProperties diff --git a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl index 0383988c7..7fe1d94fc 100644 --- a/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl +++ b/src/mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl @@ -3,8 +3,8 @@ beginScreenProperties major 4 minor 0 release 1 -x 2970 -y 362 +x 830 +y 200 w 900 h 700 font "arial-medium-r-18.0" @@ -707,7 +707,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser1off\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser1off\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -749,7 +749,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser1on\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser1on\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -976,7 +976,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser2off\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser2off\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -1018,7 +1018,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser2on\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser2on\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -1334,7 +1334,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser1burn\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser1burn\",\"pmac\":\"pmac\"\}'" } endObjectProperties @@ -1376,7 +1376,7 @@ botShadowColor index 14 font "arial-medium-r-18.0" numCmds 1 command { - 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser2burn\"\}'" + 0 "blueapi -c CONFIG_LOCATION controller run laser_control '\{\"laser_setting\":\"laser2burn\",\"pmac\":\"pmac\"\}'" } endObjectProperties diff --git a/src/mx_bluesky/beamlines/i24/serial/run_serial.py b/src/mx_bluesky/beamlines/i24/serial/run_serial.py index 55e7f37a4..5678ec0d7 100644 --- a/src/mx_bluesky/beamlines/i24/serial/run_serial.py +++ b/src/mx_bluesky/beamlines/i24/serial/run_serial.py @@ -11,7 +11,7 @@ def get_location(default: str = "dev") -> str: def get_edm_path() -> Path: - return Path(__file__).parents[4] / "edm_serial" + return Path(__file__).parents[5] / "edm_serial" def _get_file_path() -> Path: