From ac9c08808a9d34730fff9398bcadf06710ed8159 Mon Sep 17 00:00:00 2001 From: Alexandre Gobbo Date: Fri, 13 Mar 2020 14:03:25 +0100 Subject: [PATCH] Startup --- config/config.properties | 60 ++++++++++++++++++------------------- config/devices.properties | 6 ++-- config/jcae.properties | 2 +- config/settings.properties | 2 +- config/variables.properties | 4 +-- script/*.scan | 1 - script/local.py | 18 +++++------ script/queues/q1.que | 1 + script/queues/q2.que | 1 + script/queues/q3.que | 1 + script/test/dummy.scan | 1 + script/test/test10.scan | 1 + script/test/test17.xml | 22 +++++++++++--- script/test/test18.xml | 40 +++++++++++++++++-------- script/test/test2.py | 6 ++-- script/test/test6.py | 2 +- script/test/test7.xml | 12 ++++---- script/test/test9.scan | 2 +- script/test2.xml | 2 +- 19 files changed, 109 insertions(+), 75 deletions(-) delete mode 100644 script/*.scan create mode 100644 script/queues/q1.que create mode 100644 script/queues/q2.que create mode 100644 script/queues/q3.que create mode 100644 script/test/dummy.scan create mode 100644 script/test/test10.scan diff --git a/config/config.properties b/config/config.properties index ae83266..336df3e 100755 --- a/config/config.properties +++ b/config/config.properties @@ -1,35 +1,35 @@ -#Fri Feb 28 09:31:07 CET 2020 +#Fri Mar 13 14:03:18 CET 2020 autoSaveScanData=true -commandExecutionEvents=false -createSessionFiles=false -dataLayout=default -dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name} -dataProvider=h5 -dataScanFlushRecords=false -dataScanPreserveTypes=true -dataScanReleaseRecords=false -dataServerPort=5573 -depthDimension=0 -generateCommandExecutionEvents=true -hideServerMessages=false -hostName= -instanceName=Dev -logDaysToLive=50 -logLevel=Fine -logLevelConsole=Off -logPath={logs}/{date}_{time} -notificationLevel=Off -parallelInitialization=false -saveCommandStatistics=true -scanStreamerPort=5563 -serverEnabled=true -serverPort=8080 simulation=false -terminalEnabled=false -terminalPort=0 +commandExecutionEvents=false +logDaysToLive=50 userAuthenticator=ch.psi.pshell.security.LdapAuthenticator | ldap\://d.psi.ch | d.psi.ch | users.psi -userManagement=true -versionTrackingEnabled=false -versionTrackingLogin={context}/svcusr-hlapp_robot +logLevelConsole=Off +scanStreamerPort=5563 +parallelInitialization=false versionTrackingManual=false +hostName= +userManagement=true +instanceName=Dev +dataServerPort=5573 +hideServerMessages=false +serverPort=8080 +versionTrackingEnabled=true +dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name} +serverEnabled=true +dataScanReleaseRecords=false +depthDimension=0 +dataScanPreserveTypes=true +logLevel=Fine +dataScanFlushRecords=false +logPath={logs}/{date}_{time} +dataLayout=default +generateCommandExecutionEvents=true +terminalEnabled=false +notificationLevel=Off +terminalPort=0 +createSessionFiles=false +versionTrackingLogin={context}/svcusr-hlapp_robot versionTrackingRemote=git@git.psi.ch\:pshell_config/dev.git +dataProvider=h5 +saveCommandStatistics=true diff --git a/config/devices.properties b/config/devices.properties index 79428eb..48d5a03 100755 --- a/config/devices.properties +++ b/config/devices.properties @@ -122,8 +122,8 @@ gamma=ch.psi.pshell.device.DummyMotor||||true eta=ch.psi.pshell.device.DummyMotor||||true chi=ch.psi.pshell.device.DummyMotor||||true phi=ch.psi.pshell.device.DummyMotor||||true -sixc=ch.psi.pshell.device.MotorGroupBase|mu delta gamma eta chi phi||| +#sixc=ch.psi.pshell.device.MotorGroupBase|mu delta gamma eta chi phi||| fivec=ch.psi.pshell.device.MotorGroupBase|delta gamma eta chi phi||| -fourc=ch.psi.pshell.device.MotorGroupBase|delta eta chi phi||| -fourcv=ch.psi.pshell.device.MotorGroupBase|mu delta gamma eta||| +#fourc=ch.psi.pshell.device.MotorGroupBase|delta eta chi phi||| +#fourcv=ch.psi.pshell.device.MotorGroupBase|mu delta gamma eta||| energy=ch.psi.pshell.device.DummyPositioner||||true diff --git a/config/jcae.properties b/config/jcae.properties index a5aef1c..31c923a 100755 --- a/config/jcae.properties +++ b/config/jcae.properties @@ -1,4 +1,4 @@ -#Thu Sep 19 11:25:15 CEST 2019 +#Fri Mar 06 11:41:38 CET 2020 ch.psi.jcae.ContextFactory.maxArrayBytes=10000000 ch.psi.jcae.impl.DefaultChannelService.timeout=500 ch.psi.jcae.ChannelFactory.timeout=200 diff --git a/config/settings.properties b/config/settings.properties index d5b7431..f4f1c95 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,4 +1,4 @@ -#Thu Feb 27 15:51:16 CET 2020 +#Fri Mar 13 14:03:10 CET 2020 test=1 geometry=fourcv ScanIndex=5 diff --git a/config/variables.properties b/config/variables.properties index 58f11bb..6866322 100644 --- a/config/variables.properties +++ b/config/variables.properties @@ -1,2 +1,2 @@ -#Fri Feb 28 09:22:05 CET 2020 -FileSequentialNumber=467 +#Wed Mar 11 11:25:15 CET 2020 +FileSequentialNumber=1407 diff --git a/script/*.scan b/script/*.scan deleted file mode 100644 index 1cca0df..0000000 --- a/script/*.scan +++ /dev/null @@ -1 +0,0 @@ -[ "Time series", [ ], [ [ "CamServer", "http://localhost:8889/simulation_sp1?channel=x_fit_mean", 3, 0.1, null ] ], false, [ ], "", 20, 0.0, 0.1, true, true, true, true, "", "", "Default", "h5", 0, null, null, "Positioner" ] \ No newline at end of file diff --git a/script/local.py b/script/local.py index 054c046..e6dbf8d 100755 --- a/script/local.py +++ b/script/local.py @@ -17,9 +17,9 @@ def on_command_finished(info): ################################################################################################### # Layout setup ################################################################################################### -import ch.psi.pshell.data.LayoutSF as LayoutSF +#import ch.psi.pshell.data.LayoutSF as LayoutSF -LayoutSF.setExperimentArguments([pv, motor, pe, cv, energy, sin]) +#LayoutSF.setExperimentArguments([pv, motor, pe, cv, energy, sin]) @@ -126,8 +126,8 @@ class SimulatedInput(Readable): sout = SimulatedOutput() sinp = SimulatedInput() -for m in mu, delta, gamma, eta, chi, phi: - m.setSpeed(m.config.defaultSpeed) +#for m in mu, delta, gamma, eta, chi, phi: +# m.setSpeed(m.config.defaultSpeed) #Controler Evenrt Listener @@ -808,8 +808,8 @@ def is_geometry_set(): return get_device("wavelength") is not None -mu.moveAsync(0.0) -eta.moveAsync(0.0) -delta.moveAsync(45.0) -gamma.moveAsync(0.0) -energy.write(9.5) \ No newline at end of file +#mu.moveAsync(0.0) +#eta.moveAsync(0.0) +#delta.moveAsync(45.0) +#gamma.moveAsync(0.0) +#energy.write(9.5) \ No newline at end of file diff --git a/script/queues/q1.que b/script/queues/q1.que new file mode 100644 index 0000000..9356394 --- /dev/null +++ b/script/queues/q1.que @@ -0,0 +1 @@ +[ [ [ "Disabled", "test/test.scan", "", "Abort", "" ], [ "File", "test/test2", "\"START\":0,\"STOP\":10, \"STEPS\":10", "Resume", "" ], [ "File", "test/test1.xml", "", "Resume", "" ], [ "File", "test/test1", "", "Resume", "" ], [ "File", "test.scan", "", "Resume", "" ], [ "File", "test/test6", "", "Retry", "" ] ] ] \ No newline at end of file diff --git a/script/queues/q2.que b/script/queues/q2.que new file mode 100644 index 0000000..3e48163 --- /dev/null +++ b/script/queues/q2.que @@ -0,0 +1 @@ +[ [ [ false, "test/test.scan", "", "Abort", "Disabled" ], [ true, "test/test2", "\"START\":0,\"STOP\":10, \"STEPS\":10", "Resume", "Success" ], [ true, "", "print \"HERE\"", "Resume", "Success" ], [ true, "test/test1.xml", "", "Resume", "Success" ], [ true, "test/test1", "", "Resume", "Success" ], [ true, "test.scan", "", "Resume", "Failure" ], [ true, "test/test6", "", "Retry", "Success" ] ] ] \ No newline at end of file diff --git a/script/queues/q3.que b/script/queues/q3.que new file mode 100644 index 0000000..7a8a019 --- /dev/null +++ b/script/queues/q3.que @@ -0,0 +1 @@ +[ [ [ true, "test.test", "", "Resume", "" ] ] ] \ No newline at end of file diff --git a/script/test/dummy.scan b/script/test/dummy.scan new file mode 100644 index 0000000..c56774a --- /dev/null +++ b/script/test/dummy.scan @@ -0,0 +1 @@ +[ "Linear", [ ], [ ], false, [ ], "", 1, 1.0, 0.0, false, false, true, true, "", "", " ", "", 0, null, null, "Positioner", false, true ] \ No newline at end of file diff --git a/script/test/test10.scan b/script/test/test10.scan new file mode 100644 index 0000000..c4c365a --- /dev/null +++ b/script/test/test10.scan @@ -0,0 +1 @@ +[ "Continuous", [ [ "Device", "motor", 0.0, 5.0, 0.1 ] ], [ [ "Device", "sin", 2, 0.1, "Enabled" ] ], false, [ ], "", 2, 0.0, 0.1, false, false, true, true, "", "", "Default", "h5", 0, null, null, "Positioner", false, false ] \ No newline at end of file diff --git a/script/test/test17.xml b/script/test/test17.xml index 60b4e2f..34b92c7 100755 --- a/script/test/test17.xml +++ b/script/test/test17.xml @@ -3,19 +3,33 @@ alexandre.gobbo@psi.ch - - My first test + + My third test 0.0 31.0 - 0.01 + 0.1 + + + + + + + + + - + diff --git a/script/test/test18.xml b/script/test/test18.xml index 03a6ff5..dca6861 100755 --- a/script/test/test18.xml +++ b/script/test/test18.xml @@ -1,22 +1,36 @@ - + + alexandre.gobbo@psi.ch + + + My third test + - - 4 + + 0.0 + 31.0 + 1.0 + + + + + + + - - - 4 - - - - - + + + + - + diff --git a/script/test/test2.py b/script/test/test2.py index f269efa..e182761 100755 --- a/script/test/test2.py +++ b/script/test/test2.py @@ -1,7 +1,9 @@ """ Line Scan with 2 writables and triggering """ - + + + index=0 def BeforeReadout(): @@ -13,5 +15,5 @@ def BeforeReadout(): caput("TESTIOC:TESTBO:MyBO","Off") -a= lscan((inp), (sin,out,arr), 0, 4, 20, 0.1, before_read=BeforeReadout) +a= lscan((inp), (sin,out,arr), START, STOP, STEPS, 0.1, before_read=BeforeReadout) set_exec_pars(then="print 'OK'") \ No newline at end of file diff --git a/script/test/test6.py b/script/test/test6.py index e580ac7..709ccbb 100755 --- a/script/test/test6.py +++ b/script/test/test6.py @@ -24,7 +24,7 @@ class Listener (DeviceListener): sensor=Sensor() positioner=Positioner() listener = Listener() - +sin_val=sin.read() sin.addListener(listener) try: a= lscan((inp,positioner),(sin,sensor),(0,0),(40,10),20,0.1) diff --git a/script/test/test7.xml b/script/test/test7.xml index 962e239..fb10e24 100755 --- a/script/test/test7.xml +++ b/script/test/test7.xml @@ -1,31 +1,31 @@ - alexandre.gobbo@psi.ch + alexandre.gobbo@psi.ch My third test - - + + 0.0 31.0 - 1.0 + 0.1 - + diff --git a/script/test/test9.scan b/script/test/test9.scan index 7606a3b..c56774a 100644 --- a/script/test/test9.scan +++ b/script/test/test9.scan @@ -1 +1 @@ -[ "Time series", [ ], [ [ "Device", "sin", 1, 0, "Enabled" ] ], false, [ ], "", 10, 1.0, 0.1, false, false, true, true, "", "", "", "", 0, null, null, "Positioner", false, true ] \ No newline at end of file +[ "Linear", [ ], [ ], false, [ ], "", 1, 1.0, 0.0, false, false, true, true, "", "", " ", "", 0, null, null, "Positioner", false, true ] \ No newline at end of file diff --git a/script/test2.xml b/script/test2.xml index 5dbb75c..68ba8f6 100644 --- a/script/test2.xml +++ b/script/test2.xml @@ -1,5 +1,5 @@ - +