fix: return beam center in correct format #186
@@ -78,8 +78,8 @@ class _1dModel(BeamCenterModel):
|
||||
self, det_z_mm: ArrayLike, det_y_mm: ArrayLike
|
||||
) -> tuple[NDArray[np.float64], NDArray[np.float64]]:
|
||||
return (
|
||||
self._x_fit[1] + self._x_fit[0] * det_z_mm,
|
||||
self._y_fit[1] + self._y_fit[0] * det_z_mm,
|
||||
np.asarray([self._x_fit[1] + self._x_fit[0] * det_z_mm]),
|
||||
np.asarray([self._y_fit[1] + self._y_fit[0] * det_z_mm]),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ def test_pxii_dispatch_beam_center():
|
||||
with patch.dict("os.environ", {"BEAMLINE": "X10SA"}):
|
||||
dispatch = get_beamline_dispatch()
|
||||
beam_center = dispatch.geo.beam_centre_model.predict(300, 62)
|
||||
assert np.isclose(beam_center[0], 2081.8, atol=1)
|
||||
assert np.isclose(beam_center[1], 2242.05, atol=1)
|
||||
assert np.isclose(beam_center[0][0], 2081.8, atol=1)
|
||||
assert np.isclose(beam_center[1][0], 2242.05, atol=1)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
|
||||
Reference in New Issue
Block a user