From 566cebb01af565aff9949671e728a131e8ebfb84 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Thu, 4 Mar 2021 10:57:52 +0100 Subject: [PATCH] Fix a bug in omega range calculation --- pyzebra/ccl_io.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pyzebra/ccl_io.py b/pyzebra/ccl_io.py index dcbdd51..22d605d 100644 --- a/pyzebra/ccl_io.py +++ b/pyzebra/ccl_io.py @@ -160,11 +160,8 @@ def parse_1D(fileobj, data_type): # "om" -> "omega" s["scan_motor"] = "omega" # overwrite metadata, because it only refers to the scan center - s["omega"] = np.linspace( - s["omega"] - (s["n_points"] / 2) * s["angle_step"], - s["omega"] + (s["n_points"] / 2) * s["angle_step"], - s["n_points"], - ) + half_dist = (s["n_points"] - 1) / 2 * s["angle_step"] + s["omega"] = np.linspace(s["omega"] - half_dist, s["omega"] + half_dist, s["n_points"]) # subsequent lines with counts counts = []