From 07f6d9666e1d8f17b4790e9400cf8fd97bfbef91 Mon Sep 17 00:00:00 2001 From: Mathias Sander Date: Wed, 26 Apr 2023 12:15:36 +0200 Subject: [PATCH] fixes addition dsd --- eco/bernina/bernina.py | 4 ++-- eco/xoptics/kb_bernina.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/eco/bernina/bernina.py b/eco/bernina/bernina.py index 923e453..5912312 100644 --- a/eco/bernina/bernina.py +++ b/eco/bernina/bernina.py @@ -1945,11 +1945,11 @@ namespace.append_obj( "SlitBladesGeneral", name="slit_cleanup_air", def_blade_up={ - "args": [MotorRecord, "SARES20-MF1:MOT_5"], + "args": [MotorRecord, "SARES20-MF1:MOT_4"], "kwargs": {"is_psi_mforce": True}, }, def_blade_down={ - "args": [MotorRecord, "SARES20-MF1:MOT_4"], + "args": [MotorRecord, "SARES20-MF1:MOT_5"], "kwargs": {"is_psi_mforce": True}, }, def_blade_left={ diff --git a/eco/xoptics/kb_bernina.py b/eco/xoptics/kb_bernina.py index 9f3062f..e6267c9 100644 --- a/eco/xoptics/kb_bernina.py +++ b/eco/xoptics/kb_bernina.py @@ -26,6 +26,7 @@ class KBMirrorBernina(Assembly): d_target=1520.0, d_att=1420.0, d_prof_dsd=3725.0, + d_plate_mondsd=3147.5, name=None, ): """All distances are from sample interaction point at straight beam (no kb deflection), the units are expected in mm""" @@ -51,6 +52,7 @@ class KBMirrorBernina(Assembly): self.d_win1 = d_win1 self.d_target = d_target self.d_prof_dsd = d_prof_dsd + self.d_plate_mondsd = d_plate_mondsd def calc_positions(self, the_kbver, the_kbhor): """angles in rad, positive only (i.e. describe incidence angles to KBs)""" @@ -65,12 +67,18 @@ class KBMirrorBernina(Assembly): pos_calc["ry_hex"] = 2 * the_kbhor pos_calc["x_diff"] = np.tan(2 * the_kbhor) * np.abs(self.d_kbhor) pos_calc["y_diff"] = np.tan(2 * the_kbver) * np.abs(self.d_kbver) - pos_calc["x_dsd"] = np.tan(2 * the_kbhor) * np.abs( + pos_calc["x_prof_dsd"] = np.tan(2 * the_kbhor) * np.abs( self.d_kbhor + self.d_prof_dsd ) - pos_calc["y_dsd"] = np.tan(2 * the_kbver) * np.abs( + pos_calc["y_prof_dsd"] = np.tan(2 * the_kbver) * np.abs( self.d_kbver + self.d_prof_dsd ) + pos_calc["x_plate_mon_dsd"] = np.tan(2 * the_kbhor) * np.abs( + self.d_kbhor + self.d_plate_mondsd + ) + pos_calc["y_plate_mon_dsd"] = np.tan(2 * the_kbver) * np.abs( + self.d_kbver + self.d_plate_mondsd + ) return pos_calc def calc_fwhm(