Use a dummy UB matrix if it's absent in hdf file
This commit is contained in:
parent
b8cf76220c
commit
4bcfaf8c80
@ -119,6 +119,9 @@ 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"]
|
||||
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"][:]
|
||||
|
Loading…
x
Reference in New Issue
Block a user