This commit is contained in:
2025-07-14 17:48:44 +02:00
commit 511f888e98
39 changed files with 1284 additions and 0 deletions

BIN
config/.DS_Store vendored Normal file

Binary file not shown.

78
config/config.properties Normal file
View File

@@ -0,0 +1,78 @@
#Mon Jul 14 17:42:43 CEST 2025
autoSaveScanData=true
dataDepthDimension=0
dataFormat=h5
dataLayout=default
dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name}
dataScanAutoSave=true
dataScanFlushRecords=false
dataScanLazyTableCreation=false
dataScanPreserveTypes=false
dataScanReleaseRecords=false
dataScanSaveLogs=true
dataScanSaveOutput=false
dataScanSaveScript=false
dataScanSaveSetpoints=false
dataScanSaveTimestamps=false
dataScanStreamerPort=-1
dataServerPort=-1
dataTransferMode=Off
dataTransferPath=
dataTransferUser=
depthDimension=0
disableDataFileLogs=false
disableEmbeddedAttributes=false
fdaSerialization=true
filePermissionsConfig=Default
filePermissionsData=Default
filePermissionsLogs=Default
filePermissionsScripts=Default
hideServerMessages=false
hostName=
instanceName=
logDaysToLive=-1
logLevel=Info
logLevelConsole=Off
logPath={logs}/{date}_{time}
noBytecodeFiles=false
notificationLevel=Off
notificationTasks=
notifiedTasks=
parallelInitialization=false
pythonHome=
pythonNoBytecodeFiles=false
saveCommandStatistics=false
saveConsoleSessionFiles=false
scanFlushRecords=false
scanLazyTableCreation=false
scanPreserveTypes=false
scanReleaseRecords=false
scanSaveLogs=true
scanSaveOutput=false
scanSaveScript=false
scanSaveSetpoints=false
scanSaveTimestamps=false
scanStreamerPort=-1
serverCommandsHidden=true
serverEnabled=true
serverHostName=null
serverLight=true
serverPort=8080
sessionHandling=Off
simulation=false
terminalEnabled=false
terminalPort=3579
userAuthenticator=
userManagement=false
versionTrackingEnabled=true
versionTrackingLogin=
versionTrackingManual=false
versionTrackingRemote=
xscanAppendSuffix=true
xscanContinuousUpdate=false
xscanCrlogicAbortable=true
xscanCrlogicChannel=
xscanCrlogicIoc=
xscanCrlogicPrefix=
xscanCrlogicSimulated=false
xscanMoveTimeout=600

View File

@@ -0,0 +1 @@
sin=ch.psi.pshell.epics.ChannelDouble|TESTIOC:TESTSINUS:SinCalc|Read||true

12
config/jcae.properties Normal file
View File

@@ -0,0 +1,12 @@
#Wed Mar 19 11:12:57 CET 2025
ch.psi.jcae.ContextFactory.addressList=localhost\:54321 sls-cagw.psi.ch\:5062
ch.psi.jcae.ContextFactory.serverPort=
ch.psi.jcae.ContextFactory.maxArrayBytes=20000000
ch.psi.jcae.ContextFactory.maxSendArrayBytes=20000000
ch.psi.jcae.ChannelFactory.retries=1
ch.psi.jcae.ChannelFactory.timeout=3000
ch.psi.jcae.impl.DefaultChannelService.retries=1
ch.psi.jcae.impl.DefaultChannelService.timeout=1000
ch.psi.jcae.ContextFactory.autoAddressList=true
ch.psi.jcae.ContextFactory.useShellVariables=false
ch.psi.jcae.ContextFactory.addLocalBroadcastInterfaces=true

9
config/mail.properties Normal file
View File

@@ -0,0 +1,9 @@
#Wed Mar 19 12:00:25 CET 2025
auth=None
from=
host=
port=0
pwd=
smsSuffix=@sms.switch.ch
to=
usr=

View File

@@ -0,0 +1,3 @@
YYY.java=disabled
XXX.java=disabled
Test.java=disabled

132
config/preferences.json Normal file
View File

@@ -0,0 +1,132 @@
{
"fontShellPanel" : {
"name" : "Monospaced",
"style" : 0,
"size" : 13
},
"fontShellCommand" : {
"name" : "SansSerif",
"style" : 0,
"size" : 13
},
"fontOutput" : {
"name" : "Monospaced",
"style" : 0,
"size" : 13
},
"fontEditor" : {
"name" : "Monospaced",
"style" : 0,
"size" : 13
},
"fontPlotLabel" : {
"name" : "SansSerif",
"style" : 0,
"size" : 11
},
"fontPlotTick" : {
"name" : "SansSerif",
"style" : 0,
"size" : 10
},
"fontPlotTitle" : {
"name" : "SansSerif",
"style" : 1,
"size" : 13
},
"fontTerminal" : {
"name" : "Menlo",
"style" : 0,
"size" : 14
},
"tabSize" : 4,
"contentWidth" : 0,
"editorBackground" : null,
"editorForeground" : null,
"simpleEditor" : false,
"hideEditorLineNumbers" : false,
"hideEditorContextMenu" : false,
"consoleLocation" : "Left",
"dataPanelLocation" : "Status",
"openDataFilesInDocTab" : false,
"noVariableEvaluationPropagation" : false,
"processingScripts" : [ ],
"asyncViewersUpdate" : false,
"asyncHistoryPlotsUpdate" : false,
"scanPlotDisabled" : false,
"scanTableDisabled" : false,
"cachedDataPanel" : false,
"dataExtensions" : "h5 xml txt",
"dataSubFiles" : "",
"showEmergencyStop" : false,
"showHomingButtons" : false,
"showJogButtons" : false,
"hideScanPanel" : false,
"hideOutputPanel" : false,
"showXScanFileBrowser" : true,
"showQueueBrowser" : true,
"backgroundRendering" : false,
"showImageStatusBar" : true,
"persistRendererWindows" : true,
"defaultRendererColormap" : "Grayscale",
"linePlot" : "ch.psi.pshell.plot.LinePlotJFree",
"matrixPlot" : "ch.psi.pshell.plot.MatrixPlotJFree",
"surfacePlot" : "null",
"timePlot" : "ch.psi.pshell.plot.TimePlotJFree",
"plotsDetached" : true,
"plotsHidden" : false,
"plotLayout" : "Vertical",
"quality" : "High",
"defaultPlotColormap" : "Temperature",
"markerSize" : 2,
"plotBackground" : null,
"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.MasterPositioner",
"panelClassName" : "ch.psi.pshell.swing.MasterPositionerPanel"
}, {
"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.HistogramGenerator",
"panelClassName" : "ch.psi.pshell.swing.HistogramGeneratorPanel"
}, {
"deviceClassName" : "ch.psi.pshell.bs.Stream",
"panelClassName" : "ch.psi.pshell.swing.StreamPanel"
}, {
"deviceClassName" : "ch.psi.pshell.bs.StreamChannel",
"panelClassName" : "ch.psi.pshell.swing.StreamChannelPanel"
}, {
"deviceClassName" : "ch.psi.pshell.camserver.CamServerStream",
"panelClassName" : "ch.psi.pshell.swing.CamServerStreamPanel"
}, {
"deviceClassName" : "ch.psi.pshell.camserver.CamServerService",
"panelClassName" : "ch.psi.pshell.swing.CamServerServicePanel"
}, {
"deviceClassName" : "ch.psi.pshell.device.ReadonlyRegister",
"panelClassName" : "ch.psi.pshell.swing.DeviceValueChart"
} ]
}

View File

@@ -0,0 +1,4 @@
#Mon Jul 14 17:19:57 CEST 2025
DaySequentialNumber=156
FileSequentialNumber=456
LastRunDate=250714

14
config/xscan.properties Normal file
View File

@@ -0,0 +1,14 @@
#Thu Jun 12 14:01:18 CEST 2025
appendSuffix=true
channelCreationRetries=1
continuousUpdate=false
crlogicAbortable=true
crlogicChannel=
crlogicIoc=
crlogicPrefix=
crlogicSimulated=false
dataFormat=null
dataLayout=null
dataPath=null
fdaSerialization=false
moveTimeout=600

View File

@@ -0,0 +1,25 @@
#Mon May 05 13:14:59 CEST 2025
colormap=Grayscale
colormapAutomatic=false
colormapLogarithmic=false
colormapMax=NaN
colormapMin=NaN
flipHorizontally=false
flipVertically=false
grayscale=false
invert=false
rescaleFactor=1.0
rescaleOffset=0.0
roiHeight=-1
roiWidth=-1
roiX=0
roiY=0
rotation=0.0
rotationCrop=false
scale=1.0
spatialCalOffsetX=NaN
spatialCalOffsetY=NaN
spatialCalScaleX=NaN
spatialCalScaleY=NaN
spatialCalUnits=mm
transpose=false

View File

@@ -0,0 +1,25 @@
#Thu May 08 14:06:17 CEST 2025
colormap=Grayscale
colormapAutomatic=false
colormapLogarithmic=false
colormapMax=NaN
colormapMin=NaN
flipHorizontally=false
flipVertically=false
grayscale=false
invert=false
rescaleFactor=1.0
rescaleOffset=0.0
roiHeight=-1
roiWidth=-1
roiX=0
roiY=0
rotation=0.0
rotationCrop=false
scale=1.0
spatialCalOffsetX=-637.0000131373355
spatialCalOffsetY=-483.0000310340799
spatialCalScaleX=-35.21126791588346
spatialCalScaleY=-48.38709170854271
spatialCalUnits=mm
transpose=false

12
devices/dp1.properties Normal file
View File

@@ -0,0 +1,12 @@
#Tue Mar 18 14:13:39 CET 2025
description=null
motor1=0.0|4.0|8.0|0.0
motor2=0.0|5.0|3.0|NaN
motor3=null
motor4=null
motor5=null
motor6=null
motor7=null
motor8=null
positions=Park|Ready|Out|Clear
precision=-1

17
devices/m1.properties Normal file
View File

@@ -0,0 +1,17 @@
#Tue Mar 18 14:13:39 CET 2025
defaultSpeed=1.0
description=null
estbilizationDelay=0
maxSpeed=10.0
maxValue=10.0
minSpeed=0.1
minValue=-10.0
monitorByPosition=false
offset=0.0
precision=2
resolution=NaN
rotation=false
scale=1.0
sign_bit=0
startRetries=1
unit=mm

17
devices/m2.properties Normal file
View File

@@ -0,0 +1,17 @@
#Tue Mar 18 14:13:39 CET 2025
defaultSpeed=1.0
description=null
estbilizationDelay=0
maxSpeed=10.0
maxValue=10.0
minSpeed=0.1
minValue=-10.0
monitorByPosition=false
offset=0.0
precision=2
resolution=NaN
rotation=false
scale=1.0
sign_bit=0
startRetries=1
unit=mm

11
devices/p1.properties Normal file
View File

@@ -0,0 +1,11 @@
#Tue Mar 18 14:13:39 CET 2025
description=null
maxValue=1000.0
minValue=0.0
offset=0.0
precision=-1
resolution=NaN
rotation=false
scale=1.0
sign_bit=0
unit=mm

25
devices/src1.properties Normal file
View File

@@ -0,0 +1,25 @@
#Tue Mar 18 14:18:08 CET 2025
colormap=Temperature
colormapAutomatic=true
colormapLogarithmic=false
colormapMax=NaN
colormapMin=NaN
flipHorizontally=false
flipVertically=false
grayscale=false
invert=false
rescaleFactor=1.0
rescaleOffset=0.0
roiHeight=-1
roiWidth=-1
roiX=0
roiY=0
rotation=0.0
rotationCrop=false
scale=1.0
spatialCalOffsetX=NaN
spatialCalOffsetY=NaN
spatialCalScaleX=NaN
spatialCalScaleY=NaN
spatialCalUnits=mm
transpose=false

25
devices/src2.properties Normal file
View File

@@ -0,0 +1,25 @@
#Tue Mar 18 14:18:08 CET 2025
colormap=Grayscale
colormapAutomatic=true
colormapLogarithmic=false
colormapMax=NaN
colormapMin=NaN
flipHorizontally=false
flipVertically=false
grayscale=false
invert=false
rescaleFactor=1.0
rescaleOffset=0.0
roiHeight=-1
roiWidth=-1
roiX=0
roiY=0
rotation=0.0
rotationCrop=false
scale=1.0
spatialCalOffsetX=NaN
spatialCalOffsetY=NaN
spatialCalScaleX=NaN
spatialCalScaleY=NaN
spatialCalUnits=mm
transpose=false

BIN
plugins/.DS_Store vendored Normal file

Binary file not shown.

28
plugins/CCC.form Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="449" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="137" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Form>

65
plugins/CCC.java Normal file
View File

@@ -0,0 +1,65 @@
import ch.psi.pshell.framework.Panel;
import ch.psi.pshell.utils.State;
/**
*
*/
public class CCC extends Panel {
public CCC() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 449, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 137, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}

28
plugins/Test.form Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="449" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="137" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Form>

65
plugins/Test.java Normal file
View File

@@ -0,0 +1,65 @@
import ch.psi.pshell.framework.Panel;
import ch.psi.pshell.utils.State;
/**
*
*/
public class Test extends Panel {
public Test() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 449, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 137, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}

58
plugins/XXX.form Normal file
View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="renderer1" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="81" max="-2" attributes="0"/>
<Component id="deviceValuePanel1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
<Component id="deviceValuePanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="57" max="32767" attributes="0"/>
<Component id="renderer1" min="-2" pref="179" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel1">
<Properties>
<Property name="deviceName" type="java.lang.String" value="sin"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.imaging.Renderer" name="renderer1">
<Properties>
<Property name="deviceName" type="java.lang.String" value="src1"/>
</Properties>
</Component>
</SubComponents>
</Form>

88
plugins/XXX.java Normal file
View File

@@ -0,0 +1,88 @@
import ch.psi.pshell.framework.Panel;
import ch.psi.pshell.utils.State;
/**
*
*/
public class XXX extends Panel {
public XXX() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
deviceValuePanel1 = new ch.psi.pshell.swing.DeviceValuePanel();
renderer1 = new ch.psi.pshell.imaging.Renderer();
deviceValuePanel1.setDeviceName("sin");
renderer1.setDeviceName("src1");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(renderer1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(81, 81, 81)
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 57, Short.MAX_VALUE)
.addComponent(renderer1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(34, 34, 34))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel1;
private ch.psi.pshell.imaging.Renderer renderer1;
// End of variables declaration//GEN-END:variables
}

28
plugins/YYY.form Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="449" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="137" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Form>

65
plugins/YYY.java Normal file
View File

@@ -0,0 +1,65 @@
import ch.psi.pshell.framework.Panel;
import ch.psi.pshell.utils.State;
/**
*
*/
public class YYY extends Panel {
public YYY() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 449, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 137, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}

28
plugins/ZZZ.form Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="449" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="137" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Form>

65
plugins/ZZZ.java Normal file
View File

@@ -0,0 +1,65 @@
import ch.psi.pshell.framework.Panel;
import ch.psi.pshell.utils.State;
/**
*
*/
public class ZZZ extends Panel {
public ZZZ() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 449, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 137, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}

BIN
script/.DS_Store vendored Normal file

Binary file not shown.

47
script/listener.py Normal file
View File

@@ -0,0 +1,47 @@
"""
Create a device listener to interrupt the scan
"""
import java.lang.InterruptedException
class ListenerAO (ch.psi.pshell.device.DeviceListener):
def onStateChanged(self, device, state, former):
pass
def onValueChanged(self, device, value, former):
pass
def onValueChanging(self, device, value, former):
pass
#Create a listener to the sensor, verifying the readback values.
class ListenerAI (DeviceListener):
def onValueChanged(self, device, value, former):
if value > 1.02:
print "Value over limit-> aborting"
abort()
listenerAI = ListenerAI()
ai1.addListener(listenerAI)
#Create a listener to the positioner checking the setpoint before each command is sent.
class ListenerAO (DeviceListener):
def onStateChanged(self, device, state, former):
pass
def onValueChanged(self, device, value, former):
print "Moved to: " + str(value)
def onValueChanging(self, device, value, former):
if value > 20:
#Vetoing the change will abort the scan
raise Exception("Forbidden move to " + str(value))
print "Moving to: " + str(value) + " ... " ,
listenerAO = ListenerAO()
ao1.addListener(listenerAO)
try:
lscan(ao1, (ai1), 0, 40, 200, 0.01)
except java.lang.InterruptedException:
print "Aborted"
finally:
ai1.removeListener(listenerAI)
ao1.removeListener(listenerAO)

3
script/local.groovy Normal file
View File

@@ -0,0 +1,3 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// Deployment specific global definitions - executed after startup.groovy
///////////////////////////////////////////////////////////////////////////////////////////////////

4
script/local.js Normal file
View File

@@ -0,0 +1,4 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// Deployment specific global definitions - executed after startup.js
///////////////////////////////////////////////////////////////////////////////////////////////////

190
script/local.py Normal file
View File

@@ -0,0 +1,190 @@
###################################################################################################
# Deployment specific global definitions - executed after startup.py
###################################################################################################
import random
####################################################################################################
# Simulated Devices
####################################################################################################
class AnalogOutput(RegisterBase):
def doRead(self):
return self.val if hasattr(self, 'val') else 0.0
def doWrite(self, val):
self.val = val
class AnalogInput(ReadonlyRegisterBase):
def doRead(self):
time.sleep(0.001)
self.val = to_array(self.calc(), 'd')
return self.val
class Waveform(ReadonlyRegisterBase, ReadonlyRegisterArray):
def doRead(self):
time.sleep(0.001)
self.val = to_array(self.calc(), 'd')
return self.val
class Image(ReadonlyRegisterBase, ReadonlyRegisterMatrix):
def doRead(self):
time.sleep(0.001)
self.val = to_array(self.calc(), 'd')
return self.val
def getWidth(self):
return len(self.take(-1)[0])
def getHeight(self):
return len(self.take(-1))
class Random(AnalogInput):
def calc(self):
return random.random()
class SinusoidSample(AnalogInput):
def calc(self):
self.x = self.x + 0.1 if hasattr(self, 'x') else 0.0
noise = (random.random() - 0.5) / 10.0
return math.sin(self.x) + noise
class SinusoidTime(AnalogInput):
def calc(self):
noise = (random.random() - 0.5) / 10.0
return math.sin(time.time()) + noise
class SinusoidWaveform(Waveform):
def calc(self):
ret = []
x = random.random()
for i in range (20):
ret.append(math.sin(x))
x = x + 0.1
return ret
class SinusoidImage(Image):
def calc(self):
(width, height) = (200, 100)
ret = []
x = random.random();
base = []
for i in range (width):
base.append( math.sin(x))
x = x + 0.05
for i in range (height):
noise = (random.random() - 0.5)/5.0
ret.append([x+noise for x in base])
return ret
#Defintion
add_device(DummyMotor("m1"), True)
add_device(DummyMotor("m2"), True)
add_device(DummyRegister("reg1",3), True)
add_device(AnalogOutput("ao1"), True)
add_device(AnalogOutput("ao2"), True)
add_device(SinusoidSample("ai1"), True)
add_device(SinusoidTime("ai2"), True)
add_device(Random("ai3"), True)
add_device(SinusoidWaveform("wf1"), True)
add_device(SinusoidImage("im1"), True)
add_device(DummyPositioner("p1"),True)
add_device(MotorGroupBase("mg1", m1, m2), True)
add_device(MotorGroupDiscretePositioner("dp1", mg1), True)
#Initial Configuration
if p1.config.unit is None:
p1.config.minValue = 0.0 #Not persisted
p1.config.maxValue = 1000.0
p1.config.unit = "mm"
p1.config.save()
p1.initialize()
if dp1.config.positions is None:
dp1.config.positions = ["Park","Ready","Out","Clear"]
dp1.config.motor1 = ["0.0","4.0","8.0" ,"0.0"]
dp1.config.motor2 = ["0.0","5.0","3.0" ,"NaN"]
dp1.config.save()
dp1.initialize()
#Update
m1.setMonitored(True)
m2.setMonitored(True)
####################################################################################################
# Simple Readable / Writable objects can be created and used in scans
####################################################################################################
class WritableScalar(Writable):
def write(self, value):
pass
class ReadableScalar(Readable):
def read(self):
return random.random()
class ReadableWaveform(ReadableArray):
def getSize(self):
return 20
def read(self):
ret = []
for i in range (self.getSize()):
ret.append(random.random())
return ret
class ReadableImage(ReadableMatrix):
def read(self):
ret = []
for i in range (self.getHeight()):
ret.append([random.random()] * self.getWidth())
return to_array(ret, 'd')
def getWidth(self):
return 80
def getHeight(self):
return 40
ws1 = WritableScalar()
rs1 = ReadableScalar()
rw1 = ReadableWaveform()
ri1 = ReadableImage()
####################################################################################################
# Imaging
####################################################################################################
configured = os.path.exists(Device.getConfigFileName("src1"))
add_device(RegisterMatrixSource("src1", im1), True)
add_device(RegisterMatrixSource("src2", ri1), True)
src1.polling = 100
src2.polling = 100
#Some configuration for so the imaging will work out of the box
if not configured:
src1.config.colormapAutomatic = True
src1.config.colormap = Colormap.Temperature
src1.config.save()
src2.config.colormapAutomatic = True
src2.config.save()

2
script/methood.py Normal file
View File

@@ -0,0 +1,2 @@
def test():
pass

14
script/test.py Normal file
View File

@@ -0,0 +1,14 @@
###################################################################################################
# Demonstrate the use of Line Scan: one or multiple positioners move together linearly.
###################################################################################################
#Execute the scan: 100 steps, a1 from 0 to 40
r1 = lscan(ao1, (ai1,ai2,wf1), 0, 40, 100, 0.01)
#Steps of size 1.0, a1 from 0 to 40
r2 = lscan(ao1, (ai1,ai2,wf1), 0, 40, 1.0, 0.01)
#2 positioners moving together in 10 steps. Also sampling an image:
r3 = lscan((ao1,ao2), (ai1,ai2,wf1,im1), (0, 0), (40, 100), 4, 0.01)

29
script/test.xml Normal file
View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
<notification>
<recipient>alexandre.gobbo@psi.ch</recipient>
</notification>
<data fileName="test8"/>
<description>My first test</description>
<variable name="var1" value="0.0"/>
<scan>
<dimension>
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinearPositioner" name="TESTIOC:TESTCALCOUT:Input" id="id278043">
<start>0.0</start>
<end>31.0</end>
<stepSize>1.0</stepSize>
</positioner>
<action xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptAction">
<script>import time
def process():
time.sleep(0.1)</script>
</action>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="TESTIOC:TESTCALCOUT:Output" id="id348623"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="TESTIOC:TESTSINUS:SinCalc" id="id367393"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayDetector" arraySize="10" name="TESTIOC:TESTWF2:MyWF" id="id980818"/>
</dimension>
</scan>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id278043" y="id348623 id367393"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MatrixPlotArray" y="id278043" z="id980818" type="2D"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlotArray" y="id980818" maxSeries="2" offset="3" size="5"/>
</configuration>

11
script/test2.py Normal file
View File

@@ -0,0 +1,11 @@
###################################################################################################
# Demonstrate the use of Line Scan: one or multiple positioners move together linearly.
###################################################################################################
#Execute the scan: 100 steps, a1 from 0 to 40
r1 = lscan(ao1, (ai1,ai2), 0, 40, 100, 0.01)
r2 = lscan(ao1, (ai1,ai2), 0, 40, 100, 0.01)

27
script/test2.xml Normal file
View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
<notification>
<recipient>alexandre.gobbo@psi.ch</recipient>
</notification>
<data fileName="test2"/>
<description>My first test</description>
<variable name="var1" value="0.0"/>
<scan>
<dimension>
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinearPositioner" name="TESTIOC:TESTCALCOUT:Input" id="id278043">
<start>0.0</start>
<end>31.0</end>
<stepSize>1.0</stepSize>
</positioner>
<action xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptAction">
<script>import time
def process():
time.sleep(0.1)</script>
</action>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="TESTIOC:TESTCALCOUT:Output" id="id348623"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="TESTIOC:TESTSINUS:SinCalc" id="id367393"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayDetector" arraySize="10" name="TESTIOC:TESTWF2:MyWF" id="id980818"/>
</dimension>
</scan>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id278043" y="id348623 id367393"/>
</configuration>

29
script/test8.xml Executable file
View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" numberOfExecution="1" failOnSensorError="true">
<notification>
<recipient>alexandre.gobbo@psi.ch</recipient>
</notification>
<data fileName="test8"/>
<description>My first test</description>
<variable name="var1" value="0.0"/>
<scan>
<dimension>
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinearPositioner" name="TESTIOC:TESTCALCOUT:Input" id="id278043">
<start>0.0</start>
<end>31.0</end>
<stepSize>1.0</stepSize>
</positioner>
<action xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScriptAction">
<script>import time
def process():
time.sleep(0.1)</script>
</action>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="TESTIOC:TESTCALCOUT:Output" id="id348623"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ScalarDetector" name="TESTIOC:TESTSINUS:SinCalc" id="id367393"/>
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ArrayDetector" arraySize="10" name="TESTIOC:TESTWF2:MyWF" id="id980818"/>
</dimension>
</scan>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id278043" y="id348623 id367393"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MatrixPlotArray" y="id278043" z="id980818" type="2D"/>
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlotArray" y="id980818" maxSeries="2" offset="3" size="5"/>
</configuration>