From e01949ee63b869e9e427e91fecaca060687494d8 Mon Sep 17 00:00:00 2001 From: Ryuichi Arafune Date: Fri, 8 Dec 2023 16:25:36 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arpes/endstations/prodigy_itx.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/arpes/endstations/prodigy_itx.py b/arpes/endstations/prodigy_itx.py index b011198a..7123a1e3 100644 --- a/arpes/endstations/prodigy_itx.py +++ b/arpes/endstations/prodigy_itx.py @@ -570,23 +570,14 @@ def _parse_setscale(line: str) -> tuple[str, str, float, float, str]: num2: float unit: str setscale = line.split(",", maxsplit=5) - if "/I" in line: + if "/I" in setscale[0]: flag = "I" elif "/P" in line: flag = "P" else: flag = "" - if "x" in setscale[0]: - dim = "x" - elif "y" in setscale[0]: - dim = "y" - elif "z" in setscale[0]: - dim = "z" - elif "d" in setscale[0]: - dim = "d" - elif " t" in setscale[0]: - dim = "t" - else: + dim = setscale[0][-1] + if dim not in ("x", "y", "z", "d", "t"): msg = "Dimension is not correct" raise RuntimeError(msg) unit = setscale[3].strip()[1:-1]