diff --git a/config/config.properties b/config/config.properties index 0adb277..9424035 100644 --- a/config/config.properties +++ b/config/config.properties @@ -1,4 +1,4 @@ -#Mon Oct 29 17:07:47 CET 2018 +#Thu Feb 07 08:31:43 CET 2019 autoSaveScanData=true commandExecutionEvents=false createSessionFiles=false @@ -17,6 +17,7 @@ logLevel=Info logLevelConsole=Off logPath={logs}/{date}_{time} notificationLevel=Off +saveCommandStatistics=false scanStreamerPort=-1 serverEnabled=false serverPort=8080 diff --git a/config/settings.properties b/config/settings.properties index eeddd8d..08355bb 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,2 +1,2 @@ -#Fri Jan 25 16:44:14 CET 2019 +#Mon Feb 11 08:22:56 CET 2019 geometry=fourcv diff --git a/devices/alpha.properties b/devices/alpha.properties index 6f1aad8..dc56f8e 100644 --- a/devices/alpha.properties +++ b/devices/alpha.properties @@ -1,12 +1,12 @@ -#Mon Oct 29 17:07:49 CET 2018 +#Mon Feb 11 08:01:07 CET 2019 defaultSpeed=4.0 estbilizationDelay=0 hasEnable=false homingType=None maxSpeed=NaN -maxValue=186.248 +maxValue=186.24375 minSpeed=0.4 -minValue=-13.751999999999999 +minValue=-13.75625 offset=0.0 precision=4 resolution=5.0E-4 diff --git a/devices/delta.properties b/devices/delta.properties index 4d64b0c..cb69524 100644 --- a/devices/delta.properties +++ b/devices/delta.properties @@ -1,4 +1,4 @@ -#Mon Oct 29 17:07:49 CET 2018 +#Mon Feb 11 08:02:15 CET 2019 defaultSpeed=4.0 estbilizationDelay=0 hasEnable=false diff --git a/devices/gamma.properties b/devices/gamma.properties index 4aabcf9..b040bb3 100644 --- a/devices/gamma.properties +++ b/devices/gamma.properties @@ -1,10 +1,10 @@ -#Mon Oct 29 17:07:49 CET 2018 +#Mon Feb 11 08:01:59 CET 2019 defaultSpeed=4.0 estbilizationDelay=0 hasEnable=false homingType=None maxSpeed=NaN -maxValue=188.06875 +maxValue=164.85 minSpeed=0.4 minValue=-61.93125 offset=0.0 diff --git a/script/local.py b/script/local.py index 9cd2439..cdb2eda 100644 --- a/script/local.py +++ b/script/local.py @@ -39,10 +39,13 @@ def close_shutter(): ################################################################################################### run("cpython/wrapper") -run("device/Mythen") -run("device/Pixel") -run("device/Image") +if not get_context().isSimulation(): + run("device/Mythen") + run("device/Pixel") + run("device/Image") +else: + energy.write(9.5) def after_sample(record, scan): close_shutter() diff --git a/script/test/TestNewDiffcalc.py b/script/test/TestNewDiffcalc.py new file mode 100644 index 0000000..45765d6 --- /dev/null +++ b/script/test/TestNewDiffcalc.py @@ -0,0 +1,83 @@ +###################################################################################################\ +#Geometry +################################################################################################### +set_geometry("fourcv", True) + +###################################################################################################\ +#Constraints +################################################################################################### +hkl.con('a_eq_b') +#hkl.con( 'eta', 0) + + +###################################################################################################\ +#Orientation +################################################################################################### + + +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 +################################################################################################### +help(ub.ub) +ub.listub() + +#alpha delta gamma omegaV + +# Create a new ub calculation and set lattice parameters + +ub.newub('test') + +ub.setlat('cubic', 11.058, 5.8361, 5.114, 90, 90, 90) + +en = 1.5498 + +#ub.c2th([0, 0, 4], en) +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.6408 , 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]]) + + +""" +ub.setlat('cubic', 5.114, 5.8361, 11.058, 90, 90, 90) + +en = 1.5498 +#en=8 +#ub.c2th([0, 0, 4], en) +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() + + +###################################################################################################\ +#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))[0] +print hkl_to_angles(2, -2, 6.59)[0] +