Fix a bug in omega range calculation

This commit is contained in:
usov_i 2021-03-04 10:57:52 +01:00
parent a70b4fae57
commit 566cebb01a

View File

@ -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 = []