From e677c932ac7a696832585fa6f269aca1d620634d Mon Sep 17 00:00:00 2001 From: Noemi Frisina Date: Fri, 10 Jan 2025 15:29:02 +0000 Subject: [PATCH] Also fix the dcm code broken by dodal branch --- .../device_setup_plans/dcm_pitch_roll_mirror_adjuster.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mx_bluesky/hyperion/device_setup_plans/dcm_pitch_roll_mirror_adjuster.py b/src/mx_bluesky/hyperion/device_setup_plans/dcm_pitch_roll_mirror_adjuster.py index 19d8cfb2c..8e10176d2 100644 --- a/src/mx_bluesky/hyperion/device_setup_plans/dcm_pitch_roll_mirror_adjuster.py +++ b/src/mx_bluesky/hyperion/device_setup_plans/dcm_pitch_roll_mirror_adjuster.py @@ -10,6 +10,7 @@ from dodal.devices.util.adjuster_plans import lookup_table_adjuster from dodal.devices.util.lookup_tables import ( linear_interpolation_lut, + parse_lookup_table, ) from mx_bluesky.common.utils.log import LOGGER @@ -106,7 +107,9 @@ def adjust_dcm_pitch_roll_vfm_from_lut( bragg_deg = energy_to_bragg_angle(energy_kev, d_spacing_a) LOGGER.info(f"Target Bragg angle = {bragg_deg} degrees") dcm_pitch_adjuster = lookup_table_adjuster( - linear_interpolation_lut(undulator_dcm.pitch_energy_table_path), + linear_interpolation_lut( + *parse_lookup_table(undulator_dcm.pitch_energy_table_path) + ), dcm.pitch_in_mrad, bragg_deg, ) @@ -116,7 +119,9 @@ def adjust_dcm_pitch_roll_vfm_from_lut( # DCM Roll dcm_roll_adjuster = lookup_table_adjuster( - linear_interpolation_lut(undulator_dcm.roll_energy_table_path), + linear_interpolation_lut( + *parse_lookup_table(undulator_dcm.roll_energy_table_path) + ), dcm.roll_in_mrad, bragg_deg, )