Files
x04sa-es3/script/daq/daq3-setup.py
2019-02-11 09:18:52 +01:00

62 lines
1.8 KiB
Python

###################################################################################################\
#Geometry
###################################################################################################
set_geometry("fourcv", True)
###################################################################################################\
#Constraints
###################################################################################################
hkl.con('a_eq_b')
#equivalent to 'setmode 0' + 'freeze 5'
#hkl.con( 'mu', 5) #alpha constant
#hkl.con( 'eta', 0) #alpha constant
setup_axis(alpha, alpha.getMinValue(), alpha.getMaxValue())
setup_axis(delta, delta.getMinValue(), 90) #delta.getMaxValue())
setup_axis(gamma, gamma.getMinValue(), gamma.getMaxValue())
setup_axis(omegaV, omegaV.getMinValue(), omegaV.getMaxValue())
###################################################################################################\
#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 #!!!!!
#Only available in newer Diffcalc
#ub.setmiscut(0)
#Calculated with newer Diffcalc
# UB matrix: 0.81363 0.00000 -0.01044
# 0.00000 0.81526 0.00000
# 0.00000 0.00000 0.81357
ub.setub([[ 0.81363, 0.00000, -0.01044], [0.00000, 0.81526, 0.00000], [0.00000, 0.00000, 0.81357]])
#ub.ub()
ub.checkub()
calc_ub = get_ub_matrix()
#print angles_to_hkl((44.3400, 0.0000, 123.7322 , 0.0))[0]
hkl_to_angles(0, 1, 2)[0]