79 lines
2.8 KiB
Python
79 lines
2.8 KiB
Python
###################################################################################################\
|
|
#Geometry
|
|
###################################################################################################
|
|
set_geometry("fourcv", True)
|
|
|
|
###################################################################################################\
|
|
#Orientation
|
|
###################################################################################################
|
|
|
|
"""
|
|
# H K L ov alp del gam nu dev'n
|
|
- - - - --- --- --- --- --- -----
|
|
1 0.0000 1.0000 2.0000 93.1159 9.7280 9.7490 19.5860 0.0000
|
|
0.0000 1.0000 2.0000 93.1295 9.7212 9.7488 19.5860 0.0000 0.0000
|
|
------------------------------------------------
|
|
2 2.0000 2.0000 2.0000 57.7252 9.6050 27.7006 20.9322 0.0000
|
|
2.0000 2.0000 2.0000 57.5840 9.8097 27.7194 20.9065 0.0000 0.0000
|
|
------------------------------------------------
|
|
3 2.0000 0.0000 2.0000 8.6687 9.6023 19.4996 20.2618 0.0000
|
|
2.0000 0.0000 2.0000 8.4510 9.8217 19.5132 20.2488 0.0000 0.0000
|
|
------------------------------------------------
|
|
|
|
Orientation Matrix by Row:
|
|
|
|
Row 1: 0.81374 0.02138 0.00228
|
|
Row 2: -0.02199 0.81543 0.00123
|
|
Row 3: 0.00784 -0.00100 0.81347
|
|
|
|
1874.X04V> wh
|
|
|
|
H K L = 2 0 2
|
|
BetaIn = 9.8218 BetaOut = 9.8218
|
|
Lambda = 1.305
|
|
|
|
omegaV alpha delta gamma nu
|
|
8.6687 9.6022 19.4996 20.2617 0.0000
|
|
|
|
"""
|
|
|
|
ub.newub('test')
|
|
|
|
ub.setub([[ 0.81374, 0.02138, 0.00228], [-0.02199, 0.81543, 0.00123], [ 0.00784, -0.00100, 0.81347]])
|
|
ub.checkub()
|
|
|
|
###################################################################################################\
|
|
#Constraints
|
|
###################################################################################################
|
|
hkl.con('a_eq_b')
|
|
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 get_ub_matrix(): print r
|
|
|
|
|
|
|
|
ub.newub('test1')
|
|
|
|
ub.setlat('cubic', 7.723, 7.707, 7.723, 90.0, 89.265, 90.0)
|
|
en = 9.5
|
|
#en = 12.4 #!!!!!
|
|
|
|
#"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()
|
|
|
|
|
|
for r in get_ub_matrix(): print r
|
|
print hkl_to_angles(0, 1, 2)[0]
|
|
print hkl_to_angles(2, 2, 2)[0]
|
|
print hkl_to_angles(2, 0, 2)[0]
|
|
|