From 7075e0f42bc6f5195f89f9c24454fde9c4915a8f Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Fri, 6 May 2022 15:29:45 +0200 Subject: [PATCH] Assume scan_motor to be "om" if it's not present --- pyzebra/ccl_io.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyzebra/ccl_io.py b/pyzebra/ccl_io.py index 222bd6a..f6d4a13 100644 --- a/pyzebra/ccl_io.py +++ b/pyzebra/ccl_io.py @@ -159,6 +159,9 @@ def parse_1D(fileobj, data_type): for param, (param_name, param_type) in zip(next_line.split(), ccl_second_line): scan[param_name] = param_type(param) + if "scan_motor" not in scan: + scan["scan_motor"] = "om" + if scan["scan_motor"] != "om": raise Exception("Unsupported variable name in ccl file.")