From 6b613a01e06be2a3f4b5914f2e7fe201dd03f73e Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 8 Jul 2022 19:34:18 +0200 Subject: [PATCH] DRY --- slic/devices/xoptics/slits/old_slit_base.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 slic/devices/xoptics/slits/old_slit_base.py diff --git a/slic/devices/xoptics/slits/old_slit_base.py b/slic/devices/xoptics/slits/old_slit_base.py new file mode 100644 index 00000000..0c19ec5f --- /dev/null +++ b/slic/devices/xoptics/slits/old_slit_base.py @@ -0,0 +1,14 @@ + +class SlitBase: + + def __call__(self, width, height): + self.set_hg(width) + self.set_vg(height) + + def __repr__(self): + string1 = "gap: (%g,%g) mm" % (self.get_hg(), self.get_vg()) + string2 = "pos: (%g,%g) mm" % (self.get_ho(), self.get_vo()) + return "\n".join((string1, string2)) + + +