Startup
This commit is contained in:
64
script/diffcalc_test/testfourcv_comp.py
Normal file
64
script/diffcalc_test/testfourcv_comp.py
Normal file
@@ -0,0 +1,64 @@
|
||||
run("diffcalc/diffutils")
|
||||
|
||||
###################################################################################################\
|
||||
#Setup
|
||||
###################################################################################################
|
||||
energy.move(8.0)
|
||||
#alpha, delta, gamma, omegaV
|
||||
setup_diff(fourcv, energy, ("mu", "delta", "gam", "eta"))
|
||||
print_axis_setup()
|
||||
|
||||
|
||||
setup_axis(mu, mu.getMinValue(), mu.getMaxValue())
|
||||
setup_axis(delta, delta.getMinValue(), 90) #delta.getMaxValue())
|
||||
setup_axis(gamma, 0, gamma.getMaxValue())
|
||||
setup_axis(eta, eta.getMinValue(), eta.getMaxValue())
|
||||
|
||||
###################################################################################################\
|
||||
#Orientation
|
||||
###################################################################################################
|
||||
help(ub.ub)
|
||||
ub.listub()
|
||||
|
||||
#alpha delta gamma omegaV
|
||||
|
||||
# Create a new ub calculation and set lattice parameters
|
||||
ub.newub('test')
|
||||
|
||||
ub.setlat('cubic', 5.114, 5.8361, 11.058, 90, 90, 90)
|
||||
en = 8
|
||||
#ub.c2th([0, 0, 4], en)
|
||||
#ub.addref([0, 0, 4]) #From current position and ekergy
|
||||
ub.addref([0, 0, 4], [16.2785, 0.0, 32.5568, 0.0], en)
|
||||
#ub.c2th([2, 0, 12], en)
|
||||
ub.addref([2, 0, 12], [71.8285, 37.3082, 138.7440, 0.0], en)
|
||||
#ub.c2th([1, -4, 10], en)
|
||||
ub.addref([1, -4, 10], [27.7185, 17.6409 , 128.4220, 0.0], en)
|
||||
|
||||
ub.ub()
|
||||
|
||||
#ub.setub([[1.22862,0.00000,0.00000], [-0.00000,1.07663,0.00000], [-0.00000,-0.00000,0.56820]])
|
||||
|
||||
|
||||
# check the state
|
||||
|
||||
ub.checkub()
|
||||
|
||||
|
||||
|
||||
###################################################################################################\
|
||||
#Constraints
|
||||
###################################################################################################
|
||||
help(hkl.con)
|
||||
#hkl.con('a_eq_b')
|
||||
#hkl.con('eta:0')
|
||||
hkl.con( 'eta', 0)
|
||||
|
||||
|
||||
###################################################################################################\
|
||||
#Motion
|
||||
###################################################################################################
|
||||
|
||||
#print angles_to_hkl((16.278, 0.0000, 32.5568, 0.0))
|
||||
print angles_to_hkl((44.3400, 0.0000, 123.7322 , 0.0))
|
||||
print hkl_to_angles(2, -2, 10)
|
||||
Reference in New Issue
Block a user