From 20496ec4a86c1739f26600e8c563194be75d3ce8 Mon Sep 17 00:00:00 2001 From: gac-x07mb Date: Mon, 8 Aug 2022 11:17:33 +0200 Subject: [PATCH] --- config/config.properties | 45 ++++---- config/plugins.properties | 1 + config/preferences.json | 117 ++++++++++++++++++++ config/setup.properties | 20 ++-- config/variables.properties | 4 +- devices/ROT.properties | 25 +++-- devices/ScanX.properties | 25 +++-- devices/ScanY.properties | 25 +++-- devices/TRSCANH.properties | 25 +++-- plugins/PersonalizedTheme.java | 10 +- script/Users/CopyFromXtreme/local_xtreme.py | 6 - script/local.py | 7 -- script/test/DemoStartFDA.py | 2 +- 13 files changed, 210 insertions(+), 102 deletions(-) create mode 100644 config/preferences.json diff --git a/config/config.properties b/config/config.properties index f600c71..af43ed6 100644 --- a/config/config.properties +++ b/config/config.properties @@ -1,54 +1,55 @@ -#Fri Mar 04 14:44:43 CET 2022 +#Mon Aug 08 10:04:55 CEST 2022 autoSaveScanData=true simulation=false +commandExecutionEvents=false +logDaysToLive=30 dataScanSaveOutput=false userAuthenticator= +logLevelConsole=Off +filePermissionsConfig=Default +scanStreamerPort=-1 dataScanSaveScript=false +dataScanSaveSetpoints=false notifiedTasks=null parallelInitialization=false +fdaSerialization=true dataTransferPath=null scanStreamingPort=-1 saveConsoleSessionFiles=false devicePoolFile={config}/devices.properties +versionTrackingManual=true +dataTransferMode=Off hostName=null +userManagement=false disableEmbeddedAttributes=false +instanceName= +dataServerPort=-1 serverPort=8080 +hideServerMessages=false versionTrackingEnabled=true dataPath={data}/{year}/{month}/{day}/{year}_{month}{day}_{time}_{name} serverEnabled=true depthDimension=0 +dataScanReleaseRecords=true +dataScanPreserveTypes=true logLevel=Info +dataScanFlushRecords=true +logPath={logs}/{date}_{time} +filePermissionsLogs=Default dataLayout=fda disableDataFileLogs=false sessionHandling=Off deviceUpdateStrategyFile={config}/update.properties terminalEnabled=false notificationLevel=Off +filePermissionsScripts=Default terminalPort=3579 +tasksFile={config}/tasks.properties dataTransferUser=null +filePermissionsData=Default +createSessionFiles=false versionTrackingLogin={context}/svcusr-hlapp_robot noBytecodeFiles=false versionTrackingRemote=git@git.psi.ch\:pshell_config/x07mb.git -commandExecutionEvents=false -logDaysToLive=30 -logLevelConsole=Off -filePermissionsConfig=Default -scanStreamerPort=-1 -dataScanSaveSetpoints=false -versionTrackingManual=true -dataTransferMode=Off -userManagement=false -instanceName= -dataServerPort=-1 -hideServerMessages=false -dataScanReleaseRecords=true -dataScanPreserveTypes=true -dataScanFlushRecords=true -logPath={logs}/{date}_{time} -filePermissionsLogs=Default -filePermissionsScripts=Default -tasksFile={config}/tasks.properties -filePermissionsData=Default -createSessionFiles=false dataProvider=fda saveCommandStatistics=false diff --git a/config/plugins.properties b/config/plugins.properties index 832fff6..4ec08ec 100644 --- a/config/plugins.properties +++ b/config/plugins.properties @@ -1 +1,2 @@ +EnergyScan.java=disabled PersonalizedTheme.java=enabled diff --git a/config/preferences.json b/config/preferences.json new file mode 100644 index 0000000..8d9caf4 --- /dev/null +++ b/config/preferences.json @@ -0,0 +1,117 @@ +{ + "fontShellPanel" : { + "name" : "Monospaced", + "style" : 1, + "size" : 19 + }, + "fontShellCommand" : { + "name" : "SansSerif", + "style" : 1, + "size" : 19 + }, + "fontOutput" : { + "name" : "Monospaced", + "style" : 1, + "size" : 20 + }, + "fontEditor" : { + "name" : "Monospaced", + "style" : 1, + "size" : 19 + }, + "fontPlotLabel" : { + "name" : "SansSerif", + "style" : 0, + "size" : 15 + }, + "fontPlotTick" : { + "name" : "SansSerif", + "style" : 0, + "size" : 15 + }, + "fontPlotTitle" : { + "name" : "SansSerif", + "style" : 1, + "size" : 18 + }, + "fontTerminal" : { + "name" : "Monospaced", + "style" : 0, + "size" : 15 + }, + "tabSize" : 4, + "contentWidth" : 0, + "editorBackground" : -16777216, + "editorForeground" : -1, + "simpleEditor" : false, + "hideEditorLineNumbers" : false, + "hideEditorContextMenu" : false, + "consoleLocation" : "Left", + "dataPanelLocation" : null, + "openDataFilesInDocTab" : false, + "noVariableEvaluationPropagation" : false, + "processingScripts" : [ ], + "asyncViewersUpdate" : false, + "scanPlotDisabled" : false, + "scanTableDisabled" : false, + "cachedDataPanel" : false, + "dataExtensions" : "", + "dataSubFiles" : "", + "hideFileName" : false, + "showEmergencyStop" : false, + "showHomingButtons" : false, + "showJogButtons" : false, + "hideScanPanel" : false, + "hideOutputPanel" : false, + "showXScanFileBrowser" : true, + "showQueueBrowser" : false, + "backgroundRendering" : false, + "showImageStatusBar" : true, + "persistRendererWindows" : false, + "defaultRendererColormap" : "Grayscale", + "linePlot" : "ch.psi.pshell.plot.LinePlotJFree", + "matrixPlot" : "ch.psi.pshell.plot.MatrixPlotJFree", + "surfacePlot" : "null", + "timePlot" : "ch.psi.pshell.plot.TimePlotJFree", + "plotsDetached" : false, + "plotLayout" : "Grid", + "quality" : "High", + "defaultPlotColormap" : "Temperature", + "markerSize" : 2, + "plotBackground" : -16777216, + "gridColor" : null, + "outlineColor" : null, + "disableOffscreenBuffer" : false, + "defaultPanels" : [ { + "deviceClassName" : "ch.psi.pshell.epics.Scaler", + "panelClassName" : "ch.psi.pshell.swing.ScalerPanel" + }, { + "deviceClassName" : "ch.psi.pshell.epics.Scienta", + "panelClassName" : "ch.psi.pshell.swing.ScientaPanel" + }, { + "deviceClassName" : "ch.psi.pshell.device.Motor", + "panelClassName" : "ch.psi.pshell.swing.MotorPanel" + }, { + "deviceClassName" : "ch.psi.pshell.device.ProcessVariable", + "panelClassName" : "ch.psi.pshell.swing.ProcessVariablePanel" + }, { + "deviceClassName" : "ch.psi.pshell.device.MotorGroup", + "panelClassName" : "ch.psi.pshell.swing.MotorGroupPanel" + }, { + "deviceClassName" : "ch.psi.pshell.device.DiscretePositioner", + "panelClassName" : "ch.psi.pshell.swing.DiscretePositionerPanel" + }, { + "deviceClassName" : "ch.psi.pshell.device.Camera", + "panelClassName" : "ch.psi.pshell.swing.CameraPanel" + }, { + "deviceClassName" : "ch.psi.pshell.device.Slit", + "panelClassName" : "ch.psi.pshell.swing.SlitPanel" + }, { + "deviceClassName" : "ch.psi.pshell.device.ReadonlyRegister$ReadonlyRegisterArray", + "panelClassName" : "ch.psi.pshell.swing.DeviceValueChart" + }, { + "deviceClassName" : "ch.psi.pshell.device.ReadonlyRegister$ReadonlyRegisterMatrix", + "panelClassName" : "ch.psi.pshell.swing.DeviceValueChart" + } ], + "scriptPopupDialog" : "Exception" +} \ No newline at end of file diff --git a/config/setup.properties b/config/setup.properties index 4d01278..6ec577d 100644 --- a/config/setup.properties +++ b/config/setup.properties @@ -1,23 +1,25 @@ -#Wed May 19 14:35:09 CEST 2021 +#Mon Aug 08 10:04:22 CEST 2022 scriptPath={home}/script sessionsPath={outp}/sessions -pluginsPath={home}/plugins configFileDevices={config}/devices.properties -consoleSessionsPath={sessions}/console -libraryPath={script}; {script}/Lib -configFilePlugins={config}/plugins.properties -contextPath={outp}/context +xscanPath=~/operation/fda/scans +queuePath={script} extensionsPath={home}/extensions configPath={home}/config configFileSessions={config}/sessions.properties userSessionsPath={sessions}/user dataPath={outp}/data -devicesPath={home}/devices configFileVariables={config}/variables.properties -configFileSettings={config}/settings.properties logPath={outp}/log wwwPath={home}/www configFile={config}/config.properties +configFileTasks={config}/tasks.properties +pluginsPath={home}/plugins +consoleSessionsPath={sessions}/console +libraryPath={script}; {script}/Lib +configFilePlugins={config}/plugins.properties +contextPath={outp}/context +devicesPath={home}/devices +configFileSettings={config}/settings.properties imagesPath={outp}/images scriptType=py -configFileTasks={config}/tasks.properties diff --git a/config/variables.properties b/config/variables.properties index b232f2b..b219414 100644 --- a/config/variables.properties +++ b/config/variables.properties @@ -1,4 +1,4 @@ -#Sat Apr 09 07:19:57 CEST 2022 +#Mon Aug 08 10:05:00 CEST 2022 LastRunDate=220409 FileSequentialNumber=2614 -DaySequentialNumber=114 +DaySequentialNumber=0 diff --git a/devices/ROT.properties b/devices/ROT.properties index b9af399..6261639 100644 --- a/devices/ROT.properties +++ b/devices/ROT.properties @@ -1,18 +1,19 @@ -#Thu Sep 19 10:34:01 CEST 2019 -defaultSpeed=1.5 -estbilizationDelay=0 -hasEnable=false -homingType=None -maxSpeed=NaN -maxValue=95.5 -minSpeed=0.75 -minValue=-41.0 -monitorByPosition=false +#Mon Aug 08 10:04:23 CEST 2022 offset=0.0 +maxValue=95.5 precision=6 -resolution=0.002 rotation=false scale=1.0 -sign_bit=0 +description=null +estbilizationDelay=0 +maxSpeed=NaN +resolution=0.002 +homingType=None startRetries=1 +minValue=-41.0 unit=deg +defaultSpeed=1.5 +hasEnable=false +sign_bit=0 +monitorByPosition=false +minSpeed=0.75 diff --git a/devices/ScanX.properties b/devices/ScanX.properties index c1ca55d..b8a5299 100644 --- a/devices/ScanX.properties +++ b/devices/ScanX.properties @@ -1,18 +1,19 @@ -#Thu Sep 19 10:34:01 CEST 2019 -defaultSpeed=1.0 -estbilizationDelay=0 -hasEnable=false -homingType=None -maxSpeed=NaN -maxValue=30.0 -minSpeed=0.001 -minValue=-32.0 -monitorByPosition=false +#Mon Aug 08 10:04:23 CEST 2022 offset=0.0 +maxValue=30.0 precision=6 -resolution=0.001 rotation=false scale=1.0 -sign_bit=0 +description=null +estbilizationDelay=0 +maxSpeed=NaN +resolution=0.001 +homingType=None startRetries=1 +minValue=-32.0 unit=mm +defaultSpeed=1.0 +hasEnable=false +sign_bit=0 +monitorByPosition=false +minSpeed=0.001 diff --git a/devices/ScanY.properties b/devices/ScanY.properties index 9b940fa..fc00051 100644 --- a/devices/ScanY.properties +++ b/devices/ScanY.properties @@ -1,18 +1,19 @@ -#Thu Sep 19 10:34:01 CEST 2019 -defaultSpeed=0.5 -estbilizationDelay=0 -hasEnable=false -homingType=None -maxSpeed=NaN -maxValue=1.6999999999999993 -minSpeed=1.0E-4 -minValue=-23.3 -monitorByPosition=false +#Mon Aug 08 10:04:23 CEST 2022 offset=0.0 +maxValue=1.6999999999999993 precision=6 -resolution=0.2 rotation=false scale=1.0 -sign_bit=0 +description=null +estbilizationDelay=0 +maxSpeed=NaN +resolution=0.2 +homingType=None startRetries=1 +minValue=-23.3 unit=mm +defaultSpeed=0.5 +hasEnable=false +sign_bit=0 +monitorByPosition=false +minSpeed=1.0E-4 diff --git a/devices/TRSCANH.properties b/devices/TRSCANH.properties index 4f3df64..5dd484a 100644 --- a/devices/TRSCANH.properties +++ b/devices/TRSCANH.properties @@ -1,18 +1,19 @@ -#Thu Sep 19 10:34:01 CEST 2019 -defaultSpeed=0.4 -estbilizationDelay=0 -hasEnable=false -homingType=None -maxSpeed=NaN -maxValue=22.0 -minSpeed=0.001 -minValue=-17.0 -monitorByPosition=false +#Mon Aug 08 10:04:23 CEST 2022 offset=0.0 +maxValue=22.0 precision=8 -resolution=0.01 rotation=false scale=1.0 -sign_bit=0 +description=null +estbilizationDelay=0 +maxSpeed=NaN +resolution=0.01 +homingType=None startRetries=1 +minValue=-17.0 unit=mm +defaultSpeed=0.4 +hasEnable=false +sign_bit=0 +monitorByPosition=false +minSpeed=0.001 diff --git a/plugins/PersonalizedTheme.java b/plugins/PersonalizedTheme.java index c32c20d..f987aeb 100644 --- a/plugins/PersonalizedTheme.java +++ b/plugins/PersonalizedTheme.java @@ -12,8 +12,7 @@ public class PersonalizedTheme implements Plugin { @Override public void onStart() { try { - Font font = new Font("Verdana", Font.PLAIN, 16); - UIManager.put("Button.font", font); + Font font = new Font("Verdana", Font.PLAIN, 18); UIManager.put("ToggleButton.font", font); UIManager.put("RadioButton.font", font); UIManager.put("CheckBox.font", font); @@ -48,11 +47,8 @@ public class PersonalizedTheme implements Plugin { SwingUtils.updateAllFrames(); - SwingUtils.invokeDelayed( ()->{ - Preferences preferences = getView().getPreferences(); - for (ScriptEditor editor : getView().getEditors()){ - editor.setTextPaneFont(preferences.fontEditor); - } + SwingUtils.invokeDelayed( ()->{ + getView().restorePreferences(); }, 250); } catch (Exception ex) { diff --git a/script/Users/CopyFromXtreme/local_xtreme.py b/script/Users/CopyFromXtreme/local_xtreme.py index 1aeda51..e4787c3 100644 --- a/script/Users/CopyFromXtreme/local_xtreme.py +++ b/script/Users/CopyFromXtreme/local_xtreme.py @@ -107,12 +107,6 @@ set_device_alias(temperature.readback, "temperature_readback") # Utilities ################################################################################################### -def run_fda(file_name, arguments={}): - """ - Run FDA loop - """ - ProcessorFDA().execute(file_name,arguments) - run ("Accumulator") diff --git a/script/local.py b/script/local.py index 9e5a405..2f1d8b5 100644 --- a/script/local.py +++ b/script/local.py @@ -2,7 +2,6 @@ # Deployment specific global definitions - executed after startup.py ################################################################################################### -import ch.psi.fda.ProcessorFDA as ProcessorFDA import ntpath @@ -146,12 +145,6 @@ dev=ChannelDouble('Example','X07MB-ES-MA1:TRZ1.RBV') dev.monitored=True add_device(dev, True) -#Utilities -def run_fda(file_name, arguments={}): - """ - Run FDA loop - """ - ProcessorFDA().execute(file_name,arguments) def otf(start, end, duration, delay=0.0, mode = None, offset = None, alpha = None, name = None): diff --git a/script/test/DemoStartFDA.py b/script/test/DemoStartFDA.py index ffeeb96..24d5d3a 100644 --- a/script/test/DemoStartFDA.py +++ b/script/test/DemoStartFDA.py @@ -1,4 +1,4 @@ -run_fda( "users/0_Translate_to_PSHELL/Mono_pitch.xml", +xscan( "users/0_Translate_to_PSHELL/Mono_pitch.xml", {"Pitch.Start" : -10600.0, "Pitch.End" : -10700.0}) \ No newline at end of file