Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
bce8cf3120 | |||
56d626e312 | |||
19daa16de7 | |||
4bcfaf8c80 |
@ -6,4 +6,4 @@ from pyzebra.utils import *
|
||||
from pyzebra.xtal import *
|
||||
from pyzebra.sxtal_refgen import *
|
||||
|
||||
__version__ = "0.7.0"
|
||||
__version__ = "0.7.1"
|
||||
|
@ -143,8 +143,7 @@ def create():
|
||||
# last digits are spind UB matrix
|
||||
vals = list(map(float, c_rest))
|
||||
ub_matrix_spind = np.transpose(np.array(vals).reshape(3, 3))
|
||||
ub_matrix = np.linalg.inv(ub_matrix_spind)
|
||||
ub_matrices.append(ub_matrix)
|
||||
ub_matrices.append(ub_matrix_spind)
|
||||
spind_res["ub_matrix"].append(str(ub_matrix_spind * 1e-10))
|
||||
|
||||
print(f"Content of {spind_out_file}:")
|
||||
@ -168,11 +167,11 @@ def create():
|
||||
def results_table_select_callback(_attr, old, new):
|
||||
if new:
|
||||
ind = new[0]
|
||||
ub_matrix = ub_matrices[ind]
|
||||
ub_matrix_spind = ub_matrices[ind]
|
||||
res = ""
|
||||
for vec in diff_vec:
|
||||
res += f"{ub_matrix @ vec}\n"
|
||||
ub_matrix_textareainput.value = str(ub_matrix * 1e10)
|
||||
res += f"{np.linalg.inv(ub_matrix_spind) @ vec}\n"
|
||||
ub_matrix_textareainput.value = str(ub_matrix_spind * 1e-10)
|
||||
hkl_textareainput.value = res
|
||||
else:
|
||||
ub_matrix_textareainput.value = ""
|
||||
|
@ -167,6 +167,9 @@ def parse_1D(fileobj, data_type):
|
||||
if "scan_motor" not in scan:
|
||||
scan["scan_motor"] = "om"
|
||||
|
||||
if scan["scan_motor"] == "o2t":
|
||||
scan["scan_motor"] = "om"
|
||||
|
||||
if scan["scan_motor"] != "om":
|
||||
raise Exception("Unsupported variable name in ccl file.")
|
||||
|
||||
|
@ -119,7 +119,10 @@ def read_detector_data(filepath, cami_meta=None):
|
||||
scan["phi"] = h5f["/entry1/sample/phi"][:]
|
||||
if len(scan["phi"]) == 1:
|
||||
scan["phi"] = np.ones(n) * scan["phi"]
|
||||
scan["ub"] = h5f["/entry1/sample/UB"][:].reshape(3, 3)
|
||||
if h5f["/entry1/sample/UB"].size == 0:
|
||||
scan["ub"] = np.eye(3) * 0.177
|
||||
else:
|
||||
scan["ub"] = h5f["/entry1/sample/UB"][:].reshape(3, 3)
|
||||
scan["name"] = h5f["/entry1/sample/name"][0].decode()
|
||||
scan["cell"] = h5f["/entry1/sample/cell"][:]
|
||||
|
||||
|
Reference in New Issue
Block a user