67 lines
1.8 KiB
Python
67 lines
1.8 KiB
Python
###################################################################################################\
|
|
#Geometry
|
|
###################################################################################################
|
|
set_geometry("fourcv", True)
|
|
|
|
###################################################################################################\
|
|
#Constraints
|
|
###################################################################################################
|
|
hkl.con('a_eq_b')
|
|
|
|
|
|
###################################################################################################\
|
|
#Orientation
|
|
###################################################################################################
|
|
|
|
"""
|
|
Enter real space lattice parameters:
|
|
Lattice a (1.305)? 7.723
|
|
Lattice b (1.305)? 7.707
|
|
Lattice c (1.305)? 7.723
|
|
Lattice alpha (90)? 90
|
|
Lattice beta (90)? 89.265
|
|
Lattice gamma (90)? 90
|
|
"""
|
|
|
|
|
|
ub.newub('test1')
|
|
|
|
ub.setlat('cubic', 7.723, 7.707, 7.723, 90.0, 89.265, 90.0)
|
|
en = 9.5
|
|
#en = 12.4 #!!!!!
|
|
|
|
ub.ub()
|
|
ub.checkub()
|
|
calc_ub = get_ub_matrix()
|
|
|
|
"""
|
|
#"mu", "delta", "gam", "eta"
|
|
#ub.addref([0, 1, 2], [9.7280, 9.7490, 19.5860, 93.1159], en)
|
|
#ub.addref([2, 2, 2], [9.6050, 27.7006, 20.9322 , 57.7252], en)
|
|
#ub.addref([2, 0, 2], [9.6023 , 19.4996, 20.2618 , 8.6687], en)
|
|
ub.addref([0, 1, 2], [ 9.7212 , 9.7488 , 19.5860, 93.1295], en)
|
|
ub.addref([2, 2, 2], [ 9.8097 , 27.7194 , 20.9065 , 57.5840], en)
|
|
ub.addref([2, 0, 2], [9.8217 , 19.5132 , 20.2488 , 8.4510], en)
|
|
ub.ub()
|
|
ub.checkub()
|
|
|
|
|
|
calc_ub = get_ub_matrix()
|
|
print hkl_to_angles(0, 1, 2)[0]
|
|
print hkl_to_angles(2, 2, 2)[0]
|
|
print hkl_to_angles(2, 0, 2)[0]
|
|
|
|
|
|
|
|
for r in orig_ub: print r
|
|
for r in calc_ub: print r
|
|
print "---"
|
|
|
|
print e
|
|
for i in range(3):
|
|
for j in range(3):
|
|
e[i][j] = abs(orig_ub[i][j] - calc_ub[i][j])
|
|
|
|
for r in e: print r
|
|
|
|
""" |