Fix scan_motors renaming
This commit is contained in:
parent
eaa6c4a2ad
commit
8129b5e683
@ -214,27 +214,24 @@ def parse_1D(fileobj, data_type):
|
|||||||
s[motor] = np.median(s[motor])
|
s[motor] = np.median(s[motor])
|
||||||
else:
|
else:
|
||||||
s["scan_motors"].append(motor)
|
s["scan_motors"].append(motor)
|
||||||
s["scan_motor"] = s["scan_motors"][0]
|
|
||||||
|
|
||||||
# "om" -> "omega"
|
# "om" -> "omega"
|
||||||
if "om" in s["scan_motors"]:
|
if "om" in s["scan_motors"]:
|
||||||
s["scan_motors"][s["scan_motors"].index("om")] = "omega"
|
s["scan_motors"][s["scan_motors"].index("om")] = "omega"
|
||||||
if s["scan_motor"] == "om":
|
|
||||||
s["scan_motor"] = "omega"
|
|
||||||
s["omega"] = s["om"]
|
s["omega"] = s["om"]
|
||||||
del s["om"]
|
del s["om"]
|
||||||
|
|
||||||
# "tt" -> "temp"
|
# "tt" -> "temp"
|
||||||
elif "tt" in s["scan_motors"]:
|
if "tt" in s["scan_motors"]:
|
||||||
s["scan_motors"][s["scan_motors"].index("tt")] = "temp"
|
s["scan_motors"][s["scan_motors"].index("tt")] = "temp"
|
||||||
if s["scan_motor"] == "tt":
|
|
||||||
s["scan_motor"] = "temp"
|
|
||||||
s["temp"] = s["tt"]
|
s["temp"] = s["tt"]
|
||||||
del s["tt"]
|
del s["tt"]
|
||||||
|
|
||||||
# "mf" stays "mf"
|
# "mf" stays "mf"
|
||||||
# "phi" stays "phi"
|
# "phi" stays "phi"
|
||||||
|
|
||||||
|
s["scan_motor"] = s["scan_motors"][0]
|
||||||
|
|
||||||
if "h" not in s:
|
if "h" not in s:
|
||||||
s["h"] = s["k"] = s["l"] = float("nan")
|
s["h"] = s["k"] = s["l"] = float("nan")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user