###################################################################################################\ #Geometry ################################################################################################### set_geometry("fourcv", True) ###################################################################################################\ #Constraints ################################################################################################### #hkl.con('a_eq_b') #equivalent to 'setmode 0' + 'freeze 5' hkl.con( 'alpha', 5) #alpha constant #equivalent to 'setmode 1' + 'freeze 5' #hkl.con( 'beta', 5) #be constant #equivalent to 'setmode 2'' #hkl.con('a_eq_b') #alpha=beta #hkl.con( 'eta', 0) 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 """ newub('test1') 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 #setub([[ 0.81363, 0.00000, 0.00000], [0.00000, 0.81526, 0.00000], [-0.01044, 0.00000, 0.81357]]) addref([0, 1, 2], [5.0, 9.379, 19.7895, 102.6162], en) addref([2, 0, 2], [5.0, 19.0754, 20.1865, 11.9693], en) addref([2, 2, 2], [5.0, 27.1234, 21.2368, 60.0354], en) #refineub([2, 2, 2], [5.0, 27.1234, 21.2368, 60.0354]) #showub() checkub() calc_ub = getub() print hklci((44.3400, 0.0000, 123.7322 , 0.0))[0] print hklca((0, 1, 2))[0] print hklca((2, 0, 2))[0] print hklca((2, 2, 2))[0]