Export the same number of angles for nb and bi modes
This commit is contained in:
parent
9140798c74
commit
36faad1d9d
@ -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:
|
||||||
|
@ -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"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user