Skip to content

Commit aabd043

Browse files
i15-1: Fix xtal device (#2089)
* Remove signals as readables * Remove force_parser option from config server request
1 parent 7916b43 commit aabd043

3 files changed

Lines changed: 14 additions & 16 deletions

File tree

src/dodal/devices/beamlines/i15_1/laue.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ def __init__(
1212
crystal_lut_path: str,
1313
name: str = "",
1414
):
15-
with self.add_children_as_readables():
16-
self.bend = Motor(prefix + "BENDER")
17-
self.bragg = Motor(prefix + "PITCH")
18-
self.roll = Motor(prefix + "ROLL")
19-
self.yaw = Motor(prefix + "YAW")
20-
self.y = Motor(prefix + "Y")
15+
self.bend = Motor(prefix + "BENDER")
16+
self.bragg = Motor(prefix + "PITCH")
17+
self.roll = Motor(prefix + "ROLL")
18+
self.yaw = Motor(prefix + "YAW")
19+
self.y = Motor(prefix + "Y")
2120

2221
with self.add_children_as_readables(StandardReadableFormat.HINTED_SIGNAL):
2322
self.energy_kev = derived_signal_r(self._get_energy, y=self.y)
@@ -29,10 +28,7 @@ def __init__(
2928

3029
def _get_xtal_config(self) -> XpdfCrystalLookupTable:
3130
return self._config_client.get_file_contents(
32-
self._crystal_lut_path,
33-
XpdfCrystalLookupTable,
34-
# Remove once https://github.com/DiamondLightSource/daq-config-server/pull/183 is released + deployed
35-
force_parser=XpdfCrystalLookupTable.from_contents,
31+
self._crystal_lut_path, XpdfCrystalLookupTable
3632
)
3733

3834
def _get_energy(self, y: float) -> float:

tests/devices/beamlines/i15_1/test_laue_monochrometer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ async def test_energy_kev_gets_value_based_on_y(
4747
await assert_reading(
4848
laue_monochrometer,
4949
{f"{laue_monochrometer.name}-energy_kev": partial_reading(expected_energy)},
50-
full_match=False,
50+
full_match=True,
5151
)
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
Units mm keV
2-
# y energy
3-
1.455 40.05 # xtal 311
4-
-48.845 65.40 # xtal 220
5-
50.600 76.69 # xtal 111
1+
{
2+
"rows": [
3+
[1.455, 40.05],
4+
[-48.845,65.4],
5+
[50.6,76.69]
6+
]
7+
}

0 commit comments

Comments
 (0)