Split motors on comma with any whitespace around

This commit is contained in:
usov_i 2024-06-07 15:57:27 +02:00
parent 58a704764a
commit 019a36bbb7

View File

@ -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()]