From 019a36bbb7fd4ee0eb42c3be7b79ba3c4b944ef3 Mon Sep 17 00:00:00 2001 From: Ivan Usov <ivan.usov@psi.ch> Date: Fri, 7 Jun 2024 15:57:27 +0200 Subject: [PATCH] Split motors on comma with any whitespace around --- pyzebra/ccl_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyzebra/ccl_io.py b/pyzebra/ccl_io.py index bc0e2b5..e021df4 100644 --- a/pyzebra/ccl_io.py +++ b/pyzebra/ccl_io.py @@ -235,7 +235,7 @@ def parse_1D(fileobj, data_type, log=logger): scan["export"] = True match = re.search("Scanning Variables: (.*), Steps: (.*)", next(fileobj)) - motors = [motor.lower() for motor in match.group(1).split(", ")] + motors = [motor.strip().lower() for motor in match.group(1).split(",")] # Steps can be separated by " " or ", " steps = [float(step.strip(",")) for step in match.group(2).split()] -- GitLab