This commit is contained in:
gac-x11ma
2019-11-04 17:05:22 +01:00
parent 5e64b22938
commit f8ad14212b
11 changed files with 231 additions and 116 deletions
+30 -30
View File
@@ -1,38 +1,38 @@
#Wed May 15 13:48:57 CEST 2019
autoSaveScanData=true
commandExecutionEvents=false
createSessionFiles=false
dataLayout=ch.psi.fda.LayoutFDA
dataPath={data}/{year}_{month}/{date}
dataProvider=ch.psi.fda.ProviderFDA
dataScanFlushRecords=true
dataScanPreserveTypes=false
dataScanReleaseRecords=false
dataServerPort=-1
depthDimension=0
devicePoolFile={config}/devices.properties
deviceUpdateStrategyFile={config}/update.properties
hideServerMessages=false
hostName=null
#Mon Nov 04 17:04:36 CET 2019
imageSourcesFile={config}/imaging.properties
instanceName=
logDaysToLive=-1
logLevel=Info
autoSaveScanData=true
simulation=false
commandExecutionEvents=false
logDaysToLive=30
userAuthenticator=
logLevelConsole=Off
logPath={logs}/{date}_{time}
notificationLevel=null
saveCommandStatistics=false
scanStreamerPort=-1
scanStreamingPort=-1
serverEnabled=false
serverPort=8080
simulation=false
tasksFile={config}/tasks.properties
terminalEnabled=false
terminalPort=3579
userAuthenticator=
devicePoolFile={config}/devices.properties
versionTrackingManual=true
hostName=null
userManagement=true
instanceName=SIM
dataServerPort=-1
hideServerMessages=false
serverPort=8080
versionTrackingEnabled=true
dataPath={data}/{year}_{month}/{date}
serverEnabled=false
dataScanReleaseRecords=false
depthDimension=0
dataScanPreserveTypes=false
logLevel=Info
dataScanFlushRecords=true
logPath={logs}/{date}_{time}
dataLayout=ch.psi.fda.LayoutFDA
deviceUpdateStrategyFile={config}/update.properties
terminalEnabled=false
notificationLevel=null
terminalPort=3579
tasksFile={config}/tasks.properties
createSessionFiles=false
versionTrackingLogin={context}/svcusr-hlapp_robot
versionTrackingManual=false
versionTrackingRemote=git@git.psi.ch\:pshell_config/x11ma.git
dataProvider=ch.psi.fda.ProviderFDA
saveCommandStatistics=false
+15 -13
View File
@@ -7,22 +7,22 @@ pol_done=ch.psi.pshell.epics.ChannelString|X11MA-ID2:DONE|Read||true
energy=ch.psi.pshell.epics.ChannelDouble|X11PHS-E:GO.A|||
id_error=ch.psi.pshell.epics.ChannelInteger|X11MA-ID2-PLC:ERROR|||true
beam_status=ch.psi.pshell.epics.DiscretePositioner|ACOAU-ACCU:OP-MODE|Read||true
edata=ch.psi.pshell.epics.ChannelDoubleArray|EDATA 3|Read||
count=ch.psi.pshell.epics.ChannelInteger|COUNT|Read||true
data=ch.psi.pshell.epics.ChannelDoubleArray|DATA 3|Read||
fdata=ch.psi.pshell.epics.ChannelDoubleArray|FDATA 3|Read||
idata=ch.psi.pshell.epics.ChannelDoubleArray|IDATA 3|Read||
#edata=ch.psi.pshell.epics.ChannelDoubleArray|EDATA 3|Read||
#count=ch.psi.pshell.epics.ChannelInteger|COUNT|Read||true
#data=ch.psi.pshell.epics.ChannelDoubleArray|DATA 3|Read||
#fdata=ch.psi.pshell.epics.ChannelDoubleArray|FDATA 3|Read||
#idata=ch.psi.pshell.epics.ChannelDoubleArray|IDATA 3|Read||
Keithley_3_raw=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI12:READOUT|Read||true
Keithley_2_raw=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI11:READOUT|Read||true
Keithley_1_raw=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI10:READOUT|Read||true
TRX_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRX.RBV|Read||true
THT_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:THT.RBV|Read||true
TRY_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRY.RBV|Read||true
TRZ_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRZ.RBV|Read||true
TRX=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRX|||true
TRY=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRY|||true
THT=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:THT.RBV|||true
TRZ=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRZ|||true
#TRX_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRX.RBV|Read||true
#THT_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:THT.RBV|Read||true
#TRY_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRY.RBV|Read||true
#TRZ_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRZ.RBV|Read||true
#TRX=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRX|||true
#TRY=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRY|||true
#THT=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:THT.RBV|||true
#TRZ=ch.psi.pshell.epics.ChannelDouble|X11MA-VME-ES4:TRZ|||true
Temp=ch.psi.pshell.epics.ChannelDouble|X11MA-ES3-LSCI:TEMP_RBV|Read||true
#FE=ch.psi.pshell.epics.Slit|X11MA-FE:DSAPER|Read||true
ES=ch.psi.pshell.epics.ChannelDouble|X11MA-OP2-SL:TRY.RBV|Read||true
@@ -44,3 +44,5 @@ keithley_1a=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC1|Read||true
keithley_2a=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC2|Read||true
keithley_3a=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC3|Read||true
#otf_start=ch.psi.pshell.epics.ChannelInteger|X11MA-OTF:GO|||true
$eiger=ch.psi.pshell.epics.AreaDetector|X11MA-ES3-SD1|||true
image=ch.psi.pshell.imaging.CameraSource|eiger|||true
+5 -2
View File
@@ -1,4 +1,7 @@
OTFScanBase.java=disabled
EnergyScanBase.java=disabled
DelayScanBase.java=disabled
EnergyScan_TBT.java=disabled
DelayScan.java=enabled
EnergyScan.java=enabled
DelayScan.java=disabled
EnergyScan.java=disabled
Test.java=disabled
+2
View File
@@ -0,0 +1,2 @@
#Thu Oct 31 11:14:59 CET 2019
FileSequentialNumber=10
+25
View File
@@ -0,0 +1,25 @@
#Thu Oct 31 10:40:48 CET 2019
colormapLogarithmic=false
spatialCalScaleX=NaN
spatialCalScaleY=NaN
rescaleOffset=0.0
roiWidth=-1
colormap=Grayscale
invert=false
colormapMin=NaN
rotationCrop=false
roiHeight=-1
colormapAutomatic=true
roiY=0
roiX=0
spatialCalOffsetY=NaN
spatialCalOffsetX=NaN
scale=1.0
grayscale=false
colormapMax=NaN
rotation=0.0
rescaleFactor=1.0
spatialCalUnits=null
flipVertically=false
flipHorizontally=false
transpose=false
+11 -9
View File
@@ -1,15 +1,17 @@
#Fri Dec 15 14:09:52 CET 2017
accessType=ReadWrite
defaultSpeed=1.0
estbilizationDelay=0
maxSpeed=10.0
maxValue=10.0
minSpeed=0.1
minValue=-10.0
#Tue Oct 29 14:00:16 CET 2019
offset=0.0
maxValue=10.0
precision=2
resolution=NaN
rotation=false
scale=1.0
estbilizationDelay=0
maxSpeed=10.0
resolution=NaN
accessType=ReadWrite
startRetries=1
minValue=-10.0
unit=mm
defaultSpeed=1.0
sign_bit=0
monitorByPosition=false
minSpeed=0.1
+11 -9
View File
@@ -1,15 +1,17 @@
#Fri Dec 15 14:09:52 CET 2017
accessType=ReadWrite
defaultSpeed=1.0
estbilizationDelay=0
maxSpeed=10.0
maxValue=10.0
minSpeed=0.1
minValue=-10.0
#Tue Oct 29 14:00:16 CET 2019
offset=0.0
maxValue=10.0
precision=2
resolution=NaN
rotation=false
scale=1.0
estbilizationDelay=0
maxSpeed=10.0
resolution=NaN
accessType=ReadWrite
startRetries=1
minValue=-10.0
unit=mm
defaultSpeed=1.0
sign_bit=0
monitorByPosition=false
minSpeed=0.1
+8 -7
View File
@@ -1,9 +1,10 @@
#Fri Dec 15 14:09:53 CET 2017
maxValue=1000.0
#Tue Oct 29 14:00:16 CET 2019
minValue=0.0
offset=0.0
precision=-1
resolution=NaN
rotation=false
scale=1.0
unit=mm
offset=0.0
maxValue=1000.0
precision=-1
rotation=false
sign_bit=0
scale=1.0
resolution=NaN
+24 -23
View File
@@ -1,28 +1,29 @@
#Fri Feb 03 16:28:10 CET 2017
colormap=Temperature
colormapAutomatic=true
colormapMax=255.0
colormapMin=0.0
dataMonitoring=false
dataPolling=100
flipHorizontally=false
flipVertically=false
grayscale=false
invert=false
pollingBackground=false
pollingInterval=0
rescaleFactor=1.0
rescaleOffset=0.0
roiHeight=-1
roiWidth=-1
roiX=0
roiY=0
rotation=0.0
rotationCrop=false
scale=1.0
spatialCalOffsetX=NaN
#Tue Oct 29 14:00:16 CET 2019
spatialCalOffsetY=NaN
spatialCalOffsetX=NaN
dataPolling=100
pollingInterval=0
colormapLogarithmic=false
scale=1.0
grayscale=false
spatialCalScaleX=NaN
spatialCalScaleY=NaN
colormapMax=255.0
rescaleOffset=0.0
roiWidth=-1
colormap=Temperature
pollingBackground=false
invert=false
colormapMin=0.0
rotation=0.0
rotationCrop=false
rescaleFactor=1.0
spatialCalUnits=mm
flipVertically=false
roiHeight=-1
flipHorizontally=false
colormapAutomatic=true
dataMonitoring=false
roiY=0
roiX=0
transpose=false
+24 -23
View File
@@ -1,28 +1,29 @@
#Fri Feb 03 16:28:10 CET 2017
colormap=Grayscale
colormapAutomatic=true
colormapMax=255.0
colormapMin=0.0
dataMonitoring=false
dataPolling=100
flipHorizontally=false
flipVertically=false
grayscale=false
invert=false
pollingBackground=false
pollingInterval=0
rescaleFactor=1.0
rescaleOffset=0.0
roiHeight=-1
roiWidth=-1
roiX=0
roiY=0
rotation=0.0
rotationCrop=false
scale=1.0
spatialCalOffsetX=NaN
#Tue Oct 29 14:00:16 CET 2019
spatialCalOffsetY=NaN
spatialCalOffsetX=NaN
dataPolling=100
pollingInterval=0
colormapLogarithmic=false
scale=1.0
grayscale=false
spatialCalScaleX=NaN
spatialCalScaleY=NaN
colormapMax=255.0
rescaleOffset=0.0
roiWidth=-1
colormap=Grayscale
pollingBackground=false
invert=false
colormapMin=0.0
rotation=0.0
rotationCrop=false
rescaleFactor=1.0
spatialCalUnits=mm
flipVertically=false
roiHeight=-1
flipHorizontally=false
colormapAutomatic=true
dataMonitoring=false
roiY=0
roiX=0
transpose=false
+76
View File
@@ -0,0 +1,76 @@
from ijutils import *
from ch.psi.pshell.imaging.Overlays import *
from ch.psi.pshell.imaging.Utils import *
import ch.psi.pshell.imaging.Pen as Pen
import java.awt.Rectangle as Rectangle
import ch.psi.pshell.imaging.Data as Data
###############################################################################
# ROI Integration
###############################################################################
def integrate_roi(source, x,y, w, h):
if source.data is None:
source.update()
roi = source.data.getRoi(Rectangle(x,y, w, h))
return roi.integrate(False)
class RoiIntensity(ReadonlyRegisterBase):
def __init__(self, name, source, x,y, w, h):
ReadonlyRegisterBase.__init__(self, name)
self.source=source
self.roi = x,y, w, h
def doRead(self):
x,y, w, h = self.roi
return integrate_roi(self.source, x,y, w, h)
###############################################################################
# Frame integration
###############################################################################
def get_image(source, roi=None, wait_next=False):
if wait_next:
source.waitNext(-1)
ret = load_image(Utils.grayscale(source.output, Rectangle(roi[0], roi[1], roi[2], roi[3]) if (roi is not None) else None))
return ret
def grab_frames(source, samples, roi=None, wait_next=False, sleep=0):
frames = []
for i in range(samples):
if sleep>0:
time.sleep(sleep)
aux = get_image(source, roi, wait_next)
frames.append(aux)
return frames
def average_frames(source, samples=1, roi=None, wait_next=False, sleep=0, as_float=True):
return average_ips(grab_frames(source, samples, roi, wait_next, sleep), as_float)
def integrate_frames(source, samples=1, roi=None, wait_next=False, sleep=0, as_float=True):
return integrate_ips(grab_frames(source, samples, roi, wait_next, sleep), as_float)
print integrate_roi(image, 10, 5, 20, 10)
add_device(RoiIntensity("Region1", image, 10, 5, 20, 10), True)
add_device(RoiIntensity("Region2", image, 10, 5, 40, 20), True)
import ch.psi.pshell.data.ProviderCSV as ProviderCSV
ProviderCSV.setDefaultItemSeparator(" ")
tscan((Region1, Region2), 10, 0.1, layout="table", provider = "csv")
ret = grab_frames(image, 10, sleep=0.1)
av = average_ips(ret, None, True)
data = get_ip_array(av)
plot(data)
save_image(av, "{images}/float.tif","tiff")
av = average_ips(ret, None, False)
save_image(av, "{images}/int.tif","tiff")