Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b847293dc |
21
.gitignore
vendored
21
.gitignore
vendored
@@ -1,14 +1,9 @@
|
|||||||
/*
|
/data
|
||||||
!/script
|
/sessions
|
||||||
!/plugins
|
/context
|
||||||
!/devices
|
/log
|
||||||
!/config
|
/plugins
|
||||||
|
/extensions
|
||||||
|
script/cachedir
|
||||||
script/Lib
|
script/Lib
|
||||||
script/**/cachedir
|
script/*.class
|
||||||
script/**/*.class
|
|
||||||
script/**/*.pyc
|
|
||||||
script/**/*.*~
|
|
||||||
plugins/*.class
|
|
||||||
plugins/**/*.*~
|
|
||||||
config/**/*.*~
|
|
||||||
devices/**/*.*~
|
|
||||||
|
|||||||
@@ -1,28 +1,19 @@
|
|||||||
#Tue Sep 01 09:37:24 CEST 2015
|
#Fri Mar 27 10:38:34 CET 2015
|
||||||
autoSaveScanData=true
|
dataFile={data}/{year}_{month}/{date}/{date}_{time}_{context}
|
||||||
createSessionFiles=false
|
|
||||||
dataFilesCreation=true
|
dataFilesCreation=true
|
||||||
dataPath={data}/{year}_{month}/{date}/{date}_{time}_{exec}
|
|
||||||
dataProvider=default
|
|
||||||
dataScanFlushRecords=false
|
|
||||||
dataScanStrategy=default
|
|
||||||
devicePoolFile={config}/devices.properties
|
devicePoolFile={config}/devices.properties
|
||||||
deviceUpdateStrategyFile={config}/update.properties
|
deviceUpdateStrategyFile={config}/update.properties
|
||||||
imageSourcesFile={config}/imaging.properties
|
imageSourcesFile={config}/imaging.properties
|
||||||
logDaysToLive=-1
|
logDaysToLive=-1
|
||||||
logLevel=Fine
|
logLevel=Fine
|
||||||
logLevelConsole=Off
|
logLevelConsole=Off
|
||||||
logPath={logs}/{date}_{time}
|
|
||||||
scriptType=py
|
scriptType=py
|
||||||
serverEnabled=true
|
serverEnabled=false
|
||||||
serverPort=8085
|
serverPort=8080
|
||||||
simulation=false
|
simulation=false
|
||||||
tasksFile={config}/tasks.properties
|
tasksFile={config}/tasks.properties
|
||||||
terminalEnabled=false
|
terminalEnabled=false
|
||||||
terminalPort=3579
|
terminalPort=3579
|
||||||
userAuthenticator=
|
|
||||||
userManagement=false
|
|
||||||
versionTrackingEnabled=true
|
versionTrackingEnabled=true
|
||||||
versionTrackingLogin={config}/agkey
|
versionTrackingLogin=
|
||||||
versionTrackingManual=false
|
versionTrackingRemote=
|
||||||
versionTrackingRemote=ssh\://git@github.psi.ch\:7999/psd/x10sa.git
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
#Wed Jul 29 14:45:52 CEST 2015
|
|
||||||
autoSaveScanData=true
|
|
||||||
createSessionFiles=false
|
|
||||||
dataFile={data}/{year}_{month}/{date}/{date}_{time}_{context}
|
|
||||||
dataFilesCreation=true
|
|
||||||
dataPath={data}/{year}_{month}/{date}/{date}_{time}_{context}
|
|
||||||
dataProvider=default
|
|
||||||
dataScanFlushRecords=false
|
|
||||||
dataScanStrategy=default
|
|
||||||
devicePoolFile={config}/devices.properties
|
|
||||||
deviceUpdateStrategyFile={config}/update.properties
|
|
||||||
imageSourcesFile={config}/imaging.properties
|
|
||||||
logDaysToLive=-1
|
|
||||||
logLevel=Fine
|
|
||||||
logLevelConsole=Off
|
|
||||||
scriptType=py
|
|
||||||
serverEnabled=true
|
|
||||||
serverPort=8085
|
|
||||||
simulation=false
|
|
||||||
tasksFile={config}/tasks.properties
|
|
||||||
terminalEnabled=false
|
|
||||||
terminalPort=3579
|
|
||||||
userAuthenticator=
|
|
||||||
userManagement=false
|
|
||||||
versionTrackingEnabled=true
|
|
||||||
versionTrackingLogin={config}/agkey
|
|
||||||
versionTrackingRemote=ssh\://git@github.psi.ch\:7999/psd/x10sa.git
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
diode=ch.psi.pshell.epics.ChannelDouble|X10SA-ES-KBOX_K:READOUT 6|Read||true
|
|
||||||
$shutter=ch.psi.pshell.epics.ChannelInteger|X10SA-ES-PH1:SET|||true
|
|
||||||
omega=ch.psi.pshell.epics.Positioner|X10SA-ES-DF1:OMEGA-VAL X10SA-ES-DF1:OMEGA-RBV|||true
|
|
||||||
x=ch.psi.pshell.epics.Positioner|X10SA-ES-DF1:GMX-VAL X10SA-ES-DF1:GMX-RBV|||true
|
|
||||||
cy=ch.psi.pshell.epics.Motor|X10SA-ES-DFS:TRY1|||true
|
|
||||||
cz=ch.psi.pshell.epics.Motor|X10SA-ES-DFS:TRZ1|||true
|
|
||||||
apertureX=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRX1|||true
|
|
||||||
apertureY=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRY1|||true
|
|
||||||
beamstopX=ch.psi.pshell.epics.Motor|X10SA-ES-BS:TRX1|||true
|
|
||||||
beamstopY=ch.psi.pshell.epics.Motor|X10SA-ES-BS:TRY1|||true
|
|
||||||
beamstopZ=ch.psi.pshell.epics.Motor|X10SA-ES-BS:TRZ1|||true
|
|
||||||
collimatorX=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRX2|||true
|
|
||||||
collimatorY=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRY2|||true
|
|
||||||
scintillatorY=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRY3|||true
|
|
||||||
scintillatorZ=ch.psi.pshell.epics.Positioner|X10SA-ES-SCINTI:SET-FOCUS X10SA-ES-SCINTI:GET-FOCUS|||true
|
|
||||||
detectorZ=ch.psi.pshell.epics.Motor|X10SA-ES-D:TRZ1|||true
|
|
||||||
detectorY=ch.psi.pshell.epics.Motor|X10SA-ES-D:TRY1|||true
|
|
||||||
#apertureTable=ch.psi.pshell.device.MotorGroupBase|apertureX apertureY|||
|
|
||||||
beamstopTable=ch.psi.pshell.device.MotorGroupBase|beamstopX beamstopY beamstopZ|||
|
|
||||||
#collimatorTable=ch.psi.pshell.device.MotorGroupBase|collimatorX collimatorY|||
|
|
||||||
collimator=ch.psi.pshell.device.MotorGroupDiscretePositioner|collimatorX collimatorY|||
|
|
||||||
aperture=ch.psi.pshell.device.MotorGroupDiscretePositioner|apertureX apertureY|||
|
|
||||||
scintillator=ch.psi.pshell.device.MotorGroupDiscretePositioner|scintillatorY|||
|
|
||||||
slit1H=ch.psi.pshell.epics.Slit|X10SA-OP-SH1:TRX2 X10SA-OP-SH1:TRX1|||true
|
|
||||||
slit1V=ch.psi.pshell.epics.Slit|X10SA-OP-SV1:TRY1 X10SA-OP-SV1:TRY2|||true
|
|
||||||
slit2H=ch.psi.pshell.epics.Slit|X10SA-OP-SH2:TRX2 X10SA-OP-SH2:TRX1|||true
|
|
||||||
slit2V=ch.psi.pshell.epics.Slit|X10SA-OP-SV2:TRY1 X10SA-OP-SV2:TRY2|||true
|
|
||||||
lamp=ch.psi.pshell.epics.DiscretePositioner||||true
|
|
||||||
backlight=ch.psi.pshell.epics.ProcessVariable|X10SA-ES-KOI:SET-LIGHT|||
|
|
||||||
frontlight=ch.psi.pshell.epics.ProcessVariable|X10SA-ES-FL1:SET-LIGHT|||
|
|
||||||
video=ch.psi.pshell.imaging.MjpegSource|http://x10sa-videoserver-1/axis-cgi/mjpg/video.cgi||-1000|
|
|
||||||
mic-low=ch.psi.pshell.imaging.MjpegSource|http://x10sa-fw-1.psi.ch:8090/GH-13.mjpg||-250|
|
|
||||||
mic-high=ch.psi.pshell.imaging.MjpegSource|http://x10sa-fw-1.psi.ch:8090/GH-12.mjpg||-250|
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
diode=ch.psi.pshell.epics.ChannelDouble|X10SA-ES-KBOX_K:READOUT 6|Read||
|
|
||||||
$shutter=ch.psi.pshell.epics.ChannelInteger|X10SA-ES-PH1:SET|||
|
|
||||||
omega=ch.psi.pshell.epics.Positionable|X10SA-ES-DF1:OMEGA-VAL X10SA-ES-DF1:OMEGA-RBV|||
|
|
||||||
x=ch.psi.pshell.epics.Positionable|X10SA-ES-DF1:GMX-VAL X10SA-ES-DF1:GMX-RBV|||
|
|
||||||
cy=ch.psi.pshell.epics.Motor|X10SA-ES-DFS:TRY1|||
|
|
||||||
cz=ch.psi.pshell.epics.Motor|X10SA-ES-DFS:TRZ1|||
|
|
||||||
apertureX=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRX1|||
|
|
||||||
apertureY=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRY1|||
|
|
||||||
beamstopX=ch.psi.pshell.epics.Motor|X10SA-ES-BS:TRX1|||
|
|
||||||
beamstopY=ch.psi.pshell.epics.Motor|X10SA-ES-BS:TRY1|||
|
|
||||||
beamstopZ=ch.psi.pshell.epics.Motor|X10SA-ES-BS:TRZ1|||
|
|
||||||
collimatorX=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRX2|||
|
|
||||||
collimatorY=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRY2|||
|
|
||||||
scintillatorY=ch.psi.pshell.epics.Motor|X10SA-ES-MIC:TRY3|||
|
|
||||||
scintillatorZ=ch.psi.pshell.epics.Positionable|X10SA-ES-SCINTI:SET-FOCUS X10SA-ES-SCINTI:GET-FOCUS|||
|
|
||||||
detectorZ=ch.psi.pshell.epics.Motor|X10SA-ES-D:TRZ1|||
|
|
||||||
detectorY=ch.psi.pshell.epics.Motor|X10SA-ES-D:TRY1|||
|
|
||||||
#apertureTable=ch.psi.pshell.device.MotorGroupBase|apertureX apertureY|||
|
|
||||||
beamstopTable=ch.psi.pshell.device.MotorGroupBase|beamstopX beamstopY beamstopZ|||
|
|
||||||
#collimatorTable=ch.psi.pshell.device.MotorGroupBase|collimatorX collimatorY|||
|
|
||||||
collimator=ch.psi.pshell.device.MotorGroupDiscretePositioner|collimatorX collimatorY|||
|
|
||||||
aperture=ch.psi.pshell.device.MotorGroupDiscretePositioner|apertureX apertureY|||
|
|
||||||
scintillator=ch.psi.pshell.device.MotorGroupDiscretePositioner|scintillatorY|||
|
|
||||||
slit1H=ch.psi.pshell.epics.Slit|X10SA-OP-SH1:TRX2 X10SA-OP-SH1:TRX1|||
|
|
||||||
slit1V=ch.psi.pshell.epics.Slit|X10SA-OP-SV1:TRY1 X10SA-OP-SV1:TRY2|||
|
|
||||||
slit2H=ch.psi.pshell.epics.Slit|X10SA-OP-SH2:TRX2 X10SA-OP-SH2:TRX1|||
|
|
||||||
slit2V=ch.psi.pshell.epics.Slit|X10SA-OP-SV2:TRY1 X10SA-OP-SV2:TRY2|||
|
|
||||||
lamp=ch.psi.pshell.epics.DiscretePositioner||||
|
|
||||||
backlight=ch.psi.pshell.epics.ProcessVariable|X10SA-ES-KOI:SET-LIGHT|||
|
|
||||||
frontlight=ch.psi.pshell.epics.ProcessVariable|X10SA-ES-FL1:SET-LIGHT|||
|
|
||||||
video=ch.psi.pshell.imaging.MjpegSource http://x10sa-videoserver-1/axis-cgi/mjpg/video.cgi
|
|
||||||
mic-low=ch.psi.pshell.imaging.MjpegSource http://x10sa-fw-1.psi.ch:8090/GH-13.mjpg
|
|
||||||
mic-high=ch.psi.pshell.imaging.MjpegSource http://x10sa-fw-1.psi.ch:8090/GH-12.mjpg
|
|
||||||
0
config/imaging.properties
Normal file
0
config/imaging.properties
Normal file
@@ -1,7 +0,0 @@
|
|||||||
ch.psi.jcae.ContextFactory.maxArrayBytes=10000000
|
|
||||||
|
|
||||||
ch.psi.jcae.ChannelFactory.timeout=2000
|
|
||||||
ch.psi.jcae.ChannelFactory.retries=2
|
|
||||||
ch.psi.jcae.ChannelBeanFactory.timeout=10000
|
|
||||||
ch.psi.jcae.ChannelBeanFactory.waitTimeout=3600000
|
|
||||||
ch.psi.jcae.ChannelBeanFactory.retries=2
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Microscope.java=enabled
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#Thu Sep 24 10:13:26 CEST 2015
|
|
||||||
configFile={config}/config.properties
|
|
||||||
configFileDevices={config}/devices.properties
|
|
||||||
configFileImageSources={config}/imaging.properties
|
|
||||||
configFilePlugins={config}/plugins.properties
|
|
||||||
configFileTasks={config}/tasks.properties
|
|
||||||
configFileUpdateStrategy={config}/update.properties
|
|
||||||
configPath={home}/config
|
|
||||||
contextPath={home}/context
|
|
||||||
dataPath={home}/data
|
|
||||||
devicesPath={home}/devices
|
|
||||||
extensionsPath={home}/extensions
|
|
||||||
libraryPath={script}; {script}/Lib
|
|
||||||
logPath={home}/log
|
|
||||||
pluginsPath={home}/plugins
|
|
||||||
scriptPath={home}/script
|
|
||||||
scriptType=py
|
|
||||||
sessionsPath={home}/sessions
|
|
||||||
wwwPath={home}/www
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#Tue Sep 01 10:46:53 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
motor1=0.6016|0.6153|0.5168|0.5599
|
|
||||||
motor2=-133.7286|2.758|-1.7844|0.4822
|
|
||||||
motor3=null
|
|
||||||
motor4=null
|
|
||||||
motor5=null
|
|
||||||
motor6=null
|
|
||||||
motor7=null
|
|
||||||
motor8=null
|
|
||||||
positions=Park|10um|30um|150um
|
|
||||||
precision=1
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:08:03 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=0.5606127886323268
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=3.7560000000000002
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-1.244
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.001
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:07:45 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=25.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=3.1000018310546977
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-136.4999999809265
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.005
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#Tue Aug 25 16:05:04 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
maxValue=4.0
|
|
||||||
minValue=0.0
|
|
||||||
offset=0.0
|
|
||||||
precision=2
|
|
||||||
resolution=NaN
|
|
||||||
scale=1.0
|
|
||||||
unit=V
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:23:51 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=2.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=6.9611794542536
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-9.0388205457464
|
|
||||||
offset=0.0
|
|
||||||
precision=3
|
|
||||||
resolution=0.001
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:23:34 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=2.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=7.82852
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-8.17148
|
|
||||||
offset=0.0
|
|
||||||
precision=3
|
|
||||||
resolution=0.001
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:24:52 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=26.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=132.0
|
|
||||||
minSpeed=1.0
|
|
||||||
minValue=-2.0
|
|
||||||
offset=0.0
|
|
||||||
precision=3
|
|
||||||
resolution=0.05
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#Tue Aug 18 14:06:07 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
motor1=NaN|NaN|0.3488
|
|
||||||
motor2=-134.0|-20.0|1.1908
|
|
||||||
motor3=null
|
|
||||||
motor4=null
|
|
||||||
motor5=null
|
|
||||||
motor6=null
|
|
||||||
motor7=null
|
|
||||||
motor8=null
|
|
||||||
positions=Park|Ready|In
|
|
||||||
precision=1
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:29:13 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=1.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=4.5
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-1.5
|
|
||||||
offset=0.0
|
|
||||||
precision=4
|
|
||||||
resolution=5.0E-4
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:29:03 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=25.0
|
|
||||||
estbilizationDelay=150
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=2.0999984741210938
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-135.0
|
|
||||||
offset=0.0
|
|
||||||
precision=4
|
|
||||||
resolution=5.0E-4
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Fri Nov 06 17:43:20 CET 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=5.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=2.0
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-2.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=1.0E-4
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Fri Nov 06 17:43:41 CET 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=5.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=2.0
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-2.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=1.0E-4
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 17:29:22 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=6.25
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=384.0
|
|
||||||
minSpeed=1.25
|
|
||||||
minValue=-2.0
|
|
||||||
offset=0.0
|
|
||||||
precision=3
|
|
||||||
resolution=0.01
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 17:29:30 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=40.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=1206.0
|
|
||||||
minSpeed=0.8
|
|
||||||
minValue=165.9
|
|
||||||
offset=0.0
|
|
||||||
precision=3
|
|
||||||
resolution=0.01
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#Tue Aug 25 16:05:05 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
maxValue=10.0
|
|
||||||
minValue=-10.0
|
|
||||||
offset=0.0
|
|
||||||
precision=2
|
|
||||||
resolution=NaN
|
|
||||||
scale=1.0
|
|
||||||
unit=V
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#Tue Aug 18 16:01:38 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
position_pvs=X10SA-ES-KOI\:SET-POS|X10SA-ES-KOI\:SET-POS
|
|
||||||
positions=Park|Measure
|
|
||||||
precision=-1
|
|
||||||
readback_pv=X10SA-ES-KOI\:GET-POS
|
|
||||||
setpoint_pv=X10SA-ES-KOI\:SET-POS
|
|
||||||
stop_pv=null
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#Wed Nov 11 14:13:36 CET 2015
|
|
||||||
flipHorizontally=false
|
|
||||||
flipVertically=true
|
|
||||||
grayscale=false
|
|
||||||
invert=false
|
|
||||||
pollingBackground=false
|
|
||||||
pollingInterval=250
|
|
||||||
rescaleFactor=1.0
|
|
||||||
rescaleOffset=0.0
|
|
||||||
rotation=0.0
|
|
||||||
scale=1.0
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#Wed Nov 11 14:13:36 CET 2015
|
|
||||||
flipHorizontally=false
|
|
||||||
flipVertically=true
|
|
||||||
grayscale=false
|
|
||||||
invert=false
|
|
||||||
pollingBackground=false
|
|
||||||
pollingInterval=250
|
|
||||||
rescaleFactor=1.0
|
|
||||||
rescaleOffset=0.0
|
|
||||||
rotation=0.0
|
|
||||||
scale=1.0
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#Fri Oct 30 09:32:08 CET 2015
|
|
||||||
flipHorizontally=false
|
|
||||||
flipVertically=false
|
|
||||||
grayscale=false
|
|
||||||
invert=false
|
|
||||||
pollingBackground=false
|
|
||||||
pollingInterval=200
|
|
||||||
rescaleFactor=1.0
|
|
||||||
rescaleOffset=0.0
|
|
||||||
rotation=0.0
|
|
||||||
scale=1.0
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#Fri Nov 06 15:37:43 CET 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
maxValue=10000.0
|
|
||||||
minValue=-10000.0
|
|
||||||
offset=0.0
|
|
||||||
precision=3
|
|
||||||
resolution=NaN
|
|
||||||
scale=1.0
|
|
||||||
unit=Deg
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 17:38:23 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
motor1=-132.7|-20.0|0.0|4.5
|
|
||||||
motor2=null
|
|
||||||
motor3=null
|
|
||||||
motor4=null
|
|
||||||
motor5=null
|
|
||||||
motor6=null
|
|
||||||
motor7=null
|
|
||||||
motor8=null
|
|
||||||
position_pvs=null
|
|
||||||
positions=Park|Ready|Scintillator|Diode
|
|
||||||
precision=-1
|
|
||||||
readback_pv=null
|
|
||||||
stop_pv=null
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 11:01:40 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=25.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=5.100003051757824
|
|
||||||
minSpeed=0.1
|
|
||||||
minValue=-134.49999995231627
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=5.0E-4
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#Tue Aug 18 17:29:43 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
maxValue=10.0
|
|
||||||
minValue=-10.0
|
|
||||||
offset=0.0
|
|
||||||
precision=4
|
|
||||||
resolution=5.0
|
|
||||||
scale=1.0
|
|
||||||
unit=V
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:30:06 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=1.5
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=6.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-6.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.00125
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:32:17 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=1.5
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=6.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-6.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.00125
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:32:31 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=1.5
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=6.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-6.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.00125
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:32:23 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=1.5
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=6.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-6.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.00125
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:32:48 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=5.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=10.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-10.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.0025
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:32:44 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=5.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=10.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-10.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.0025
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:32:34 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=5.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=10.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-10.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.0025
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#Tue Aug 18 14:32:38 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
defaultSpeed=5.0
|
|
||||||
estbilizationDelay=0
|
|
||||||
hasEnable=false
|
|
||||||
homingType=None
|
|
||||||
maxSpeed=NaN
|
|
||||||
maxValue=10.0
|
|
||||||
minSpeed=0.5
|
|
||||||
minValue=-10.0
|
|
||||||
offset=0.0
|
|
||||||
precision=5
|
|
||||||
resolution=0.0025
|
|
||||||
scale=1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#Tue Aug 18 18:06:23 CEST 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
motor1=0.6016|0.6016|0.5089|0.5511
|
|
||||||
motor2=-133.7286|2.7588|-1.7617|0.5066
|
|
||||||
motor3=null
|
|
||||||
motor4=null
|
|
||||||
motor5=null
|
|
||||||
motor6=null
|
|
||||||
motor7=null
|
|
||||||
motor8=null
|
|
||||||
positions=Park|10um|30um|150um
|
|
||||||
precision=-1
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#Fri May 22 16:26:46 CEST 2015
|
|
||||||
flipHorizontally=false
|
|
||||||
flipVertically=false
|
|
||||||
grayscale=false
|
|
||||||
invert=false
|
|
||||||
pollingBackground=false
|
|
||||||
pollingInterval=1000
|
|
||||||
rescaleFactor=1.0
|
|
||||||
rescaleOffset=0.0
|
|
||||||
rotation=0.0
|
|
||||||
scale=1.0
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#Tue Dec 01 16:10:38 CET 2015
|
|
||||||
accessType=ReadWrite
|
|
||||||
maxValue=25.0
|
|
||||||
minValue=16.5
|
|
||||||
offset=0.0
|
|
||||||
precision=3
|
|
||||||
resolution=NaN
|
|
||||||
scale=-1.0
|
|
||||||
unit=mm
|
|
||||||
@@ -1,467 +0,0 @@
|
|||||||
<?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" alignment="1" attributes="0">
|
|
||||||
<Component id="renderer" pref="512" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
|
||||||
<Component id="jPanel1" linkSize="1" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel2" linkSize="1" alignment="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="motorPanel1" linkSize="1" alignment="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="motorPanel2" linkSize="1" alignment="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="processVariablePanel1" linkSize="1" alignment="0" pref="324" max="32767" attributes="0"/>
|
|
||||||
<Component id="processVariablePanel2" linkSize="1" alignment="0" pref="324" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel4" alignment="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<Component id="renderer" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="1" attributes="0">
|
|
||||||
<Component id="motorPanel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="motorPanel2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="processVariablePanel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="processVariablePanel2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel4" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="ch.psi.pshell.imaging.Renderer" name="renderer">
|
|
||||||
<Properties>
|
|
||||||
<Property name="autoscrolls" type="boolean" value="true"/>
|
|
||||||
<Property name="deviceName" type="java.lang.String" value="mic-high"/>
|
|
||||||
<Property name="mode" type="ch.psi.pshell.imaging.RendererMode" editor="org.netbeans.modules.form.editors.EnumEditor">
|
|
||||||
<Value id="Fixed"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="showStatus" type="boolean" value="false"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="ch.psi.pshell.swing.MotorPanel" name="motorPanel1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
<Property name="decimals" type="int" value="2"/>
|
|
||||||
<Property name="deviceName" type="java.lang.String" value="cy"/>
|
|
||||||
<Property name="showHoming" type="boolean" value="false"/>
|
|
||||||
<Property name="showJog" type="boolean" value="false"/>
|
|
||||||
<Property name="showStatus" type="boolean" value="false"/>
|
|
||||||
<Property name="showTitle" type="boolean" value="true"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="ch.psi.pshell.swing.ProcessVariablePanel" name="processVariablePanel1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
<Property name="decimals" type="int" value="2"/>
|
|
||||||
<Property name="deviceName" type="java.lang.String" value="x"/>
|
|
||||||
<Property name="showLimitButtons" type="boolean" value="false"/>
|
|
||||||
<Property name="showSlider" type="boolean" value="false"/>
|
|
||||||
<Property name="showTitle" type="boolean" value="true"/>
|
|
||||||
<Property name="stepIncrement" type="double" value="0.001"/>
|
|
||||||
<Property name="stepSize" type="double" value="0.01"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="ch.psi.pshell.swing.MotorPanel" name="motorPanel2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
<Property name="decimals" type="int" value="2"/>
|
|
||||||
<Property name="deviceName" type="java.lang.String" value="cz"/>
|
|
||||||
<Property name="showHoming" type="boolean" value="false"/>
|
|
||||||
<Property name="showJog" type="boolean" value="false"/>
|
|
||||||
<Property name="showStatus" type="boolean" value="false"/>
|
|
||||||
<Property name="showTitle" type="boolean" value="true"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="ch.psi.pshell.swing.ProcessVariablePanel" name="processVariablePanel2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
<Property name="decimals" type="int" value="2"/>
|
|
||||||
<Property name="deviceName" type="java.lang.String" value="omega"/>
|
|
||||||
<Property name="showLimitButtons" type="boolean" value="false"/>
|
|
||||||
<Property name="showSlider" type="boolean" value="false"/>
|
|
||||||
<Property name="showTitle" type="boolean" value="true"/>
|
|
||||||
<Property name="stepIncrement" type="double" value="10.0"/>
|
|
||||||
<Property name="stepSize" type="double" value="90.0"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder title="Alignment"/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" alignment="1" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="spinnerStepAlignment" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace pref="65" max="32767" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
|
||||||
<Component id="jPanel3" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel5" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel6" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace pref="66" 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 max="-2" attributes="0"/>
|
|
||||||
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
|
||||||
<Component id="jPanel3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
|
||||||
<Component id="jPanel6" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="spinnerStepAlignment" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="buttonLeft" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="77" pref="77" max="-2" attributes="0"/>
|
|
||||||
<Component id="buttonRight" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="buttonRight" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="buttonLeft" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="buttonLeft">
|
|
||||||
<Properties>
|
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
|
||||||
<Font name="Dialog" size="12" style="0"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="<"/>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 25]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 30]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonLeftActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="buttonRight">
|
|
||||||
<Properties>
|
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
|
||||||
<Font name="Dialog" size="12" style="0"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value=">"/>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 25]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 30]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonRightActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Step:"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JSpinner" name="spinnerStepAlignment">
|
|
||||||
<Properties>
|
|
||||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
|
||||||
<SpinnerModel initial="0.01" maximum="1.0" minimum="0.001" numberType="java.lang.Double" stepSize="0.01" type="number"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Component id="buttonUp" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
<Component id="buttonUp" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="buttonUp">
|
|
||||||
<Properties>
|
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
|
||||||
<Font name="Dialog" size="12" style="0"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="^"/>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 25]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 30]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonUpActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel6">
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Component id="buttonDown" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
<Component id="buttonDown" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="buttonDown">
|
|
||||||
<Properties>
|
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
|
||||||
<Font name="Dialog" size="12" style="0"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="v"/>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 25]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[65, 30]"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonDownActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
<Component id="button0" linkSize="2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="46" max="32767" attributes="0"/>
|
|
||||||
<Component id="button90" linkSize="2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="46" max="32767" attributes="0"/>
|
|
||||||
<Component id="button180" linkSize="2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="48" max="32767" attributes="0"/>
|
|
||||||
<Component id="button270" linkSize="2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="button0" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="button90" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="button180" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="button270" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="button0">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="0"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="button0ActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="button270">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="270"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="button270ActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="button180">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="180"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="button180ActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="button90">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="90"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="button90ActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
|
||||||
<TitledBorder title="Camera"/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
|
|
||||||
<Layout>
|
|
||||||
<DimensionLayout dim="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="checkHighDef" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Component id="buttonDefineBeam" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
<DimensionLayout dim="1">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
|
||||||
<Component id="buttonDefineBeam" alignment="3" min="-2" pref="25" max="-2" attributes="0"/>
|
|
||||||
<Component id="checkHighDef" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
</DimensionLayout>
|
|
||||||
</Layout>
|
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JButton" name="buttonDefineBeam">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" value="Define Beam"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonDefineBeamActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="checkHighDef">
|
|
||||||
<Properties>
|
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
|
||||||
<Property name="text" type="java.lang.String" value="High definition"/>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkHighDefActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
</SubComponents>
|
|
||||||
</Form>
|
|
||||||
@@ -1,541 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import ch.psi.pshell.device.Motor;
|
|
||||||
import ch.psi.pshell.device.Positionable;
|
|
||||||
import ch.psi.pshell.imaging.Overlay;
|
|
||||||
import ch.psi.pshell.imaging.Overlays;
|
|
||||||
import ch.psi.pshell.imaging.Pen;
|
|
||||||
import ch.psi.pshell.imaging.Renderer;
|
|
||||||
import ch.psi.pshell.imaging.RendererListener;
|
|
||||||
import ch.psi.pshell.ui.Panel;
|
|
||||||
import ch.psi.utils.State;
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Microscope extends Panel {
|
|
||||||
public Microscope() {
|
|
||||||
initComponents();
|
|
||||||
}
|
|
||||||
|
|
||||||
//Overridable callbacks
|
|
||||||
@Override
|
|
||||||
public void onInitialize(int runCount) {
|
|
||||||
renderer.setPersistenceFile(Paths.get(getController().getSetup().getContextPath(), "BeamMarker.bin"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStateChange(State state, State former) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onExecutedFile(String fileName, Object result) {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//Callback to perform update - in event thread
|
|
||||||
@Override
|
|
||||||
protected void doUpdate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
||||||
private void initComponents() {
|
|
||||||
|
|
||||||
renderer = new ch.psi.pshell.imaging.Renderer();
|
|
||||||
motorPanel1 = new ch.psi.pshell.swing.MotorPanel();
|
|
||||||
processVariablePanel1 = new ch.psi.pshell.swing.ProcessVariablePanel();
|
|
||||||
motorPanel2 = new ch.psi.pshell.swing.MotorPanel();
|
|
||||||
processVariablePanel2 = new ch.psi.pshell.swing.ProcessVariablePanel();
|
|
||||||
jPanel1 = new javax.swing.JPanel();
|
|
||||||
jPanel3 = new javax.swing.JPanel();
|
|
||||||
buttonLeft = new javax.swing.JButton();
|
|
||||||
buttonRight = new javax.swing.JButton();
|
|
||||||
jLabel1 = new javax.swing.JLabel();
|
|
||||||
spinnerStepAlignment = new javax.swing.JSpinner();
|
|
||||||
jPanel5 = new javax.swing.JPanel();
|
|
||||||
buttonUp = new javax.swing.JButton();
|
|
||||||
jPanel6 = new javax.swing.JPanel();
|
|
||||||
buttonDown = new javax.swing.JButton();
|
|
||||||
jPanel2 = new javax.swing.JPanel();
|
|
||||||
button0 = new javax.swing.JButton();
|
|
||||||
button270 = new javax.swing.JButton();
|
|
||||||
button180 = new javax.swing.JButton();
|
|
||||||
button90 = new javax.swing.JButton();
|
|
||||||
jPanel4 = new javax.swing.JPanel();
|
|
||||||
buttonDefineBeam = new javax.swing.JButton();
|
|
||||||
checkHighDef = new javax.swing.JCheckBox();
|
|
||||||
|
|
||||||
renderer.setAutoscrolls(true);
|
|
||||||
renderer.setDeviceName("mic-high");
|
|
||||||
renderer.setMode(ch.psi.pshell.imaging.RendererMode.Fixed);
|
|
||||||
renderer.setShowStatus(false);
|
|
||||||
|
|
||||||
motorPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("cy"));
|
|
||||||
motorPanel1.setDecimals(2);
|
|
||||||
motorPanel1.setDeviceName("cy");
|
|
||||||
motorPanel1.setShowHoming(false);
|
|
||||||
motorPanel1.setShowJog(false);
|
|
||||||
motorPanel1.setShowStatus(false);
|
|
||||||
motorPanel1.setShowTitle(true);
|
|
||||||
|
|
||||||
processVariablePanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("x"));
|
|
||||||
processVariablePanel1.setDecimals(2);
|
|
||||||
processVariablePanel1.setDeviceName("x");
|
|
||||||
processVariablePanel1.setShowLimitButtons(false);
|
|
||||||
processVariablePanel1.setShowSlider(false);
|
|
||||||
processVariablePanel1.setShowTitle(true);
|
|
||||||
processVariablePanel1.setStepIncrement(0.001);
|
|
||||||
processVariablePanel1.setStepSize(0.01);
|
|
||||||
|
|
||||||
motorPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("cz"));
|
|
||||||
motorPanel2.setDecimals(2);
|
|
||||||
motorPanel2.setDeviceName("cz");
|
|
||||||
motorPanel2.setShowHoming(false);
|
|
||||||
motorPanel2.setShowJog(false);
|
|
||||||
motorPanel2.setShowStatus(false);
|
|
||||||
motorPanel2.setShowTitle(true);
|
|
||||||
|
|
||||||
processVariablePanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("omega"));
|
|
||||||
processVariablePanel2.setDecimals(2);
|
|
||||||
processVariablePanel2.setDeviceName("omega");
|
|
||||||
processVariablePanel2.setShowLimitButtons(false);
|
|
||||||
processVariablePanel2.setShowSlider(false);
|
|
||||||
processVariablePanel2.setShowTitle(true);
|
|
||||||
processVariablePanel2.setStepIncrement(10.0);
|
|
||||||
processVariablePanel2.setStepSize(90.0);
|
|
||||||
|
|
||||||
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Alignment"));
|
|
||||||
|
|
||||||
buttonLeft.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
|
|
||||||
buttonLeft.setText("<");
|
|
||||||
buttonLeft.setMinimumSize(new java.awt.Dimension(65, 25));
|
|
||||||
buttonLeft.setPreferredSize(new java.awt.Dimension(65, 30));
|
|
||||||
buttonLeft.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
buttonLeftActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonRight.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
|
|
||||||
buttonRight.setText(">");
|
|
||||||
buttonRight.setMinimumSize(new java.awt.Dimension(65, 25));
|
|
||||||
buttonRight.setPreferredSize(new java.awt.Dimension(65, 30));
|
|
||||||
buttonRight.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
buttonRightActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
|
||||||
jPanel3.setLayout(jPanel3Layout);
|
|
||||||
jPanel3Layout.setHorizontalGroup(
|
|
||||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(buttonLeft, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(77, 77, 77)
|
|
||||||
.addComponent(buttonRight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
|
||||||
jPanel3Layout.setVerticalGroup(
|
|
||||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
|
||||||
.addGap(0, 0, 0)
|
|
||||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
||||||
.addComponent(buttonRight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(buttonLeft, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
||||||
);
|
|
||||||
|
|
||||||
jLabel1.setText("Step:");
|
|
||||||
|
|
||||||
spinnerStepAlignment.setModel(new javax.swing.SpinnerNumberModel(0.01d, 0.001d, 1.0d, 0.01d));
|
|
||||||
|
|
||||||
buttonUp.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
|
|
||||||
buttonUp.setText("^");
|
|
||||||
buttonUp.setMinimumSize(new java.awt.Dimension(65, 25));
|
|
||||||
buttonUp.setPreferredSize(new java.awt.Dimension(65, 30));
|
|
||||||
buttonUp.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
buttonUpActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
|
|
||||||
jPanel5.setLayout(jPanel5Layout);
|
|
||||||
jPanel5Layout.setHorizontalGroup(
|
|
||||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(buttonUp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
||||||
);
|
|
||||||
jPanel5Layout.setVerticalGroup(
|
|
||||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
||||||
.addGap(0, 0, 0)
|
|
||||||
.addComponent(buttonUp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(0, 0, 0))
|
|
||||||
);
|
|
||||||
|
|
||||||
buttonDown.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
|
|
||||||
buttonDown.setText("v");
|
|
||||||
buttonDown.setMinimumSize(new java.awt.Dimension(65, 25));
|
|
||||||
buttonDown.setPreferredSize(new java.awt.Dimension(65, 30));
|
|
||||||
buttonDown.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
buttonDownActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
|
|
||||||
jPanel6.setLayout(jPanel6Layout);
|
|
||||||
jPanel6Layout.setHorizontalGroup(
|
|
||||||
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel6Layout.createSequentialGroup()
|
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(buttonDown, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
||||||
);
|
|
||||||
jPanel6Layout.setVerticalGroup(
|
|
||||||
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel6Layout.createSequentialGroup()
|
|
||||||
.addGap(0, 0, 0)
|
|
||||||
.addComponent(buttonDown, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(0, 0, 0))
|
|
||||||
);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
|
||||||
jPanel1.setLayout(jPanel1Layout);
|
|
||||||
jPanel1Layout.setHorizontalGroup(
|
|
||||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
|
||||||
.addGap(0, 0, Short.MAX_VALUE)
|
|
||||||
.addComponent(jLabel1)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(spinnerStepAlignment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addContainerGap())
|
|
||||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
||||||
.addContainerGap(65, Short.MAX_VALUE)
|
|
||||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
||||||
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
||||||
.addContainerGap(66, Short.MAX_VALUE))
|
|
||||||
);
|
|
||||||
jPanel1Layout.setVerticalGroup(
|
|
||||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(12, 12, 12)
|
|
||||||
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
||||||
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
||||||
.addComponent(jLabel1)
|
|
||||||
.addComponent(spinnerStepAlignment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addGap(4, 4, 4))
|
|
||||||
);
|
|
||||||
|
|
||||||
button0.setText("0");
|
|
||||||
button0.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
button0ActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
button270.setText("270");
|
|
||||||
button270.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
button270ActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
button180.setText("180");
|
|
||||||
button180.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
button180ActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
button90.setText("90");
|
|
||||||
button90.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
button90ActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
|
||||||
jPanel2.setLayout(jPanel2Layout);
|
|
||||||
jPanel2Layout.setHorizontalGroup(
|
|
||||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
|
||||||
.addGap(0, 0, 0)
|
|
||||||
.addComponent(button0)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
|
|
||||||
.addComponent(button90)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
|
|
||||||
.addComponent(button180)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
|
|
||||||
.addComponent(button270)
|
|
||||||
.addGap(0, 0, 0))
|
|
||||||
);
|
|
||||||
|
|
||||||
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {button0, button180, button270, button90});
|
|
||||||
|
|
||||||
jPanel2Layout.setVerticalGroup(
|
|
||||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
|
||||||
.addGap(0, 0, 0)
|
|
||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
||||||
.addComponent(button0)
|
|
||||||
.addComponent(button90)
|
|
||||||
.addComponent(button180)
|
|
||||||
.addComponent(button270))
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
|
||||||
|
|
||||||
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Camera"));
|
|
||||||
|
|
||||||
buttonDefineBeam.setText("Define Beam");
|
|
||||||
buttonDefineBeam.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
buttonDefineBeamActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
checkHighDef.setSelected(true);
|
|
||||||
checkHighDef.setText("High definition");
|
|
||||||
checkHighDef.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
checkHighDefActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
|
|
||||||
jPanel4.setLayout(jPanel4Layout);
|
|
||||||
jPanel4Layout.setHorizontalGroup(
|
|
||||||
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel4Layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(checkHighDef)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(buttonDefineBeam)
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
|
||||||
jPanel4Layout.setVerticalGroup(
|
|
||||||
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(jPanel4Layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
||||||
.addComponent(buttonDefineBeam, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addComponent(checkHighDef))
|
|
||||||
.addGap(4, 4, 4))
|
|
||||||
);
|
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
|
||||||
this.setLayout(layout);
|
|
||||||
layout.setHorizontalGroup(
|
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
||||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, 512, Short.MAX_VALUE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(motorPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(motorPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(processVariablePanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)
|
|
||||||
.addComponent(processVariablePanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
|
||||||
|
|
||||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jPanel1, jPanel2, motorPanel1, motorPanel2, processVariablePanel1, processVariablePanel2});
|
|
||||||
|
|
||||||
layout.setVerticalGroup(
|
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addGap(5, 5, 5))
|
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
||||||
.addComponent(motorPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(motorPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(processVariablePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(processVariablePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
|
||||||
|
|
||||||
Overlay beam;
|
|
||||||
|
|
||||||
private void buttonDefineBeamActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDefineBeamActionPerformed
|
|
||||||
try{
|
|
||||||
Pen pen = new Pen(Color.RED);
|
|
||||||
final Overlay selection = new Overlays.Rect(pen);
|
|
||||||
|
|
||||||
renderer.addListener(new RendererListener() {
|
|
||||||
@Override
|
|
||||||
public void onSelectionFinished(Renderer renderer, Overlay overlay) {
|
|
||||||
System.out.println(overlay + " - " + selection + " - " + (overlay == selection));
|
|
||||||
if (overlay == selection){
|
|
||||||
try {
|
|
||||||
if (overlay.getLength() > 0) {
|
|
||||||
beam = overlay.copy();
|
|
||||||
beam.setPen(pen);
|
|
||||||
beam.setSolid(false);
|
|
||||||
beam.setMovable(true);
|
|
||||||
renderer.setMarker(beam);
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
getLogger().log(Level.WARNING, null, ex);
|
|
||||||
} finally {
|
|
||||||
renderer.removeListener(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void onSelectionAborted(Renderer renderer, Overlay overlay) {
|
|
||||||
if (overlay == selection){
|
|
||||||
renderer.removeListener(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
renderer.removeOverlay(beam);
|
|
||||||
renderer.startSelection(selection);
|
|
||||||
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//GEN-LAST:event_buttonDefineBeamActionPerformed
|
|
||||||
|
|
||||||
private void checkHighDefActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkHighDefActionPerformed
|
|
||||||
renderer.setDeviceName(checkHighDef.isSelected() ? "mic-high" : "mic-low");
|
|
||||||
}//GEN-LAST:event_checkHighDefActionPerformed
|
|
||||||
|
|
||||||
private void button0ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button0ActionPerformed
|
|
||||||
try{
|
|
||||||
((Positionable)getDevice("omega")).moveAsync(0.0);
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_button0ActionPerformed
|
|
||||||
|
|
||||||
private void button90ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button90ActionPerformed
|
|
||||||
try{
|
|
||||||
((Positionable)getDevice("omega")).moveAsync(90.0);
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_button90ActionPerformed
|
|
||||||
|
|
||||||
private void button180ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button180ActionPerformed
|
|
||||||
try{
|
|
||||||
((Positionable)getDevice("omega")).moveAsync(180.0);
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_button180ActionPerformed
|
|
||||||
|
|
||||||
private void button270ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button270ActionPerformed
|
|
||||||
try{
|
|
||||||
((Positionable)getDevice("omega")).moveAsync(270.0);
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_button270ActionPerformed
|
|
||||||
|
|
||||||
double getStep(){
|
|
||||||
//return 0.01;
|
|
||||||
return (Double)spinnerStepAlignment.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonLeftActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonLeftActionPerformed
|
|
||||||
try{
|
|
||||||
((ch.psi.pshell.epics.Positionable)getDevice("x")).moveRelAsync(-getStep());
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_buttonLeftActionPerformed
|
|
||||||
|
|
||||||
private void buttonRightActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonRightActionPerformed
|
|
||||||
try{
|
|
||||||
((ch.psi.pshell.epics.Positionable)getDevice("x")).moveRelAsync(getStep());
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_buttonRightActionPerformed
|
|
||||||
|
|
||||||
private void buttonUpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonUpActionPerformed
|
|
||||||
try{
|
|
||||||
doVerticalStep(getStep());
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
}//GEN-LAST:event_buttonUpActionPerformed
|
|
||||||
|
|
||||||
private void buttonDownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDownActionPerformed
|
|
||||||
try{
|
|
||||||
doVerticalStep(-getStep());
|
|
||||||
} catch (Exception ex){
|
|
||||||
showException(ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//GEN-LAST:event_buttonDownActionPerformed
|
|
||||||
|
|
||||||
public void doVerticalStep(double offset) throws Exception
|
|
||||||
{
|
|
||||||
//Todo: create motor group
|
|
||||||
double omega = Math.toRadians((Double) ((Positionable)getDevice("omega")).getPosition());
|
|
||||||
double z = offset * Math.sin(omega);
|
|
||||||
double y = offset * Math.cos(omega);
|
|
||||||
((Motor)getDevice("cy")).moveRelAsync(y);
|
|
||||||
((Motor)getDevice("cz")).moveRelAsync(z);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
||||||
private javax.swing.JButton button0;
|
|
||||||
private javax.swing.JButton button180;
|
|
||||||
private javax.swing.JButton button270;
|
|
||||||
private javax.swing.JButton button90;
|
|
||||||
private javax.swing.JButton buttonDefineBeam;
|
|
||||||
private javax.swing.JButton buttonDown;
|
|
||||||
private javax.swing.JButton buttonLeft;
|
|
||||||
private javax.swing.JButton buttonRight;
|
|
||||||
private javax.swing.JButton buttonUp;
|
|
||||||
private javax.swing.JCheckBox checkHighDef;
|
|
||||||
private javax.swing.JLabel jLabel1;
|
|
||||||
private javax.swing.JPanel jPanel1;
|
|
||||||
private javax.swing.JPanel jPanel2;
|
|
||||||
private javax.swing.JPanel jPanel3;
|
|
||||||
private javax.swing.JPanel jPanel4;
|
|
||||||
private javax.swing.JPanel jPanel5;
|
|
||||||
private javax.swing.JPanel jPanel6;
|
|
||||||
private ch.psi.pshell.swing.MotorPanel motorPanel1;
|
|
||||||
private ch.psi.pshell.swing.MotorPanel motorPanel2;
|
|
||||||
private ch.psi.pshell.swing.ProcessVariablePanel processVariablePanel1;
|
|
||||||
private ch.psi.pshell.swing.ProcessVariablePanel processVariablePanel2;
|
|
||||||
private ch.psi.pshell.imaging.Renderer renderer;
|
|
||||||
private javax.swing.JSpinner spinnerStepAlignment;
|
|
||||||
// End of variables declaration//GEN-END:variables
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
from mathutils import Gaussian,fit_gaussian, calculate_peaks
|
|
||||||
|
|
||||||
##############################################################################################
|
|
||||||
#Setup
|
|
||||||
##############################################################################################
|
|
||||||
#try:
|
|
||||||
# collimator.move("In")
|
|
||||||
#except:
|
|
||||||
# pass
|
|
||||||
|
|
||||||
shutter.write(1)
|
|
||||||
|
|
||||||
step_size = 0.05
|
|
||||||
|
|
||||||
##############################################################################################
|
|
||||||
#Scan
|
|
||||||
##############################################################################################
|
|
||||||
|
|
||||||
result = lscan (collimatorX, diode, -0.3, 0.3 , 30, 0.2, relative = True)
|
|
||||||
shutter.write(0)
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################################
|
|
||||||
#Peak detection
|
|
||||||
##############################################################################################
|
|
||||||
|
|
||||||
y = result.getReadable(0)
|
|
||||||
x = result.getPositions(0)
|
|
||||||
(normalization, mean, sigma) = fit_gaussian(y, x, True)
|
|
||||||
fitted_gaussian_function = Gaussian(normalization, mean, sigma)
|
|
||||||
print "Mean = " + str(mean)
|
|
||||||
|
|
||||||
|
|
||||||
resolution = step_size/100
|
|
||||||
fit_gaussian = []
|
|
||||||
for p in frange(x[0],x[-1],resolution, True):
|
|
||||||
fit_gaussian.append(fitted_gaussian_function.value(p))
|
|
||||||
gx = frange(x[0], x[-1]+resolution, resolution)
|
|
||||||
|
|
||||||
plots = plot([y, fit_gaussian], ["data", "gaussian"], xdata = [x,gx] )
|
|
||||||
plots[0].addMarker(mean, None, "Mean=" + str(round(mean,2)), None)
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
"""
|
|
||||||
Multi-peak search and gaussian fitting
|
|
||||||
"""
|
|
||||||
|
|
||||||
from mathutils import estimate_peak_indexes, fit_gaussians, create_fit_point_list
|
|
||||||
|
|
||||||
start = 1
|
|
||||||
end = 30
|
|
||||||
step_size = 0.2
|
|
||||||
|
|
||||||
result= lscan(sout,sinp,start,end,[step_size,],0.05)
|
|
||||||
|
|
||||||
path = get_current_data_group()
|
|
||||||
set_attribute(path, "ApertureX", apertureX.read())
|
|
||||||
|
|
||||||
readable = result.getReadable(0)
|
|
||||||
positions = result.getPositions(0)
|
|
||||||
|
|
||||||
threshold = (min(readable) + max(readable))/2
|
|
||||||
min_peak_distance = 5.0
|
|
||||||
|
|
||||||
peaks = estimate_peak_indexes(readable, positions, threshold, min_peak_distance)
|
|
||||||
print "Peak indexes: " + str(peaks)
|
|
||||||
print "Peak x: " + str(map(lambda x:positions[x], peaks))
|
|
||||||
print "Peak y: " + str(map(lambda x:readable[x], peaks))
|
|
||||||
|
|
||||||
log("Highest peak index = " +str(peaks[0]))
|
|
||||||
|
|
||||||
#Manually adding a dataset
|
|
||||||
data = [ [1,2,3,4,5], [2,3,4,5,6], [3,4,5,6,7]]
|
|
||||||
path="group/data2"
|
|
||||||
save_dataset(path, data)
|
|
||||||
|
|
||||||
gaussians = fit_gaussians(readable, positions, peaks)
|
|
||||||
|
|
||||||
|
|
||||||
plots = plot([readable],["Multi-peak search"],[positions])
|
|
||||||
for i in range(len(peaks)):
|
|
||||||
peak = peaks[i]
|
|
||||||
(norm, mean, sigma) = gaussians[i]
|
|
||||||
if abs(mean - positions[peak]) < min_peak_distance:
|
|
||||||
print "Peak -> " + str(mean)
|
|
||||||
plots[0].addMarker(mean, None, "N="+str(round(norm,2)), None)
|
|
||||||
else:
|
|
||||||
print "Invalid gaussian fit: " + str(mean)
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
"""
|
|
||||||
Function fitting and peak search with mathutils facade
|
|
||||||
"""
|
|
||||||
from mathutils import fit_polynomial,fit_gaussian, fit_harmonic, calculate_peaks
|
|
||||||
from mathutils import PolynomialFunction, Gaussian, HarmonicOscillator
|
|
||||||
import math
|
|
||||||
|
|
||||||
|
|
||||||
start = 0
|
|
||||||
end = 5
|
|
||||||
step_size = 0.1
|
|
||||||
|
|
||||||
result= lscan(sout,sinp,start,end,[step_size,],0.01)
|
|
||||||
|
|
||||||
readable = result.getReadable(0)
|
|
||||||
positions = result.getPositions(0)
|
|
||||||
|
|
||||||
def get_function_data(function, start, end, resolution):
|
|
||||||
ret = []
|
|
||||||
for x in frange(start, end, resolution, True):
|
|
||||||
fit_polinomial.append(function.value(x))
|
|
||||||
|
|
||||||
|
|
||||||
pars_polynomial = (a0, a1, a2, a3, a4, a5, a6) = fit_polynomial(readable, positions, 6)
|
|
||||||
fitted_polynomial_function = PolynomialFunction(pars_polynomial)
|
|
||||||
print pars_polynomial
|
|
||||||
|
|
||||||
(normalization, mean, sigma) = fit_gaussian(readable, positions, True)
|
|
||||||
fitted_gaussian_function = Gaussian(normalization, mean, sigma)
|
|
||||||
print (normalization, mean, sigma)
|
|
||||||
|
|
||||||
(amplitude, angular_frequency, phase) = fit_harmonic(readable, positions)
|
|
||||||
fitted_harmonic_function = HarmonicOscillator(amplitude, angular_frequency, phase)
|
|
||||||
print (amplitude, angular_frequency, phase)
|
|
||||||
|
|
||||||
|
|
||||||
resolution = step_size/100
|
|
||||||
fit_polinomial = []
|
|
||||||
fit_gaussian = []
|
|
||||||
fit_harmonic = []
|
|
||||||
for x in frange(start,end,resolution, True):
|
|
||||||
fit_polinomial.append(fitted_polynomial_function.value(x))
|
|
||||||
fit_gaussian.append(fitted_gaussian_function.value(x))
|
|
||||||
fit_harmonic.append(fitted_harmonic_function.value(x))
|
|
||||||
x = frange(start, end+resolution, resolution)
|
|
||||||
|
|
||||||
|
|
||||||
peaks = calculate_peaks(fitted_polynomial_function)
|
|
||||||
|
|
||||||
plots = plot([readable, fit_polinomial, fit_gaussian, fit_harmonic] ,
|
|
||||||
["data", "polinomial", "gaussian", "harmonic"], xdata = [positions,x,x,x] )
|
|
||||||
|
|
||||||
for p in peaks:
|
|
||||||
print "Max: " + str(p)
|
|
||||||
plots[0].addMarker(p, None, "Max=" + str(round(p,2)), None)
|
|
||||||
import java.awt.Color
|
|
||||||
plots[0].addMarker(mean, None, "Mean=" + str(round(mean,2)), java.awt.Color.LIGHT_GRAY)
|
|
||||||
9
script/back.py
Normal file
9
script/back.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import java.util.logging.Logger as Logger
|
||||||
|
logger = Logger.getLogger("back")
|
||||||
|
|
||||||
|
|
||||||
|
logger.info("Started")
|
||||||
|
|
||||||
|
asd
|
||||||
|
|
||||||
|
|
||||||
@@ -1,28 +1,3 @@
|
|||||||
###################################################################################################
|
#det.data.monitored=True
|
||||||
# Deployment specific global definitions - executed after startup.py
|
|
||||||
###################################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
#Uncomment this line to create the simulated devices needed to the tutorial scripts.
|
|
||||||
#run("tutorial/devices")
|
|
||||||
|
|
||||||
import random
|
asd
|
||||||
|
|
||||||
|
|
||||||
class SimulatedOutput(Writable):
|
|
||||||
def write(self, value):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class SimulatedInput(Readable):
|
|
||||||
def __init__(self):
|
|
||||||
self.x = 0.0
|
|
||||||
|
|
||||||
def read(self):
|
|
||||||
self.x = self.x + 0.2
|
|
||||||
noise = (random.random() - 0.5) / 20.0
|
|
||||||
return math.sin(self.x) + noise
|
|
||||||
|
|
||||||
|
|
||||||
sout = SimulatedOutput()
|
|
||||||
sinp = SimulatedInput()
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
###################################################################################################
|
|
||||||
# Deployment specific global definitions - executed after startup.py
|
|
||||||
###################################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
#Uncomment this line to create the simulated devices needed to the tutorial scripts.
|
|
||||||
#run("tutorial/devices")
|
|
||||||
310
script/startup.py
Normal file
310
script/startup.py
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import math
|
||||||
|
from array import array
|
||||||
|
|
||||||
|
import java.lang.Class as Class
|
||||||
|
import org.python.core.PyArray as PyArray
|
||||||
|
import ch.psi.pshell.dev.MotorGroupBase.MoveMode as MoveMode
|
||||||
|
|
||||||
|
import ch.psi.pshell.scan.LineScan
|
||||||
|
import ch.psi.pshell.scan.AreaScan
|
||||||
|
import ch.psi.pshell.scan.VectorScan
|
||||||
|
import ch.psi.pshell.dev.Readable as Readable
|
||||||
|
|
||||||
|
import ch.psi.pshell.epics.Epics as Epics
|
||||||
|
import ch.psi.pshell.epics.EpicsScan as EpicsScan
|
||||||
|
|
||||||
|
|
||||||
|
def onScanBeforeReadout(scan):
|
||||||
|
try:
|
||||||
|
if (scan.before_read!=None):
|
||||||
|
scan.before_read()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def onScanAfterReadout(scan):
|
||||||
|
try:
|
||||||
|
if (scan.after_read!=None):
|
||||||
|
scan.after_read()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
class LineScan(ch.psi.pshell.scan.LineScan):
|
||||||
|
def onBeforeReadout(self):
|
||||||
|
onScanBeforeReadout(self)
|
||||||
|
|
||||||
|
def onAfterReadout(self):
|
||||||
|
onScanAfterReadout(self)
|
||||||
|
|
||||||
|
class AreaScan(ch.psi.pshell.scan.AreaScan):
|
||||||
|
def onBeforeReadout(self):
|
||||||
|
onScanBeforeReadout(self)
|
||||||
|
|
||||||
|
def onAfterReadout(self):
|
||||||
|
onScanAfterReadout(self)
|
||||||
|
|
||||||
|
class VectorScan(ch.psi.pshell.scan.VectorScan):
|
||||||
|
def onBeforeReadout(self):
|
||||||
|
onScanBeforeReadout(self)
|
||||||
|
|
||||||
|
def onAfterReadout(self):
|
||||||
|
onScanAfterReadout(self)
|
||||||
|
|
||||||
|
def sleep(sec):
|
||||||
|
time.sleep(sec)
|
||||||
|
|
||||||
|
def toList(obj):
|
||||||
|
if isinstance(obj,tuple):
|
||||||
|
return list(obj)
|
||||||
|
if not isinstance(obj,list):
|
||||||
|
return [obj,]
|
||||||
|
return obj
|
||||||
|
|
||||||
|
|
||||||
|
def lscan(writables, readables, start, end, steps, latency=0.0, plot=None, before_read=None, after_read=None):
|
||||||
|
"""Line Scan: positioners change together, linearly from start to end positions.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
writables(list of Writable): Positioners set on each step.
|
||||||
|
readables(list of Readable): Sensors to be sampled on each step.
|
||||||
|
start(list of float): start positions of writables.
|
||||||
|
end(list of float): final positions of writables.
|
||||||
|
steps(int): number of scan steps.
|
||||||
|
latency(float, optional): sleep time in each step before readout, defaults to 0.0.
|
||||||
|
plot(str, optional): plotting context name.
|
||||||
|
before_read (function): callback on each step, before each readout.
|
||||||
|
after_read (function): callback on each step, after each readout.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ArrayList of ScanRecord objects.
|
||||||
|
|
||||||
|
"""
|
||||||
|
latency_ms=int(latency*1000)
|
||||||
|
writables=toList(writables)
|
||||||
|
readables=toList(readables)
|
||||||
|
start=toList(start)
|
||||||
|
end=toList(end)
|
||||||
|
scan = LineScan(writables,readables, start, end , steps,latency_ms, controller)
|
||||||
|
scan.before_read=before_read
|
||||||
|
scan.after_read=after_read
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
|
||||||
|
def vscan(writables, readables, vector, latency=0.0, plot=None, before_read=None, after_read=None):
|
||||||
|
"""Vector Scan: positioners change following values provided in a vector.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
writables(list of Writable): Positioners set on each step.
|
||||||
|
readables(list of Readable): Sensors to be sampled on each step.
|
||||||
|
vector(list of list of float): table of positioner values.
|
||||||
|
latency(float, optional): sleep time in each step before readout, defaults to 0.0.
|
||||||
|
plot(str, optional): plotting context name.
|
||||||
|
before_read (function): callback on each step, before each readout.
|
||||||
|
after_read (function): callback on each step, after each readout.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ArrayList of ScanRecord objects.
|
||||||
|
|
||||||
|
"""
|
||||||
|
latency_ms=int(latency*1000)
|
||||||
|
writables=toList(writables)
|
||||||
|
readables=toList(readables)
|
||||||
|
scan = VectorScan(writables,readables, vector, latency_ms, controller)
|
||||||
|
scan.before_read=before_read
|
||||||
|
scan.after_read=after_read
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
|
||||||
|
def ascan(writables, readables, start, end, steps, latency=0.0, plot=None, before_read=None, after_read=None):
|
||||||
|
"""Area Scan: multi-dimentional scan, each positioner is a dimention.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
writables(list of Writable): Positioners set on each step.
|
||||||
|
readables(list of Readable): Sensors to be sampled on each step.
|
||||||
|
start(list of float): start positions of writables.
|
||||||
|
end(list of float): final positions of writables.
|
||||||
|
steps(list of int): number of scan steps for each positioner.
|
||||||
|
latency(float, optional): sleep time in each step before readout, defaults to 0.0.
|
||||||
|
plot(str, optional): plotting context name.
|
||||||
|
before_read (function): callback on each step, before each readout.
|
||||||
|
after_read (function): callback on each step, after each readout.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ArrayList of ScanRecord objects.
|
||||||
|
|
||||||
|
"""
|
||||||
|
latency_ms=int(latency*1000)
|
||||||
|
writables=toList(writables)
|
||||||
|
readables=toList(readables)
|
||||||
|
start=toList(start)
|
||||||
|
end=toList(end)
|
||||||
|
scan = AreaScan(writables,readables, start, end , steps,latency_ms, controller)
|
||||||
|
scan.before_read=before_read
|
||||||
|
scan.after_read=after_read
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
|
||||||
|
def tscan(readables, points, interval, plot=None, before_read=None, after_read=None):
|
||||||
|
"""Time Scan: sensors are sampled in fixed time intervals.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
readables(list of Readable): Sensors to be sampled on each step.
|
||||||
|
points(int): number of samples.
|
||||||
|
interval(float): time interval between readouts.
|
||||||
|
plot(str, optional): plotting context name.
|
||||||
|
before_read (function): callback on each step, before each readout.
|
||||||
|
after_read (function): callback on each step, after each readout.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ArrayList of ScanRecord objects.
|
||||||
|
|
||||||
|
"""
|
||||||
|
latency_ms=int(interval*1000)
|
||||||
|
writables=[]
|
||||||
|
readables=toList(readables)
|
||||||
|
start=[0,]
|
||||||
|
end=[points,]
|
||||||
|
steps=points
|
||||||
|
scan = LineScan(writables,readables, start, end , steps,latency_ms, controller)
|
||||||
|
scan.before_read=before_read
|
||||||
|
scan.after_read=after_read
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
|
||||||
|
def escan(name, plot=None):
|
||||||
|
"""Epics Scan: execute an Epics Scan Record.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
name(str): Name of scan record.
|
||||||
|
plot(str, optional): plotting context name.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
ArrayList of ScanRecord objects.
|
||||||
|
|
||||||
|
"""
|
||||||
|
scan = EpicsScan(name, controller)
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ListReader(Readable):
|
||||||
|
def __init__(self,list, plot):
|
||||||
|
self.counter=0
|
||||||
|
self.list=list
|
||||||
|
def getName(self):
|
||||||
|
return None
|
||||||
|
def read(self):
|
||||||
|
if (self.counter>=len(self.list)):
|
||||||
|
return None;
|
||||||
|
ret = self.list[self.counter]
|
||||||
|
self.counter=self.counter+1
|
||||||
|
return ret
|
||||||
|
|
||||||
|
def plot(data, plot=None):
|
||||||
|
"""Plot a list in a graph.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
data(list): data to be plotted
|
||||||
|
plot(str, optional): plotting context name.
|
||||||
|
|
||||||
|
"""
|
||||||
|
latency_ms=0
|
||||||
|
data=toList(data)
|
||||||
|
writables=[]
|
||||||
|
readables=[ListReader(data,plot),]
|
||||||
|
start=[0,]
|
||||||
|
end=[len(data),]
|
||||||
|
steps=len(data)-1
|
||||||
|
scan = LineScan(writables,readables, start, end , steps,latency_ms, controller)
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
|
||||||
|
channel_types = {
|
||||||
|
'b': "java.lang.Byte",
|
||||||
|
'i': "java.lang.Short",
|
||||||
|
'l': "java.lang.Integer",
|
||||||
|
'd': "java.lang.Double",
|
||||||
|
's': "java.lang.String",
|
||||||
|
|
||||||
|
'b,': "[B",
|
||||||
|
'i,': "[S",
|
||||||
|
'l,': "[I",
|
||||||
|
'd,': "[D",
|
||||||
|
's,': "[Ljava.lang.String;",
|
||||||
|
}
|
||||||
|
|
||||||
|
array_types = {
|
||||||
|
int: "i",
|
||||||
|
long: "l",
|
||||||
|
float:"d",
|
||||||
|
str:Class.forName("java.lang.String"),
|
||||||
|
}
|
||||||
|
|
||||||
|
def caget(name, type='d', size=None):
|
||||||
|
"""Reads an Epics PV.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
name(str): PV name
|
||||||
|
type(str, optional): type of PV, defaults 'd'.
|
||||||
|
Scalar values: 'b', 'i', 'l', 'd', 's'.
|
||||||
|
Array: values: 'b,', 'i,', 'l,', 'd,', 's,'.
|
||||||
|
"""
|
||||||
|
if (size==None):
|
||||||
|
return Epics.get(name, Class.forName(channel_types.get(type,type)))
|
||||||
|
else:
|
||||||
|
return Epics.get(name, Class.forName(channel_types.get(type,type)),size)
|
||||||
|
|
||||||
|
def adjustPutVal(value):
|
||||||
|
if isinstance(value,tuple):
|
||||||
|
value = list(value)
|
||||||
|
if isinstance(value,list):
|
||||||
|
array = PyArray(array_types.get(type(value[0]),'d'))
|
||||||
|
array.fromlist(value)
|
||||||
|
value=array
|
||||||
|
return value
|
||||||
|
|
||||||
|
def caput(name, value):
|
||||||
|
"""Writes to an Epics PV.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
name(str): PV name
|
||||||
|
value(scalar, string or array): new PV value.
|
||||||
|
"""
|
||||||
|
value=adjustPutVal(value)
|
||||||
|
return Epics.put(name, value)
|
||||||
|
|
||||||
|
def caputq(name, value):
|
||||||
|
"""Writes to an Epics PV and does not wait.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
name(str): PV name
|
||||||
|
value(scalar, string or array): new PV value.
|
||||||
|
"""
|
||||||
|
value=adjustPutVal(value)
|
||||||
|
return Epics.putq(name, value)
|
||||||
|
|
||||||
|
def log(log):
|
||||||
|
"""Writes log to data file.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
log(str): Log string
|
||||||
|
|
||||||
|
"""
|
||||||
|
controller.getDataManager().addLog(str(log))
|
||||||
|
|
||||||
|
def startBackgroudTask(script, interval):
|
||||||
|
interval_ms=int(interval*1000)
|
||||||
|
controller.taskManager.create(script,interval_ms)
|
||||||
|
controller.taskManager.start(scrip)
|
||||||
|
|
||||||
|
def stopBackgroudTask(script):
|
||||||
|
controller.taskManager.stop(scrip)
|
||||||
|
|
||||||
|
execfile(controller.setup.getScriptPath()+"/local.py")
|
||||||
6
script/test/calc.groovy
Normal file
6
script/test/calc.groovy
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
def calc(a){
|
||||||
|
a*2
|
||||||
|
}
|
||||||
|
|
||||||
5
script/test/calc.js
Normal file
5
script/test/calc.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
function calc(a) {
|
||||||
|
return a * 5;
|
||||||
|
}
|
||||||
3
script/test/calc.py
Normal file
3
script/test/calc.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
def calc(a):
|
||||||
|
return a*2
|
||||||
|
|
||||||
7
script/test/cls.groovy
Normal file
7
script/test/cls.groovy
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
package script
|
||||||
|
class cls {
|
||||||
|
double val = 1.0
|
||||||
|
void exec(){
|
||||||
|
println "Exec"
|
||||||
|
}
|
||||||
|
}
|
||||||
4
script/test/cls.py
Normal file
4
script/test/cls.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
class cls:
|
||||||
|
def execute(self):
|
||||||
|
print "Execute"
|
||||||
|
|
||||||
3
script/test/scan.py
Normal file
3
script/test/scan.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
def calc(a):
|
||||||
|
return a*2
|
||||||
|
|
||||||
31
script/test/script.groovy
Normal file
31
script/test/script.groovy
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
def function(a){
|
||||||
|
a*2
|
||||||
|
}
|
||||||
|
//evaluate (new File("calc.groovy"))
|
||||||
|
//evaluate (new File("cls.groovy"))
|
||||||
|
|
||||||
|
println "--------------"
|
||||||
|
|
||||||
|
lib.load "calc"
|
||||||
|
cls = lib.load "cls"
|
||||||
|
|
||||||
|
|
||||||
|
//This is how to load a new class dinamically
|
||||||
|
// ClassLoader parent = lib.class.getClassLoader();
|
||||||
|
// groovy.lang.GroovyClassLoader loader = new groovy.lang.GroovyClassLoader(parent);
|
||||||
|
// Class cls = loader.parseClass(new File("script\\cls.groovy"));
|
||||||
|
|
||||||
|
|
||||||
|
println dev.get()
|
||||||
|
println dev2.val
|
||||||
|
println calc(6)
|
||||||
|
|
||||||
|
|
||||||
|
//cls = Class.forName('cls')
|
||||||
|
//obj = new cls()
|
||||||
|
obj = cls.newInstance()
|
||||||
|
println obj.val
|
||||||
|
obj.exec()
|
||||||
|
|
||||||
|
|
||||||
13
script/test/script.js
Normal file
13
script/test/script.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
function calcx(a) {
|
||||||
|
return a * 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
print('Hello, World')
|
||||||
|
lib.load ("calc")
|
||||||
|
|
||||||
|
|
||||||
|
a=3
|
||||||
|
a
|
||||||
|
print (dev.get())
|
||||||
|
print (dev2.val)
|
||||||
|
print (calc(5))
|
||||||
42
script/test/script.py
Normal file
42
script/test/script.py
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
|
#To add library folders from within the script
|
||||||
|
#sys.path.append("./site-packages")
|
||||||
|
|
||||||
|
|
||||||
|
import requests
|
||||||
|
r = requests.get('https://api.github.com', auth=('user', 'pass'))
|
||||||
|
print r.status_code
|
||||||
|
print r.headers['content-type']
|
||||||
|
r.close()
|
||||||
|
|
||||||
|
|
||||||
|
def calc2(a):
|
||||||
|
return a*2
|
||||||
|
time.sleep(2)
|
||||||
|
#import os
|
||||||
|
#print os.environ
|
||||||
|
#import calc
|
||||||
|
|
||||||
|
|
||||||
|
lib.load("calc")
|
||||||
|
lib.load("cls")
|
||||||
|
time.sleep(2)
|
||||||
|
for x in range(3):
|
||||||
|
print x
|
||||||
|
while(True):
|
||||||
|
print x*2
|
||||||
|
break
|
||||||
|
time.sleep(2)
|
||||||
|
x=cls()
|
||||||
|
x.execute()
|
||||||
|
print dev.take()
|
||||||
|
print dev2.val
|
||||||
|
time.sleep(1)
|
||||||
|
print calc(4)
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
It lives!!!!
|
||||||
|
"""
|
||||||
53
script/test/startup.groovy
Normal file
53
script/test/startup.groovy
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import ch.psi.pshell.scan.LineScan;
|
||||||
|
import ch.psi.pshell.scan.AreaScan;
|
||||||
|
|
||||||
|
|
||||||
|
def sleep(millis){
|
||||||
|
Thread.sleep(millis);
|
||||||
|
}
|
||||||
|
|
||||||
|
def toArray(obj){
|
||||||
|
/* if (!obj.getClass().isArray()){
|
||||||
|
arr = java.lang.reflect.Array.newInstance(obj.getClass(), 1);
|
||||||
|
arr[0]= obj;
|
||||||
|
obj=arr
|
||||||
|
}*/
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def scan(writables, readables, start, end, steps, latency_ms=0, plot=null){
|
||||||
|
writables=toList(writables)
|
||||||
|
readables=toList(readables)
|
||||||
|
start=toList(start)
|
||||||
|
end=toList(end)
|
||||||
|
scan = LineScan(writables,readables, start, end , steps,latency_ms, controller)
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
}
|
||||||
|
|
||||||
|
def tscan(readables, points, interval_ms, plot=null){
|
||||||
|
writables=[]
|
||||||
|
//readables=toList(readables)
|
||||||
|
readables=[readables,]
|
||||||
|
start=[0]
|
||||||
|
|
||||||
|
end=[points]
|
||||||
|
steps=points
|
||||||
|
scan = LineScan(writables,readables, start, end , steps,interval_ms, controller)
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
}
|
||||||
|
|
||||||
|
def ascan(writables, readables, start, end, steps, latency_ms0, plot=null){
|
||||||
|
writables=toList(writables)
|
||||||
|
readables=toList(readables)
|
||||||
|
start=toList(start)
|
||||||
|
end=toList(end)
|
||||||
|
scan = AreaScan(writables,readables, start, end , steps,latency_ms, controller)
|
||||||
|
scan.setPlotName(plot)
|
||||||
|
scan.start()
|
||||||
|
return scan.getResult()
|
||||||
|
}
|
||||||
5
script/test/test1.py
Normal file
5
script/test/test1.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
"""
|
||||||
|
Line Scan
|
||||||
|
"""
|
||||||
|
|
||||||
|
a= lscan(inp,(sin,out,arr),0,40,20,0.1)
|
||||||
16
script/test/test2.py
Normal file
16
script/test/test2.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""
|
||||||
|
Line Scan with 2 writables and triggering
|
||||||
|
"""
|
||||||
|
|
||||||
|
index=0
|
||||||
|
|
||||||
|
def BeforeReadout():
|
||||||
|
global index
|
||||||
|
print "Frame = " + str(index)
|
||||||
|
index=index+1
|
||||||
|
#log("trigger " + index)
|
||||||
|
caput("TESTIOC:TESTBO:MyBO","On")
|
||||||
|
caput("TESTIOC:TESTBO:MyBO","Off")
|
||||||
|
|
||||||
|
|
||||||
|
a= lscan((motor,inp),(sin,out,arr),(0,0),(4,40),20,0.1, before_read=BeforeReadout)
|
||||||
12
script/test/test3.py
Normal file
12
script/test/test3.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
"""
|
||||||
|
Processing and plotting scan data
|
||||||
|
"""
|
||||||
|
|
||||||
|
inp.write(0.0)
|
||||||
|
scan1= lscan(inp,(sin,out,arr),0,40,20,0.1,"Scan 1")
|
||||||
|
scan2= lscan(inp,(sin,out,arr),0,40,20,0.1,"Scan 2")
|
||||||
|
result=[]
|
||||||
|
for i in range(20):
|
||||||
|
result.append(scan1[i].values[0]+scan2[i].values[0])
|
||||||
|
plot(result)
|
||||||
|
print result
|
||||||
11
script/test/test4.py
Normal file
11
script/test/test4.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
"""
|
||||||
|
Vector Scan
|
||||||
|
"""
|
||||||
|
|
||||||
|
vector = [ [1,1] , [1,2] , [1,3] , [1,4] ,
|
||||||
|
[1.5,2.5] ,
|
||||||
|
[2,1] , [2,2] , [2,3] , [2,4] ,
|
||||||
|
[2.5,2.5] ,
|
||||||
|
[3,1] , [3,2] , [3,3] , [3,4] ]
|
||||||
|
|
||||||
|
a= vscan((dev,inp),(sin,out),vector,0.1)
|
||||||
5
script/test/test5.py
Normal file
5
script/test/test5.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
"""
|
||||||
|
Area Scan
|
||||||
|
"""
|
||||||
|
|
||||||
|
ascan((dev,out),(sin,out,arr),(0,10),(20,30),(100,100))
|
||||||
36
script/test/test6.py
Normal file
36
script/test/test6.py
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
"""
|
||||||
|
Creating pseudo-devices
|
||||||
|
"""
|
||||||
|
import time
|
||||||
|
|
||||||
|
sin_val=None
|
||||||
|
|
||||||
|
class Sensor(ch.psi.pshell.dev.Readable):
|
||||||
|
def read(self):
|
||||||
|
global sin_val
|
||||||
|
return sin_val + time.clock()
|
||||||
|
def getName(self):
|
||||||
|
return "Sensor"
|
||||||
|
|
||||||
|
class Positioner(ch.psi.pshell.dev.Writable):
|
||||||
|
def write(self,pos):
|
||||||
|
print pos
|
||||||
|
def getName(self):
|
||||||
|
return "Positioner"
|
||||||
|
|
||||||
|
class Listener (ch.psi.pshell.dev.DeviceListener):
|
||||||
|
def onStateChanged(self, device, state, former):
|
||||||
|
pass
|
||||||
|
def onValueChanged(self, device, value, former):
|
||||||
|
global sin_val
|
||||||
|
sin_val=value
|
||||||
|
|
||||||
|
sensor=Sensor()
|
||||||
|
positioner=Positioner()
|
||||||
|
listener = Listener()
|
||||||
|
|
||||||
|
sin.addListener(listener)
|
||||||
|
try:
|
||||||
|
a= lscan((inp,positioner),(sin,sensor),(0,0),(40,10),20,0.1)
|
||||||
|
finally:
|
||||||
|
sin.removeListener(listener)
|
||||||
Reference in New Issue
Block a user