fix: Standard DTY offset is 0 mm now #250
@@ -87,9 +87,7 @@ class _1dModel(BeamCenterModel):
|
||||
def predict(
|
||||
self, det_z_mm: ArrayLike, det_y_mm: ArrayLike
|
||||
) -> tuple[NDArray[np.float64], NDArray[np.float64]]:
|
||||
y_offset_mm: float = det_y_mm - 62 # type: ignore
|
||||
y_offset_um = y_offset_mm * 1000
|
||||
y_offset_px = y_offset_um / 75
|
||||
y_offset_px = (det_y_mm * 1000.0) / 75
|
||||
return (
|
||||
np.asarray([self._x_fit[1] + self._x_fit[0] * det_z_mm]),
|
||||
# positive offset means detector height increased -> beam lower on image -> higher pixel number
|
||||
|
||||
@@ -44,7 +44,7 @@ def test_pxii_dispatch_can_be_instantiated():
|
||||
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)
|
||||
beam_center = dispatch.geo.beam_centre_model.predict(300, 0)
|
||||
assert np.isclose(beam_center[0][0], 2081.8, atol=1)
|
||||
assert np.isclose(beam_center[1][0], 2242.05, atol=1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user