Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
97783aa
Convert test beamlineParameters files
jacob720 Dec 9, 2025
4cae7d8
Add mock config server
jacob720 Dec 9, 2025
4c37ed9
Pin dodal
jacob720 Dec 10, 2025
9136e23
Fix
jacob720 Jan 12, 2026
2a89044
Require newest daq-config-server
jacob720 Jan 12, 2026
26aa661
Fix against dodal
jacob720 Jan 23, 2026
1605fca
Remove redundant fixture
jacob720 Jan 26, 2026
13c2a2b
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 Jan 26, 2026
8810f9f
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 Feb 5, 2026
623de3b
Fix lint
jacob720 Feb 5, 2026
230bcd8
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 Feb 5, 2026
af04fae
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 Feb 11, 2026
bf3d105
Use config server fixtures from dodal and patch beamline environment
jacob720 Feb 11, 2026
fdaed05
Reduce use of get_beamline_name default
jacob720 Feb 11, 2026
992b067
Fix tests
jacob720 Feb 13, 2026
d53c9f9
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 Feb 13, 2026
095a052
Fix
jacob720 Feb 13, 2026
f70f9b6
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 Feb 23, 2026
6f17235
Merge branch 'main' into 1504_read_beamlineParameters_through_config_…
jacob720 Mar 2, 2026
052ede6
Reformat test data
jacob720 Dec 10, 2025
d72769a
Read detector lookup table through config server
jacob720 Dec 10, 2025
7dec74e
Pin dodal
jacob720 Dec 10, 2025
1f60cb9
Use DetectorXY lut config model
jacob720 Jan 6, 2026
7bb4a57
Fix for columns becoming a property
jacob720 Jan 6, 2026
5830399
Update lockfile
jacob720 Mar 3, 2026
74393df
Merge branch 'main' into 1509_use_config_server_for_detector_lut
jacob720 Mar 17, 2026
9285457
Use get_config_client function to get config client
jacob720 Mar 17, 2026
fdd81f0
Update lockfile
jacob720 Mar 17, 2026
7a6d499
Update lockfile
jacob720 Mar 17, 2026
f802021
Merge branch 'main' into 1509_use_config_server_for_detector_lut
jacob720 Mar 25, 2026
1daf771
Fix
jacob720 Mar 25, 2026
cc6e08e
Small change
jacob720 Mar 25, 2026
95a880a
Unpin dodal
jacob720 Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from pathlib import Path

import bluesky.plan_stubs as bps
from daq_config_server.models.lookup_tables import DetectorXYLookupTable
from dodal.common.beamlines.beamline_utils import get_config_client
from dodal.devices.beamlines.i24.aperture import Aperture, AperturePositions
from dodal.devices.beamlines.i24.beam_center import DetectorBeamCenter
from dodal.devices.beamlines.i24.beamstop import Beamstop, BeamstopPositions
Expand All @@ -10,7 +12,6 @@
from dodal.devices.motors import YZStage
from dodal.devices.util.lookup_tables import (
linear_interpolation_lut,
parse_lookup_table,
)

from mx_bluesky.beamlines.i24.serial.log import SSX_LOGGER
Expand All @@ -26,17 +27,19 @@ def compute_beam_center_position_from_lut(
"""Calculate the beam center position for the detector distance \
using the values in the lookup table for the conversion.
"""
lut_values = parse_lookup_table(lut_path.as_posix())
lut_columns = (
get_config_client().get_file_contents(lut_path, DetectorXYLookupTable).columns
)

calc_x = linear_interpolation_lut(lut_values[0], lut_values[1])
calc_x = linear_interpolation_lut(lut_columns[0], lut_columns[1])
beam_x_mm = calc_x(detector_distance_mm)
beam_x = (
beam_x_mm
* det_size_constants.det_size_pixels.width
/ det_size_constants.det_dimension.width
)

calc_y = linear_interpolation_lut(lut_values[0], lut_values[2])
calc_y = linear_interpolation_lut(lut_columns[0], lut_columns[2])
beam_y_mm = calc_y(detector_distance_mm)
beam_y = (
beam_y_mm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Table giving position of beam X and Y as a function of detector distance
#Units mm mm mm
# Eiger values
# distance beamY beamX (values from mosflm)
Units mm mm mm
200 119.78 127.0
1500 119.4 126.9
{
"column_names": ["detector_distances_mm", "beam_centre_x_mm", "beam_centre_y_mm"],
"rows": [
[200.0, 119.78, 127.0],
[1500.0, 119.4, 126.9]
]
}
14 changes: 7 additions & 7 deletions tests/test_data/test_det_dist_converter.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Table giving position of beam X and Y as a function of detector distance
#Units mm mm mm
# Eiger values
# distance beamY beamX (values from mosflm)
Units mm mm mm
200 153.61 162.45
500 153.57 159.96
{
"column_names": ["detector_distances_mm", "beam_centre_x_mm", "beam_centre_y_mm"],
"rows": [
[200.0, 153.61, 162.45],
[500.0, 153.57, 159.96]
]
}
11 changes: 6 additions & 5 deletions tests/test_data/test_lookup_table.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Beam converter lookup table for testing

Units det_dist beam_x beam_y
100.0 150.0 160.0
200.0 151.0 165.0
{
"rows": [
[100.0, 150.0, 160.0],
[200.0, 151.0, 165.0]
]
}
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading