diff --git a/config/AbsortionSpectrum/Co L edge-NCM-2.abs b/config/AbsortionSpectrum/Co L edge-NCM-2.abs
new file mode 100644
index 0000000..9d93231
Binary files /dev/null and b/config/AbsortionSpectrum/Co L edge-NCM-2.abs differ
diff --git a/config/AbsortionSpectrum/P-SCl-L edge-NCM.abs b/config/AbsortionSpectrum/P-SCl-L edge-NCM.abs
new file mode 100644
index 0000000..2a87b4d
Binary files /dev/null and b/config/AbsortionSpectrum/P-SCl-L edge-NCM.abs differ
diff --git a/config/devices.properties b/config/devices.properties
index c3927c8..41073ac 100644
--- a/config/devices.properties
+++ b/config/devices.properties
@@ -1,3 +1,4 @@
+Grating_ch=ch.psi.pshell.epics.ChannelString|X11MA-PGM-GRCH:GRATING|||true
DiffOrd=ch.psi.pshell.epics.ChannelString|X11MA-PGM:difforder0|||true
voltage=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI13:SETVOLTAGE|||true
eiger=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-SD1|||true
@@ -86,6 +87,7 @@ CADC4=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC4|Read||true
#CADC6=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC6|Read||true
#CADC7=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC7|Read||true
girder_x=ch.psi.pshell.epics.Positioner|X11MA-HG:X_SET X11MA-HG:X1|||true
+girder_y=ch.psi.pshell.epics.Positioner|X11MA-HG:Y_SET X11MA-HG:Y1|||true
temp_readout=ch.psi.pshell.epics.ReadonlyProcessVariable|X11MA-PC-SW:Pt100-K|||true
cam2=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-CAM2|||true
raw=ch.psi.pshell.imaging.CameraSource|eiger|||true
diff --git a/config/preferences.json b/config/preferences.json
index 83d3e97..f8eda6f 100644
--- a/config/preferences.json
+++ b/config/preferences.json
@@ -46,7 +46,7 @@
"simpleEditor" : false,
"hideEditorLineNumbers" : false,
"hideEditorContextMenu" : false,
- "consoleLocation" : "Left",
+ "consoleLocation" : "Status",
"dataPanelLocation" : null,
"openDataFilesInDocTab" : false,
"noVariableEvaluationPropagation" : false,
@@ -55,8 +55,8 @@
"scanPlotDisabled" : false,
"scanTableDisabled" : false,
"cachedDataPanel" : false,
- "dataExtensions" : "",
- "dataSubFiles" : "",
+ "dataExtensions" : "log txt xml py png tif tiff mat",
+ "dataSubFiles" : "*",
"hideFileName" : false,
"showEmergencyStop" : false,
"showHomingButtons" : false,
diff --git a/config/scicat.properties b/config/scicat.properties
index 04f1fe5..39cd0cc 100755
--- a/config/scicat.properties
+++ b/config/scicat.properties
@@ -1,7 +1,7 @@
-#Thu Jul 01 12:57:32 CEST 2021
+#Mon Oct 17 12:47:34 CEST 2022
environment=prod
testParameters=-testenv -user slssim\:4DMGBarXmr
-sourceFolder=/sls/X11MA/Data1/e19172
+sourceFolder=/sls/X11MA/Data1/e19687
prodParameters=\ -user slssim\:4DMGBarXmr
devParameters=-devenv -user slssim\:slssim
ownerGroup=
diff --git a/config/session_metadata.properties b/config/session_metadata.properties
index 3c3e8ac..a542036 100755
--- a/config/session_metadata.properties
+++ b/config/session_metadata.properties
@@ -1,5 +1,5 @@
-#Fri Sep 16 10:47:58 CEST 2022
+#Wed Nov 02 13:46:17 CET 2022
keywords=List;[]
-ownerEmail=String;arantxa.fraile@ub.edu
+ownerEmail=String;joanna.olszowka@jh-inst.cas.cz
contactEmail=String;armin.kleibert@psi.ch
-owner=String;arantxa fraile
+owner=String;Joanna Olszowka
diff --git a/config/sessions.properties b/config/sessions.properties
index eb18068..00a81b1 100644
--- a/config/sessions.properties
+++ b/config/sessions.properties
@@ -1,3 +1,2 @@
-#Fri Sep 16 10:48:13 CEST 2022
+#Fri Oct 07 10:08:47 CEST 2022
SessionCounter=78
-CurrentSession=78
diff --git a/config/settings.properties b/config/settings.properties
index 4e70178..3236948 100644
--- a/config/settings.properties
+++ b/config/settings.properties
@@ -1,31 +1,26 @@
-#Wed Oct 05 09:33:02 CEST 2022
-HARMONIC_ID_1=1
+#Wed Nov 09 08:38:27 CET 2022
RSYNC_USER=
-CFF=2.250
+CFF=2.25
OUTLIERS_THRESHOLD=1000000000
-NORM_FILE=/sls/X11MA/data/e19357/Data1/2021_10
+NORM_FILE=/sls/X11MA/data/e18927/Data1/2022_10/20221017/20221017_Take_Image/i221017_042/i221017_042\#001.tif
AUTO_SWITCH_VALVE=false
-DRY_RUN=false
-POL_ID_2=Circ_Minus
-OFFSET_ID_1=0.0
-ID=PGM_ID1_ID2
-OFFSET_ID_2=0.0
+DRY_RUN=true
+POL_ID_2=Lin_Hor
+ID=ID2
proposal=proposal
-ENERGY=642.0
+ENERGY=800
proposer=proposer
-GRATING=G2_1200
-POL_ID_1=Circ_Plus
+GRATING=G3_600
+image_shift_angle=1.0963912950426833
RSYNC_HOST=
sample=sample
RSYNC_PATH=
pgroup=pgroup
AUTO_SWITCH_BEAMLINE=false
AUTO_SWITCH_SHUTTER=true
-ALPHA_ID_2=0.0
-ALPHA_ID_1=0.0
RSYNC_DEL=true
DIFF_ORD=1
-AVERAGING_DETECTOR=false
+image_shift_scale=3.296579966879864
+AVERAGING_DETECTOR=true
FdaBrowser=false
authors=author1|author2
-HARMONIC_ID_2=1
diff --git a/config/variables.properties b/config/variables.properties
index d0343f2..2acbc84 100644
--- a/config/variables.properties
+++ b/config/variables.properties
@@ -1,4 +1,4 @@
-#Thu Sep 22 15:59:51 CEST 2022
-LastRunDate=220922
-FileSequentialNumber=15766
-DaySequentialNumber=86
+#Wed Nov 09 14:48:58 CET 2022
+LastRunDate=221109
+FileSequentialNumber=17887
+DaySequentialNumber=13
diff --git a/devices/girder_x.properties b/devices/girder_x.properties
index a65a4f6..5e99f13 100644
--- a/devices/girder_x.properties
+++ b/devices/girder_x.properties
@@ -1,11 +1,11 @@
-#Mon Aug 08 11:48:07 CEST 2022
-minValue=-2.0
-unit=mm
+#Fri Oct 07 16:45:18 CEST 2022
offset=0.0
-maxValue=3.0
+maxValue=4.0
rotation=false
precision=3
-sign_bit=0
scale=1.0
-description=null
+description=x set point
resolution=0.005
+minValue=-4.0
+unit=mm
+sign_bit=0
diff --git a/devices/girder_y.properties b/devices/girder_y.properties
new file mode 100644
index 0000000..06c971b
--- /dev/null
+++ b/devices/girder_y.properties
@@ -0,0 +1,11 @@
+#Fri Oct 07 14:17:02 CEST 2022
+minValue=-3.0
+unit=mm
+offset=0.0
+maxValue=3.0
+rotation=false
+precision=3
+sign_bit=0
+scale=1.0
+description=y set point
+resolution=NaN
diff --git a/devices/i221108_129#001.tif.properties b/devices/i221108_129#001.tif.properties
new file mode 100644
index 0000000..e9c3813
--- /dev/null
+++ b/devices/i221108_129#001.tif.properties
@@ -0,0 +1,20 @@
+#Tue Nov 08 16:30:50 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221108_134#002.tif.properties b/devices/i221108_134#002.tif.properties
new file mode 100644
index 0000000..312d0c1
--- /dev/null
+++ b/devices/i221108_134#002.tif.properties
@@ -0,0 +1,20 @@
+#Tue Nov 08 16:55:37 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221108_134#003.tif.properties b/devices/i221108_134#003.tif.properties
new file mode 100644
index 0000000..ffef656
--- /dev/null
+++ b/devices/i221108_134#003.tif.properties
@@ -0,0 +1,20 @@
+#Tue Nov 08 16:55:38 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221108_134.tif.properties b/devices/i221108_134.tif.properties
new file mode 100644
index 0000000..66780bf
--- /dev/null
+++ b/devices/i221108_134.tif.properties
@@ -0,0 +1,20 @@
+#Tue Nov 08 16:58:36 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221108_134_shifted.tif.properties b/devices/i221108_134_shifted.tif.properties
new file mode 100644
index 0000000..f4c2210
--- /dev/null
+++ b/devices/i221108_134_shifted.tif.properties
@@ -0,0 +1,20 @@
+#Tue Nov 08 16:58:33 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_002.tif.properties b/devices/i221109_002.tif.properties
new file mode 100644
index 0000000..0d9d609
--- /dev/null
+++ b/devices/i221109_002.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 08:39:06 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_002_shifted.tif.properties b/devices/i221109_002_shifted.tif.properties
new file mode 100644
index 0000000..55caffb
--- /dev/null
+++ b/devices/i221109_002_shifted.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 08:39:05 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_006.tif.properties b/devices/i221109_006.tif.properties
new file mode 100644
index 0000000..d4b432b
--- /dev/null
+++ b/devices/i221109_006.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 09:11:46 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_006_shifted.tif.properties b/devices/i221109_006_shifted.tif.properties
new file mode 100644
index 0000000..83ac1d4
--- /dev/null
+++ b/devices/i221109_006_shifted.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 09:11:44 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_007.tif.properties b/devices/i221109_007.tif.properties
new file mode 100644
index 0000000..ed66482
--- /dev/null
+++ b/devices/i221109_007.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 09:45:02 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_007_shifted.tif.properties b/devices/i221109_007_shifted.tif.properties
new file mode 100644
index 0000000..4bf488f
--- /dev/null
+++ b/devices/i221109_007_shifted.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 09:45:01 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#001.tif.properties b/devices/i221109_009#001.tif.properties
new file mode 100644
index 0000000..8f76185
--- /dev/null
+++ b/devices/i221109_009#001.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:03 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#002.tif.properties b/devices/i221109_009#002.tif.properties
new file mode 100644
index 0000000..9398be2
--- /dev/null
+++ b/devices/i221109_009#002.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:25 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#003.tif.properties b/devices/i221109_009#003.tif.properties
new file mode 100644
index 0000000..d536804
--- /dev/null
+++ b/devices/i221109_009#003.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:05 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#004.tif.properties b/devices/i221109_009#004.tif.properties
new file mode 100644
index 0000000..d536804
--- /dev/null
+++ b/devices/i221109_009#004.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:05 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#005.tif.properties b/devices/i221109_009#005.tif.properties
new file mode 100644
index 0000000..5e43b0f
--- /dev/null
+++ b/devices/i221109_009#005.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:06 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#006.tif.properties b/devices/i221109_009#006.tif.properties
new file mode 100644
index 0000000..7b5c361
--- /dev/null
+++ b/devices/i221109_009#006.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:32:47 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#007.tif.properties b/devices/i221109_009#007.tif.properties
new file mode 100644
index 0000000..83c7806
--- /dev/null
+++ b/devices/i221109_009#007.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:07 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#008.tif.properties b/devices/i221109_009#008.tif.properties
new file mode 100644
index 0000000..a84b33d
--- /dev/null
+++ b/devices/i221109_009#008.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:08 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#009.tif.properties b/devices/i221109_009#009.tif.properties
new file mode 100644
index 0000000..a5b77f7
--- /dev/null
+++ b/devices/i221109_009#009.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:33 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009#010.tif.properties b/devices/i221109_009#010.tif.properties
new file mode 100644
index 0000000..16dd7ef
--- /dev/null
+++ b/devices/i221109_009#010.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:31:09 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009.tif.properties b/devices/i221109_009.tif.properties
new file mode 100644
index 0000000..c99504b
--- /dev/null
+++ b/devices/i221109_009.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:32:20 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_009_shifted.tif.properties b/devices/i221109_009_shifted.tif.properties
new file mode 100644
index 0000000..f1b766c
--- /dev/null
+++ b/devices/i221109_009_shifted.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:32:21 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#002.tif.properties b/devices/i221109_010#002.tif.properties
new file mode 100644
index 0000000..3f4a456
--- /dev/null
+++ b/devices/i221109_010#002.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:40 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#003.tif.properties b/devices/i221109_010#003.tif.properties
new file mode 100644
index 0000000..006ecc3
--- /dev/null
+++ b/devices/i221109_010#003.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:44 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#004.tif.properties b/devices/i221109_010#004.tif.properties
new file mode 100644
index 0000000..ea497d5
--- /dev/null
+++ b/devices/i221109_010#004.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:52 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#005.tif.properties b/devices/i221109_010#005.tif.properties
new file mode 100644
index 0000000..ac18b1e
--- /dev/null
+++ b/devices/i221109_010#005.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:53 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#006.tif.properties b/devices/i221109_010#006.tif.properties
new file mode 100644
index 0000000..f45a8e1
--- /dev/null
+++ b/devices/i221109_010#006.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:54 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#007.tif.properties b/devices/i221109_010#007.tif.properties
new file mode 100644
index 0000000..f45a8e1
--- /dev/null
+++ b/devices/i221109_010#007.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:54 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#008.tif.properties b/devices/i221109_010#008.tif.properties
new file mode 100644
index 0000000..3648063
--- /dev/null
+++ b/devices/i221109_010#008.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:55 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#009.tif.properties b/devices/i221109_010#009.tif.properties
new file mode 100644
index 0000000..9051ac8
--- /dev/null
+++ b/devices/i221109_010#009.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:56 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_010#010.tif.properties b/devices/i221109_010#010.tif.properties
new file mode 100644
index 0000000..45b2fce
--- /dev/null
+++ b/devices/i221109_010#010.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:35:57 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_012#001.tif.properties b/devices/i221109_012#001.tif.properties
new file mode 100644
index 0000000..87c3304
--- /dev/null
+++ b/devices/i221109_012#001.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:48:33 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_012#002.tif.properties b/devices/i221109_012#002.tif.properties
new file mode 100644
index 0000000..09b0f3b
--- /dev/null
+++ b/devices/i221109_012#002.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:48:35 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_012#003.tif.properties b/devices/i221109_012#003.tif.properties
new file mode 100644
index 0000000..09b0f3b
--- /dev/null
+++ b/devices/i221109_012#003.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:48:35 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_013#001.tif.properties b/devices/i221109_013#001.tif.properties
new file mode 100644
index 0000000..7c4208a
--- /dev/null
+++ b/devices/i221109_013#001.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:49:23 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_013#004.tif.properties b/devices/i221109_013#004.tif.properties
new file mode 100644
index 0000000..1faba14
--- /dev/null
+++ b/devices/i221109_013#004.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:49:24 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_013.tif.properties b/devices/i221109_013.tif.properties
new file mode 100644
index 0000000..e0c2051
--- /dev/null
+++ b/devices/i221109_013.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:49:16 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/i221109_013_shifted.tif.properties b/devices/i221109_013_shifted.tif.properties
new file mode 100644
index 0000000..ea3dda5
--- /dev/null
+++ b/devices/i221109_013_shifted.tif.properties
@@ -0,0 +1,20 @@
+#Wed Nov 09 14:49:17 CET 2022
+spatialCalOffsetY=NaN
+invert=false
+spatialCalOffsetX=NaN
+rotation=0.0
+rotationCrop=false
+scale=1.0
+rescaleFactor=1.0
+grayscale=false
+spatialCalUnits=mm
+flipVertically=false
+roiHeight=-1
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+flipHorizontally=false
+roiY=0
+roiX=0
+rescaleOffset=0.0
+transpose=false
+roiWidth=-1
diff --git a/devices/raw.properties b/devices/raw.properties
index d6dfbc8..222ccf7 100644
--- a/devices/raw.properties
+++ b/devices/raw.properties
@@ -1,4 +1,4 @@
-#Tue Oct 04 10:43:41 CEST 2022
+#Wed Nov 09 14:28:01 CET 2022
spatialCalOffsetY=NaN
spatialCalOffsetX=NaN
colormapLogarithmic=false
@@ -6,12 +6,12 @@ scale=1.0
grayscale=false
spatialCalScaleX=NaN
spatialCalScaleY=NaN
-colormapMax=NaN
+colormapMax=237.506
rescaleOffset=0.0
roiWidth=-1
colormap=Viridis
invert=false
-colormapMin=NaN
+colormapMin=0.0
rotation=0.0
rotationCrop=false
rescaleFactor=1.0
@@ -19,7 +19,7 @@ spatialCalUnits=mm
flipVertically=false
roiHeight=-1
flipHorizontally=false
-colormapAutomatic=true
+colormapAutomatic=false
roiY=0
roiX=0
transpose=false
diff --git a/plugins/DataAcquisition.form b/plugins/DataAcquisition.form
index d0a4e74..2cfdf2b 100755
--- a/plugins/DataAcquisition.form
+++ b/plugins/DataAcquisition.form
@@ -525,6 +525,7 @@
+
@@ -532,7 +533,6 @@
-
@@ -540,12 +540,12 @@
-
+
-
+
@@ -611,17 +611,25 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -632,7 +640,7 @@
-
+
@@ -645,7 +653,7 @@
-
+
@@ -678,14 +686,20 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -846,6 +860,11 @@
+
+
+
+
+
diff --git a/plugins/DataAcquisition.java b/plugins/DataAcquisition.java
index 05e4d35..eba9063 100755
--- a/plugins/DataAcquisition.java
+++ b/plugins/DataAcquisition.java
@@ -348,13 +348,14 @@ public class DataAcquisition extends Panel {
args.put("SEQUENCE", comboSeq.getSelectedItem());
args.put("MEASUREMENTS", spinnerImgMeasurements.getValue());
args.put("AUTO_SAVE", checkImgAutosave.isSelected());
+ args.put("DRIFT_CORRECTION", checkDriftCorrection.isSelected());
args.put("EXPOSURE", spinnerImgExp.getValue());
args.put("AVERAGE", spinnerImgAvg.getValue());
args.put("ENERGY_1", spinnerImgEng1.getValue());
args.put("ENERGY_2", spinnerImgEng2.getValue());
args.put("SWITCH_POL", checkSwitchPol.isSelected());
args.put("NUMBER_SCANS", (comboImgMethod.getSelectedItem() == ImgMethod.Take_Image.toString()) ? ((Integer)spinnerScans.getValue()) : 1 );
-
+
runAsync("templates/Eiger2Img", args).handle((ret, t) -> {
if ((t != null) && (!getContext().isAborted())) {
showException((Exception) t);
@@ -539,6 +540,7 @@ public class DataAcquisition extends Panel {
checkSwitchPol = new javax.swing.JCheckBox();
labelScans = new javax.swing.JLabel();
spinnerScans = new javax.swing.JSpinner();
+ checkDriftCorrection = new javax.swing.JCheckBox();
jPanel3 = new javax.swing.JPanel();
panelSpectrum = new javax.swing.JPanel();
jLabel23 = new javax.swing.JLabel();
@@ -974,6 +976,8 @@ public class DataAcquisition extends Panel {
spinnerScans.setModel(new javax.swing.SpinnerNumberModel(1, 1, 1000, 1));
+ checkDriftCorrection.setText("Drift correction");
+
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
@@ -986,16 +990,21 @@ public class DataAcquisition extends Panel {
.addComponent(labelSwitching1, javax.swing.GroupLayout.Alignment.TRAILING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(comboImgMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(comboSwitch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(comboSeq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(checkImgAutosave, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(18, 73, Short.MAX_VALUE)
- .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(labelScans, javax.swing.GroupLayout.Alignment.TRAILING))
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(comboImgMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboSwitch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboSeq, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(checkImgAutosave, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(18, 76, Short.MAX_VALUE)
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(labelScans, javax.swing.GroupLayout.Alignment.TRAILING)))
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addComponent(checkDriftCorrection, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(0, 0, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(spinnerImgAvg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -1004,7 +1013,7 @@ public class DataAcquisition extends Panel {
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(spinnerImgExp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(spinnerImgMeasurements, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(18, 73, Short.MAX_VALUE)
+ .addGap(18, 76, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(labelImgEng1, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(labelImgEng2, javax.swing.GroupLayout.Alignment.TRAILING))
@@ -1013,7 +1022,7 @@ public class DataAcquisition extends Panel {
.addComponent(spinnerImgEng1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(spinnerImgEng2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(spinnerScans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(63, Short.MAX_VALUE))
+ .addContainerGap(67, Short.MAX_VALUE))
);
jPanel5Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerImgAvg, spinnerImgEng1, spinnerImgEng2, spinnerImgExp, spinnerImgMeasurements, spinnerScans});
@@ -1046,13 +1055,17 @@ public class DataAcquisition extends Panel {
.addComponent(jLabel9)
.addComponent(spinnerImgAvg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
- .addComponent(labelScans)
- .addComponent(spinnerScans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
- .addComponent(checkImgAutosave)
- .addComponent(checkSwitchPol))
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
+ .addComponent(labelScans)
+ .addComponent(spinnerScans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(checkSwitchPol))
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addComponent(checkImgAutosave)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(checkDriftCorrection)))
.addContainerGap())
);
@@ -1081,13 +1094,13 @@ public class DataAcquisition extends Panel {
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(panelImgControls, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonImgStart)
.addGap(76, 76, 76)
.addComponent(buttonImgAbort)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addComponent(panelImgControls, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonImgAbort, buttonImgStart});
@@ -1097,11 +1110,11 @@ public class DataAcquisition extends Panel {
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(panelImgControls, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 269, Short.MAX_VALUE)
+ .addGap(30, 30, 30)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonImgStart)
.addComponent(buttonImgAbort))
- .addContainerGap(73, Short.MAX_VALUE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jTabbedPane1.addTab("2-Images", jPanel2);
@@ -1775,6 +1788,7 @@ public class DataAcquisition extends Panel {
private javax.swing.JToggleButton buttonShowNorm;
private javax.swing.JButton buttonSpecAbort;
private javax.swing.JButton buttonSpecStart;
+ private javax.swing.JCheckBox checkDriftCorrection;
private javax.swing.JCheckBox checkImgAutosave;
private javax.swing.JCheckBox checkImgOTFSaveImages;
private javax.swing.JCheckBox checkSpecSaveImages;
diff --git a/plugins/Imaging.form b/plugins/Imaging.form
index ce05c43..3805fdd 100644
--- a/plugins/Imaging.form
+++ b/plugins/Imaging.form
@@ -23,14 +23,19 @@
-
+
+
-
+
+
+
+
+
@@ -47,15 +52,6 @@
-
-
-
-
-
-
-
-
-
@@ -76,6 +72,15 @@
+
+
+
+
+
+
+
+
+
@@ -87,7 +92,7 @@
-
+
@@ -122,16 +127,19 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -142,10 +150,13 @@
+
-
-
-
+
+
+
+
+
@@ -174,6 +185,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/Imaging.java b/plugins/Imaging.java
index 0ed9a59..204bb31 100644
--- a/plugins/Imaging.java
+++ b/plugins/Imaging.java
@@ -138,6 +138,8 @@ public class Imaging extends Panel {
buttonStartAutoIntensity = new javax.swing.JButton();
jLabel12 = new javax.swing.JLabel();
spinnerExpositionIntensity = new javax.swing.JSpinner();
+ processVariablePanel1 = new ch.psi.pshell.swing.ProcessVariablePanel();
+ processVariablePanel2 = new ch.psi.pshell.swing.ProcessVariablePanel();
buttonAbort = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
buttonRoiSet = new javax.swing.JButton();
@@ -195,19 +197,38 @@ public class Imaging extends Panel {
}
});
+ processVariablePanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Girder X [mm]"));
+ processVariablePanel1.setDeviceName("girder_x");
+ processVariablePanel1.setPreferredSize(new java.awt.Dimension(188, 112));
+ processVariablePanel1.setShowLimitButtons(false);
+ processVariablePanel1.setShowSlider(false);
+ processVariablePanel1.setShowStop(false);
+ processVariablePanel1.setStepIncrement(0.01);
+ processVariablePanel1.setStepSize(0.01);
+
+ processVariablePanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Girder Y [mm]"));
+ processVariablePanel2.setDeviceName("girder_y");
+ processVariablePanel2.setShowLimitButtons(false);
+ processVariablePanel2.setShowSlider(false);
+ processVariablePanel2.setShowStop(false);
+ processVariablePanel2.setStepIncrement(0.01);
+ processVariablePanel2.setStepSize(0.01);
+
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(jLabel12)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(spinnerExpositionIntensity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addContainerGap())
- .addGroup(jPanel2Layout.createSequentialGroup()
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(buttonStartAutoIntensity)
+ .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
+ .addComponent(processVariablePanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
+ .addGap(12, 12, 12)
+ .addComponent(jLabel12)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(spinnerExpositionIntensity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(69, 69, 69)
+ .addComponent(buttonStartAutoIntensity))
+ .addComponent(processVariablePanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
@@ -215,10 +236,13 @@ public class Imaging extends Panel {
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12)
- .addComponent(spinnerExpositionIntensity, 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(buttonStartAutoIntensity)
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addComponent(spinnerExpositionIntensity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(buttonStartAutoIntensity))
+ .addGap(32, 32, 32)
+ .addComponent(processVariablePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(18, 18, 18)
+ .addComponent(processVariablePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(14, Short.MAX_VALUE))
);
buttonAbort.setText("Abort");
@@ -573,13 +597,6 @@ public class Imaging extends Panel {
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel4Layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addComponent(jPanel3, 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(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonAbort)
@@ -596,6 +613,13 @@ public class Imaging extends Panel {
.addComponent(checkArrows)
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(15, 15, 15))
+ .addGroup(jPanel4Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+ .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -606,7 +630,7 @@ public class Imaging extends Panel {
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addGap(164, 164, 164)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel10)
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
@@ -630,12 +654,16 @@ public class Imaging extends Panel {
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE))
+ .addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, 592, Short.MAX_VALUE)
+ .addGap(18, 18, 18))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(renderer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(renderer, javax.swing.GroupLayout.PREFERRED_SIZE, 768, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}// //GEN-END:initComponents
@@ -832,6 +860,8 @@ public class Imaging extends Panel {
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
+ private ch.psi.pshell.swing.ProcessVariablePanel processVariablePanel1;
+ private ch.psi.pshell.swing.ProcessVariablePanel processVariablePanel2;
private javax.swing.JRadioButton radioAll;
private javax.swing.JRadioButton radioObjective;
private javax.swing.JRadioButton radioStigA;
diff --git a/script/Test_Autofocus_Armin.py b/script/Test_Autofocus_Armin.py
old mode 100755
new mode 100644
index 5085c04..8441066
--- a/script/Test_Autofocus_Armin.py
+++ b/script/Test_Autofocus_Armin.py
@@ -33,9 +33,9 @@ def update_roi():
cur_data = image.data
calc_roi = Roi(ROI.x,ROI.y,ROI.width, ROI.height)
try:
- xoff, yoff, error, diffphase = calculate_shift(former_data,cur_data, calc_roi)
+ xoff, yoff, error, diffphase, _ = calculate_shift(former_data,cur_data, calc_roi)
print "Calculated shift: ", xoff, yoff, error, diffphase
- if (0 max_diffphase:
raise Exception("Bad image registration phase difference: " + str(diffphase))
- return xoff, yoff, error, diffphase
+ return xoff, yoff, error, diffphase, shifts
+def apply_shift(img, shifts):
+ img = to_ip(img)
+ stack = create_stack([img,])
+ r=translate(stack, shifts)
+ return r
\ No newline at end of file
diff --git a/script/local.py b/script/local.py
index c67b0b5..b4a3b02 100644
--- a/script/local.py
+++ b/script/local.py
@@ -466,13 +466,13 @@ def assert_beamline_ok():
checkbeamline=0
message=[ "PLC error","Encoder error", "Feedforward error","Operator control", "Moving timeout", "Interlock"]
ID = get_setting("ID")
- if ID == "ID1":
+ if ID == "PGM_ID1":
id1_status=get_id_status(1)
id2_status=0
- elif ID == "ID2":
+ elif ID == "PGM_ID2":
id1_status=0
id2_status=get_id_status(2)
- if ID == "ID1_ID2":
+ if ID == "PGM_ID1_ID2":
id1_status=get_id_status(1)
id2_status=get_id_status(2)
if id1_status >= 1:
@@ -752,11 +752,14 @@ def apply_beamline_setup(id,en=None,pol1=None,alp1=None,har1=None,off1=None,pol2
# Monochromator part
if grat is not None:
if grat=='G1_300':
- Grating.write(0)
+ Grating.write("0")
+ Grating_ch.write("0")
elif grat=='G2_1200':
- Grating.write(1)
+ Grating.write("1")
+ Grating_ch.write("1")
elif grat =='G3_600':
- Grating.write(2)
+ Grating.write("2")
+ Grating_ch.write("2")
if order is not None:
DiffOrd.write(order)
if Cff is not None:
diff --git a/script/temp_save.py b/script/temp_save.py
new file mode 100644
index 0000000..ca9d73e
--- /dev/null
+++ b/script/temp_save.py
@@ -0,0 +1,118 @@
+#Sample 01 - RW-2-4
+open_vg13()
+
+TRX.write(1.41)
+TRZ.write(11.9)
+
+
+time.sleep(1)
+
+##Survey
+#nr_loops=1
+#for i in range(nr_loops):
+# caput('X11MA-KEI10:RANGE', 6)
+# caput('X11MA-KEI11:RANGE', 7)
+# caput('X11MA-KEI12:RANGE', 8)
+# otf2(start=500, end=900, time=4, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Survey')
+
+#Nickel L edge
+nr_loops=1
+for i in range(nr_loops):
+ caput('X11MA-KEI10:RANGE', 6)
+ caput('X11MA-KEI11:RANGE', 7)
+ caput('X11MA-KEI12:RANGE', 9)
+ otf2(start=845, end=885, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Ni')
+
+#Cobalt L edge
+nr_loops=1
+for i in range(nr_loops):
+ caput('X11MA-KEI10:RANGE', 6)
+ caput('X11MA-KEI11:RANGE', 7)
+ caput('X11MA-KEI12:RANGE', 9)
+ otf2(start=772, end=805, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Co')
+
+#Manganese L edge
+nr_loops=1
+for i in range(nr_loops):
+ caput('X11MA-KEI10:RANGE', 6)
+ caput('X11MA-KEI11:RANGE', 7)
+ caput('X11MA-KEI12:RANGE', 9)
+ otf2(start=630, end=670, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_Mn')
+
+
+#Oxygen K edge
+nr_loops=1
+for i in range(nr_loops):
+ caput('X11MA-KEI10:RANGE', 6)
+ caput('X11MA-KEI11:RANGE', 7)
+ caput('X11MA-KEI12:RANGE', 8)
+ otf2(start=520, end=570, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_O')
+
+#Carbon K edge
+nr_loops=1
+for i in range(nr_loops):
+ caput('X11MA-KEI10:RANGE', 6)
+ caput('X11MA-KEI11:RANGE', 7)
+ caput('X11MA-KEI12:RANGE', 9)
+ otf2(start=270, end=320, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='RW-2-4_C')#
+
+#Sample 03 - HR016
+#open_vg13()
+#
+#TRX.write(11.95)
+#TRZ.write(13.71)
+#
+#
+#time.sleep(1)
+##
+###Survey
+##nr_loops=1
+##for i in range(nr_loops):
+## caput('X11MA-KEI10:RANGE', 6)
+## caput('X11MA-KEI11:RANGE', 7)
+## caput('X11MA-KEI12:RANGE', 8)
+## otf2(start=500, end=900, time=4, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='HR016_Survey')
+#
+###Nickel L edge
+##nr_loops=1
+##for i in range(nr_loops):
+## caput('X11MA-KEI10:RANGE', 6)
+## caput('X11MA-KEI11:RANGE', 7)
+## caput('X11MA-KEI12:RANGE', 9)
+## otf2(start=845, end=885, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='HR016_Ni')
+#
+##Manganese L edge
+#nr_loops=1
+#for i in range(nr_loops):
+# caput('X11MA-KEI10:RANGE', 6)
+# caput('X11MA-KEI11:RANGE', 7)
+# caput('X11MA-KEI12:RANGE', 8)
+# otf2(start=630, end=670, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_Mn')
+#
+#
+##Oxygen K edge
+#nr_loops=1
+#for i in range(nr_loops):
+# caput('X11MA-KEI10:RANGE', 6)
+# caput('X11MA-KEI11:RANGE', 7)
+# caput('X11MA-KEI12:RANGE', 8)
+# otf2(start=520, end=570, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_O')
+#
+##Sn M edge
+#nr_loops=1
+#for i in range(nr_loops):
+# caput('X11MA-KEI10:RANGE', 6)
+# caput('X11MA-KEI11:RANGE', 7)
+# caput('X11MA-KEI12:RANGE', 9)
+# otf2(start=485, end=506, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_Sn')
+#
+#
+##Carbon K edge
+#nr_loops=1
+#for i in range(nr_loops):
+# caput('X11MA-KEI10:RANGE', 6)
+# caput('X11MA-KEI11:RANGE', 7)
+# caput('X11MA-KEI12:RANGE', 9)
+# otf2(start=270, end=320, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='HR016_C')
+#
+#time.sleep(1)
diff --git a/script/templates/Eiger2Img.py b/script/templates/Eiger2Img.py
index 18050d2..54115bc 100644
--- a/script/templates/Eiger2Img.py
+++ b/script/templates/Eiger2Img.py
@@ -5,6 +5,7 @@ if (get_exec_pars().source == CommandSource.ui) and (get_exec_pars().script == "
SEQUENCE = "A"
MEASUREMENTS = 4
AUTO_SAVE = True
+ DRIFT_CORRECTION = True
EXPOSURE = 1.0
AVERAGE = 2.0
ENERGY_1 = 850.0
@@ -18,7 +19,10 @@ print "Starting 2Img: ", METHOD, SWITCHING, SEQUENCE , MEASUREMENTS, AUTO_SAVE,
SHOW_IMAGES = True
SAVE_DIAGS = True
-CORRECT_DRIFTS = False
+DEFAULT_ROI = Rectangle(128,128,256,256)
+
+#DEFAULT_ROI = Rectangle(0,0,512,512)
+
ID = get_setting("ID")
@@ -32,7 +36,7 @@ if METHOD == "Two_Energies":
start = time.time()
threads = []
-
+image_drift=None
#path = "{data}/{year}_{month}/{date}" + "/" + "{seq}%03d_" + METHOD
#set_exec_pars(path= path, format="txt", layout="table", open=True)
@@ -44,7 +48,7 @@ set_exec_pars(name=METHOD, path = data_path, format="txt", layout="table", open=
#get_context().incrementFileSequentialNumber()
-def get_image_file_name(cycle=-1, frame_index=0, short_name=False):
+def get_image_file_name(cycle=-1, frame_index=0, short_name=False, shifted=False):
global max_index
if (METHOD == "Two_Pol") and (SEQUENCE == "A") and (frame_index<2) and ((cycle%2)==0): #Swapped
frame_index = 0 if frame_index else 1
@@ -54,7 +58,10 @@ def get_image_file_name(cycle=-1, frame_index=0, short_name=False):
max_index= max(max_index, frame_index)
#prefix = get_context().setup.expandPath("i{date}%02d_{seq}%03d")
prefix = get_context().setup.expandPath("i{date}%02d_" + ("%03d" % (abs_index,)))
-
+
+ if (shifted):
+ prefix = prefix + "_shifted"
+
if cycle < 0:
ret = root + prefix + ".tif"
else:
@@ -105,10 +112,22 @@ def save_image_file(frame, cycle=-1, frame_index=0):
p.getAxis(p.AxisId.Y).setInverted(True)
if AUTO_SAVE and (frame is not None):
filename = get_image_file_name(cycle, frame_index)
- threads.append(save_as_tiff(frame, filename, check=False, parallel=True, metadata=(get_diags() if SAVE_DIAGS else {})))
+ metadata = get_diags() if SAVE_DIAGS else {}
+ threads.append(save_as_tiff(frame, filename, check=False, parallel=True, metadata=metadata))
log(filename)
print filename
+
+ if DRIFT_CORRECTION:
+ filename = get_image_file_name(cycle, frame_index, shifted=True)
+ if image_drift is not None:
+ print "->", filename
+ shifted_frame = apply_shift(frame, image_drift)
+ threads.append(save_as_tiff(shifted_frame, filename, check=False, parallel=True, metadata=metadata))
+ elif frame_index==0:
+ print "->", filename
+ threads.append(save_as_tiff(frame, filename, check=False, parallel=True, metadata=metadata))
+
# log("SV:"+Format(startvoltage,"0.000")+" OB:"+Format(objective,"0.00")+" ST:"+Format(LEEMtemp,"0.0"))
init_eiger(exposure=EXPOSURE)
@@ -117,10 +136,11 @@ run_index = get_context().getDaySequentialNumber()
print " ---- Run index : %d" %(run_index,)
max_index=0
-if CORRECT_DRIFTS:
+if DRIFT_CORRECTION:
roi = get_focus_scan_roi()
- calc_roi = None if (roi is None) else Roi(roi.x,roi.y,roi.width, roi.height)
- calc_roi=Roi(0,0,512,512)
+ if roi is None:
+ roi = DEFAULT_ROI
+ calc_roi = Roi(roi.x,roi.y,roi.width, roi.height)
ref_image = None # grab_frame(image, None, True)
#print "Startup time: " + str(time.time() - start)
@@ -144,7 +164,25 @@ try:
#print "--- Time: " + str(time.time() - s)
#time.sleep(1) #added by Armin
frames.append(av)
- imageinfo("I")
+
+ if (i==0) and DRIFT_CORRECTION and (calc_roi is not None):
+ if ref_image is None:
+ ref_image = frames[0]
+ print "-> Saved shift ref image"
+ else:
+ try:
+ cur_image = frames[0]
+ xoff, yoff, error, diffphase, image_drift = calculate_shift(ref_image,cur_image, calc_roi)
+ if (abs(xoff) <= MAX_SHIFT) and (abs(yoff) <= MAX_SHIFT):
+ print "-> Calculated shift: ", xoff, yoff, error, diffphase
+ else:
+ print "-> Error: shift too big:", xoff, yoff
+ image_drift = None
+ except:
+ print "-> Error calculating shift: " + str(sys.exc_info()[1])
+ image_drift = None
+
+ imageinfo("I")
save_image_file(frames[i], cycle, i)
if METHOD == "Take_Image":
break
@@ -164,18 +202,7 @@ try:
frames.append(frames[1].copy())
frames[2].div(frames[0])
save_image_file(frames[2],cycle, 2)
- if CORRECT_DRIFTS and (calc_roi is not None):
- if ref_image is None:
- ref_image = frames[0]
- print "-> Saved shift ref image"
- else:
- cur_image = frames[0]
- xoff, yoff, error, diffphase = calculate_shift(ref_image,cur_image, calc_roi)
- if (0 Calculated shift: ", xoff, yoff, error, diffphase
- else:
- print "-> Error - shift too big:", xoff, yoff
-
+
# objective = getObjective()
# temp = getLEEMtemp()
# log(0 , "Temp : " + Format(temp,"0.00") + " OB : " + Format(objective,"0.00") + " StigmaA : " + " StigmaB : " )
diff --git a/script/templates/Eiger2Img_Hannes_valve_close.py b/script/templates/Eiger2Img_Hannes_valve_close.py
index f940e3c..2501c6f 100644
--- a/script/templates/Eiger2Img_Hannes_valve_close.py
+++ b/script/templates/Eiger2Img_Hannes_valve_close.py
@@ -166,8 +166,8 @@ try:
print "-> Saved shift ref image"
else:
cur_image = frames[0]
- xoff, yoff, error, diffphase = calculate_shift(ref_image,cur_image, calc_roi)
- if (0 Calculated shift: ", xoff, yoff, error, diffphase
else:
print "-> Error - shift too big:", xoff, yoff
diff --git a/script/templates/Eiger2Img_Original.py b/script/templates/Eiger2Img_Original.py
index dd97912..5900b4e 100644
--- a/script/templates/Eiger2Img_Original.py
+++ b/script/templates/Eiger2Img_Original.py
@@ -160,8 +160,8 @@ try:
print "-> Saved shift ref image"
else:
cur_image = frames[0]
- xoff, yoff, error, diffphase = calculate_shift(ref_image,cur_image, calc_roi)
- if (0 Calculated shift: ", xoff, yoff, error, diffphase
else:
print "-> Error - shift too big:", xoff, yoff
diff --git a/script/templates/FocusScan.py b/script/templates/FocusScan.py
index e674e39..5e1a493 100644
--- a/script/templates/FocusScan.py
+++ b/script/templates/FocusScan.py
@@ -110,9 +110,9 @@ def update_roi_pos(cur_data, former_data):
roi=get_focus_scan_roi()
calc_roi = Roi(roi.x,roi.y,roi.width, roi.height)
try:
- xoff, yoff, error, diffphase = calculate_shift(former_data,cur_data, calc_roi)
+ xoff, yoff, error, diffphase, _ = calculate_shift(former_data,cur_data, calc_roi)
print "Calculated shift: ", xoff, yoff, error, diffphase
- if (0 0.01:
+ raise Exception("Error changing Eiger exposure time to %f: readback=%f" % (value, readback))
+ except:
+ if i==(retries-1):
+ raise
+ else:
+ print "Error changing Eiger exposure time: retrying"
+ time.sleep(0.3)
+
+ if started:
+ if eiger.grabMode==eiger.GrabMode.Continuous:
+ caget("X11MA-ES1-SD1:cam1:ImageMode")
+ eiger.start()
+ caputq("X11MA-ES1-SD1:cam1:Acquire", 1)
+
+
+def set_eiger_number_of_frames(value, check = True):
+ if value == get_eiger_number_of_frames():
+ caget("X11MA-ES1-SD1:cam1:NumFrames_RBV",'i')
+ return
+ started = eiger.isStarted()
+ caget("X11MA-ES1-SD1:cam1:Acquire")
+ if started:
+ stop_eiger()
+
+ caput("X11MA-ES1-SD1:cam1:NumFrames",value)
+ if check:
+ readback = get_eiger_number_of_frames()
+ caget("X11MA-ES1-SD1:cam1:NumFrames_RBV",'i')
+ if value != readback:
+ raise Exception("Error changing Eiger number of frames to %d: readback=%d" % (value, readback))
+
+ if started:
+ if eiger.grabMode==eiger.GrabMode.Continuous:
+ caget("X11MA-ES1-SD1:cam1:ImageMode")
+ eiger.start()
+ caputq("X11MA-ES1-SD1:cam1:Acquire", 1)
+
+
+def stop_eiger():
+ global chrono_eiger
+ chrono_eiger.waitTimeout(CONTINOUS_MODE_MIN_TIME)
+ started = eiger.isStarted()
+ caget("X11MA-ES1-SD1:cam1:Acquire")
+ if started:
+ eiger.stop()
+ caputq("X11MA-ES1-SD1:cam1:Acquire", 0)
+ eiger.grabMode=eiger.GrabMode.Single
+ caputq("X11MA-ES1-SD1:cam1:ImageMode", Single)
+ eiger.stop()
+ caputq("X11MA-ES1-SD1:cam1:Acquire", 0)
+ eiger.waitReady(5000)
+ wait until monitor of X11MA-ES1-SD1:cam1:Acquire == 0 is received
+ else:
+ eiger.grabMode=eiger.GrabMode.Single
+ caputq("X11MA-ES1-SD1:cam1:ImageMode", Single)
+ time.sleep(0.1)
+
+
+def average_eiger_frames(samples, roi=None, wait_next=False, sleep=0, outliers_threshold=None, outliers_mask=None, retries=None, timeout=None):
+ global eiger_averaging_number_of_samples #, chrono_eiger
+ sample = int(samples)
+ if is_averaging_detector():
+ #Not now
+ else:
+ ret = grab_frames(image, samples, roi, wait_next, sleep, outliers_threshold, outliers_mask, retries, timeout)
+ if wait_next:
+
+ eiger.waitReady(5000)
+ eiger.start()
+ elif str(eiger.grabMode)=="Continuous":
+ if not eiger.isStarted():
+ eiger.start()
+ try:
+ #eiger.getDataArray().waitCacheChange(timeout)
+ source.waitNext(timeout)
+ breakzxZZy
+ except java.util.concurrent.TimeoutException:
+ if try_count == (retries-1):
+ raise
+ msg = "Eiger timeout - retrying #" + str(try_count)
+ print msg
+ log(msg)
+
+ return average_frames(ret) if samples > 1 else ret[0]
+
diff --git a/script/test/test.py b/script/test/test.py
index a66fb3d..b14dda1 100755
--- a/script/test/test.py
+++ b/script/test/test.py
@@ -1 +1,5 @@
-otf2(start=500, end=510, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=0.0, name='test')
\ No newline at end of file
+#otf2(start=778, end=785, time=1, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='test_Co')
+#otf2(start=772, end=805, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='test')
+#otf2(start=845, end=885, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset=-3.8, name='test_Ni')
+#otf2(start=520, end=570, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset= 0, name='oXAS-VS01-OCP_O_test')
+otf2(start=520, end=595, time=2, delay=10, mode='LINEAR', alpha = 0.0, offset= 0, name='oXAS-VS01-OCP_O_test')
\ No newline at end of file