Export the same number of angles for nb and bi modes

This commit is contained in:
usov_i 2021-02-12 11:05:15 +01:00
parent 9140798c74
commit 36faad1d9d
2 changed files with 6 additions and 2 deletions

View File

@ -62,7 +62,7 @@ CCL_FIRST_LINE = (("idx", int), ("h", float), ("k", float), ("l", float))
CCL_ANGLES = { CCL_ANGLES = {
"bi": (("twotheta", float), ("omega", float), ("chi", float), ("phi", float)), "bi": (("twotheta", float), ("omega", float), ("chi", float), ("phi", float)),
"nb": (("gamma", float), ("omega", float), ("nu", float)), "nb": (("gamma", float), ("omega", float), ("nu", float), ("skip_angle", float)),
} }
CCL_SECOND_LINE = ( CCL_SECOND_LINE = (
@ -135,7 +135,7 @@ def parse_1D(fileobj, data_type):
# read data # read data
scan = [] scan = []
if data_type == ".ccl": if data_type == ".ccl":
ccl_first_line = (*CCL_FIRST_LINE, *CCL_ANGLES[metadata["zebra_mode"]]) ccl_first_line = CCL_FIRST_LINE + CCL_ANGLES[metadata["zebra_mode"]]
ccl_second_line = CCL_SECOND_LINE ccl_second_line = CCL_SECOND_LINE
for line in fileobj: for line in fileobj:

View File

@ -40,6 +40,10 @@ def _parameters_match(scan1, scan2):
return False return False
for param in ("ub", "temp", "mf", *(vars[0] for vars in CCL_ANGLES[zebra_mode])): for param in ("ub", "temp", "mf", *(vars[0] for vars in CCL_ANGLES[zebra_mode])):
if param.startswith("skip"):
# ignore skip parameters, like the last angle in 'nb' zebra mode
continue
if param == scan1["variable_name"] == scan2["variable_name"]: if param == scan1["variable_name"] == scan2["variable_name"]:
# check if ranges of variable parameter overlap # check if ranges of variable parameter overlap
range1 = scan1["variable"] range1 = scan1["variable"]