fix: return beam center in correct format
CI / test (3.12) (pull_request) Successful in 1m1s
CI / test (3.14) (pull_request) Successful in 1m1s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m10s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m16s
CI / test (3.13) (pull_request) Successful in 1m26s
CI / lint (pull_request) Successful in 1m30s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m33s
Docs build and publish / docker (push) Successful in 3s
CI / lint (push) Canceled after 38s
CI / test (3.12) (push) Canceled after 37s
CI / test-with-coverage (push) Canceled after 22s
CI / test (3.13) (push) Canceled after 33s
CI / test (3.14) (push) Canceled after 32s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 29s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 23s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 20s
CI / test-with-coverage (pull_request) Successful in 2m45s
CI / coverage-analysis (pull_request) Successful in 7s
CI / test (3.12) (pull_request) Successful in 1m1s
CI / test (3.14) (pull_request) Successful in 1m1s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m10s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m16s
CI / test (3.13) (pull_request) Successful in 1m26s
CI / lint (pull_request) Successful in 1m30s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m33s
Docs build and publish / docker (push) Successful in 3s
CI / lint (push) Canceled after 38s
CI / test (3.12) (push) Canceled after 37s
CI / test-with-coverage (push) Canceled after 22s
CI / test (3.13) (push) Canceled after 33s
CI / test (3.14) (push) Canceled after 32s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 29s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 23s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 20s
CI / test-with-coverage (pull_request) Successful in 2m45s
CI / coverage-analysis (pull_request) Successful in 7s
This commit was merged in pull request #186.
This commit is contained in:
@@ -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