diff --git a/config/config.properties b/config/config.properties
index 59482d8..6c7e605 100644
--- a/config/config.properties
+++ b/config/config.properties
@@ -1,4 +1,4 @@
-#Wed Nov 19 10:56:25 CET 2025
+#Wed Dec 03 15:12:13 CET 2025
commandQueueSize=-1
commandStatistics=false
commandTimeToLive=600000
@@ -12,6 +12,7 @@ dataServerPort=-1
dataTransferMode=Off
dataTransferPath=
dataTransferUser=
+dataTruncate=true
filePermissionsConfig=Public
filePermissionsData=Default
filePermissionsLogs=Public
@@ -49,5 +50,5 @@ userAuthenticator=
userManagement=true
versionTrackingEnabled=true
versionTrackingLogin=
-versionTrackingManual=false
+versionTrackingManual=true
versionTrackingRemote=https\://gitea.psi.ch/pshell_config/x11ma.git
diff --git a/config/devices.properties b/config/devices.properties
index 7f26287..f1cb220 100644
--- a/config/devices.properties
+++ b/config/devices.properties
@@ -1,108 +1,168 @@
eiger=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-EIGER|||true
-cam2=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-CAM2|||true
-peemcam=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-PEEMCAM|||true
-ai1_temperature=ch.psi.pshell.epics.ReadonlyProcessVariable|X11MA-PC-ET7000:SW-K|Read||true
+BML_RMU1_CAM=ch.psi.pshell.epics.AreaDetector|X11MA-OP-RM1CAM|||true
+BML_AUSL_CAM=ch.psi.pshell.epics.AreaDetector|X11MA-OP-AUSLCAM|||true
+#cam2=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-CAM2|||true
+#peemcam=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-PEEMCAM|||true
+ai1_temperature=ch.psi.pshell.epics.ReadonlyProcessVariable|X11MA-CPCL-ET7000:SW-K1|Read||true
#ai1-raw=ch.psi.pshell.modbus.AnalogInput|et7026 1||5000|
-et7026=ch.psi.pshell.modbus.ModbusTCP|129.129.121.44:502|||
-ai0=ch.psi.pshell.modbus.ReadonlyProcessVariable|et7026 0||5000|
-ai1=ch.psi.pshell.modbus.ReadonlyProcessVariable|et7026 1||5000|
-ao0=ch.psi.pshell.modbus.ProcessVariable|et7026 0||5000|
-ao1=ch.psi.pshell.modbus.ProcessVariable|et7026 1||5000|
-ais=ch.psi.pshell.modbus.AnalogInputArray|et7026 0 6||5000|false
-et7244=ch.psi.pshell.modbus.ModbusTCP|129.129.121.45:502|||
-di1=ch.psi.pshell.modbus.DigitalInput|et7244 0||5000|
-di2=ch.psi.pshell.modbus.DigitalInput|et7244 1||5000|
-do1=ch.psi.pshell.modbus.DigitalOutput|et7244 0||5000|
-do2=ch.psi.pshell.modbus.DigitalOutput|et7244 1||5000|
-do3=ch.psi.pshell.modbus.DigitalOutput|et7244 2||5000|
-do4=ch.psi.pshell.modbus.DigitalOutput|et7244 3||5000|
-do5=ch.psi.pshell.modbus.DigitalOutput|et7244 4||5000|
-do6=ch.psi.pshell.modbus.DigitalOutput|et7244 5||5000|
-do7=ch.psi.pshell.modbus.DigitalOutput|et7244 6||5000|
-do8=ch.psi.pshell.modbus.DigitalOutput|et7244 7||5000|
-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
-fe_slit_V_ctr=ch.psi.pshell.epics.Motor|X11MA-FE-SV:center|||true
-fe_slit_H_ctr=ch.psi.pshell.epics.Motor|X11MA-FE-SH:center|||true
-fe_slit_V_size_offs=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-DSVER.A|||true
-fe_slit_V_size=ch.psi.pshell.epics.Motor|X11MA-FE-SV:size|||true
-fe_slit_H_size_offs=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-DSHOR.A|||true
-fe_slit_H_size=ch.psi.pshell.epics.Motor|X11MA-FE-SH:size|||true
+#et7026=ch.psi.pshell.modbus.ModbusTCP|129.129.121.44:502|||
+#ai0=ch.psi.pshell.modbus.ReadonlyProcessVariable|et7026 0||5000|
+#ai1=ch.psi.pshell.modbus.ReadonlyProcessVariable|et7026 1||5000|
+#ao0=ch.psi.pshell.modbus.ProcessVariable|et7026 0||5000|
+#ao1=ch.psi.pshell.modbus.ProcessVariable|et7026 1||5000|
+#ais=ch.psi.pshell.modbus.AnalogInputArray|et7026 0 6||5000|false
+#et7244=ch.psi.pshell.modbus.ModbusTCP|129.129.121.45:502|||
+#di1=ch.psi.pshell.modbus.DigitalInput|et7244 0||5000|
+#di2=ch.psi.pshell.modbus.DigitalInput|et7244 1||5000|
+#do1=ch.psi.pshell.modbus.DigitalOutput|et7244 0||5000|
+#do2=ch.psi.pshell.modbus.DigitalOutput|et7244 1||5000|
+#do3=ch.psi.pshell.modbus.DigitalOutput|et7244 2||5000|
+#do4=ch.psi.pshell.modbus.DigitalOutput|et7244 3||5000|
+#do5=ch.psi.pshell.modbus.DigitalOutput|et7244 4||5000|
+#do6=ch.psi.pshell.modbus.DigitalOutput|et7244 5||5000|
+#do7=ch.psi.pshell.modbus.DigitalOutput|et7244 6||5000|
+#do8=ch.psi.pshell.modbus.DigitalOutput|et7244 7||5000|
+#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
+BML_FE_CX_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-SL1:CENTERX.RBV|Read||true
+BML_FE_CY_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-SL1:CENTERY.RBV|Read||true
+BML_CMU_TRY=ch.psi.pshell.epics.Motor|X11MA-OP2-CM:TRY|||true
+BML_CMU_TRZ=ch.psi.pshell.epics.Motor|X11MA-OP2-CM:TRZ|||true
+BML_CMU_ROX=ch.psi.pshell.epics.Motor|X11MA-OP2-CM:ROX|||true
+BML_CMU_ROY=ch.psi.pshell.epics.Motor|X11MA-OP2-CM:ROY|||true
+BML_CMU_ROZ=ch.psi.pshell.epics.Motor|X11MA-OP2-CM:ROZ|||true
+BML_CMU_x_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-CM:ox|Read||true
+BML_CMU_y_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-CM:y|Read||true
+BML_CMU_z_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-CM:oz|Read||true
+BML_CMU_Rx_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-CM:oRx|Read||true
+BML_CMU_Ry_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-CM:oRy|Read||true
+BML_CMU_Rz_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-CM:oRz|Read||true
+BML_CMU_baffle_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP2-CM:TRB|||
+BML_XBPM_A_TRX=ch.psi.pshell.epics.Motor|X11MA-FE-XBPM1:TRX|||true
+BML_XBPM_A_TRY=ch.psi.pshell.epics.Motor|X11MA-FE-XBPM1:TRY|||true
+BML_XBPM_A_CUR_1=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-XBPM1:Current1:MeanValue_RBV|Read||true
+BML_XBPM_A_CUR_2=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-XBPM1:Current2:MeanValue_RBV|Read||true
+BML_XBPM_A_CUR_3=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-XBPM1:Current3:MeanValue_RBV|Read||true
+BML_XBPM_A_CUR_4=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-XBPM1:Current4:MeanValue_RBV|Read||true
+BML_XBPM_A_SUM=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-XBPM1:SumAll:MeanValue_RBV|Read||true
+BML_XBPM_A_POS_X=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-XBPM1:PosX:MeanValue_RBV|Read||true
+BML_XBPM_A_POS_Y=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-XBPM1:PosY:MeanValue_RBV|Read||true
+BML_AU_TRYB=ch.psi.pshell.epics.Motor|X11MA-OP2-AU:TRY4|||true
+BML_AU_TRYT=ch.psi.pshell.epics.Motor|X11MA-OP2-AU:TRY1|||true
+BML_AU_TRXW=ch.psi.pshell.epics.Motor|X11MA-OP2-AU:TRZ4|||true
+BML_AU_TRXR=ch.psi.pshell.epics.Motor|X11MA-OP2-AU:TRZ1|||true
+BML_XBPM_B_TRX=ch.psi.pshell.epics.Motor|X11MA-OP2-BP1:TRX|||true
+BML_XBPM_B_TRY=ch.psi.pshell.epics.Motor|X11MA-OP2-BP1:TRY|||true
+BML_XBPM_B_TRX_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-BPM1:ECX|Read||true
+BML_XBPM_B_TRY_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-BPM1:ECY|Read||true
+BML_XBPM_B_SUM=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-BPM1:SumAllAve|Read||true
+BML_XBPM_B_POS_X=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-BPM1:PositionXAve|Read||true
+BML_XBPM_B_POS_Y=ch.psi.pshell.epics.ChannelDouble|X11MA-OP-BPM1:PositionYAve|Read||true
+BML_FMU_TRYD=ch.psi.pshell.epics.Motor|X11MA-OP-FM:TRYD|||true
+BML_FMU_TRYUR=ch.psi.pshell.epics.Motor|X11MA-OP-FM:TRYUR|||true
+BML_FMU_TRYUW=ch.psi.pshell.epics.Motor|X11MA-OP-FM:TRYUW|||true
+BML_FMU_TRX=ch.psi.pshell.epics.Motor|X11MA-OP-FM:TRX|||true
+BML_FMU_ROTY=ch.psi.pshell.epics.Motor|X11MA-OP-FM:ROTY|||true
+BML_FMU_Y=ch.psi.pshell.epics.Motor|X11MA-OP-FM:Y|||true
+BML_FMU_X=ch.psi.pshell.epics.Motor|X11MA-OP-FM:X|||true
+BML_FMU_YAW=ch.psi.pshell.epics.Motor|X11MA-OP-FM:YAW|||true
+BML_RMU1_TRYU=ch.psi.pshell.epics.Motor|X11MA-OP-RM1:TRYU|||true
+BML_RMU1_TRYDW=ch.psi.pshell.epics.Motor|X11MA-OP-RM1:TRYDW|||true
+BML_RMU1_TRYDR=ch.psi.pshell.epics.Motor|X11MA-OP-RM1:TRYDR|||true
+BML_RMU1_TRX=ch.psi.pshell.epics.Motor|X11MA-OP-RM1:TRX|||true
+BML_RMU1_ROTY=ch.psi.pshell.epics.Motor|X11MA-OP-RM1:ROTY|||true
+BML_RMU1_YAW=ch.psi.pshell.epics.Motor|X11MA-OP-RM1:YAW|||true
+BML_RMU1_X=ch.psi.pshell.epics.Motor|X11MA-OP-RM1:X|||true
+BML_DIAG_POSITION=ch.psi.pshell.epics.Motor|X11MA-OP-DI:HO3|||true
+#fe_slit_V_ctr=ch.psi.pshell.epics.Motor|X11MA-FE-SV:center|||true
+#fe_slit_H_ctr=ch.psi.pshell.epics.Motor|X11MA-FE-SH:center|||true
+#fe_slit_V_size_offs=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-DSVER.A|||true
+#fe_slit_V_size=ch.psi.pshell.epics.Motor|X11MA-FE-SV:size|||true
+#fe_slit_H_size_offs=ch.psi.pshell.epics.ChannelDouble|X11MA-FE-DSHOR.A|||true
+#fe_slit_H_size=ch.psi.pshell.epics.Motor|X11MA-FE-SH:size|||true
+BML_FE_centerY=ch.psi.pshell.epics.Motor|X11MA-FE-SL1:CENTERY|||true
+BML_FE_centerX=ch.psi.pshell.epics.Motor|X11MA-FE-SL1:CENTERX|||true
+BML_FE_sizeY=ch.psi.pshell.epics.Motor|X11MA-FE-SL1:SIZEY|||true
+BML_FE_sizeX=ch.psi.pshell.epics.Motor|X11MA-FE-SL1:SIZEX|||true
exit_slit_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-OP2-SL:EOff|||true
exit_slit=ch.psi.pshell.epics.Motor|X11MA-OP2-SL:TRY|||true
-rmu_ry=ch.psi.pshell.epics.Positioner|X11MA-OP-RMU:Ry X11MA-OP-RMU:oRy|||true
-machine_cur=ch.psi.pshell.epics.ChannelDouble|ARIDI-PCT:CURRENT|Read||true
-field=ch.psi.pshell.epics.ChannelDouble|X11MA-XMCD:Ireadout|Read||true
-pol_mode=ch.psi.pshell.epics.DiscretePositioner|X11MA-ID2:MODE|||true
-pol_angle=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ALPHA|||true
-pol_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ENERGY-OFFS|||true
-pol_done=ch.psi.pshell.epics.ChannelString|X11MA-ID2:DONE|Read||true
-id1_mode=ch.psi.pshell.epics.DiscretePositioner|X11MA-ID1:MODE|||true
-id1_alpha=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:ALPHA|||true
-id1_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:ENERGY-OFFS|||true
-id1_harmonic=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:HARMONIC|||true
-id1_gap=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1-GAP:READ 3|||true
-id1_shift=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1-SHIFT:READ|||true
-id1_done=ch.psi.pshell.epics.ChannelString|X11MA-ID1:DONE|Read||true
-id2_mode=ch.psi.pshell.epics.DiscretePositioner|X11MA-ID2:MODE|||true
-id2_alpha=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ALPHA|||true
-id2_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ENERGY-OFFS|||true
-id2_harmonic=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:HARMONIC|||true
-id2_gap=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2-GAP:READ 3|||true
-id2_shift=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2-SHIFT:READ|||true
-id2_done=ch.psi.pshell.epics.ChannelString|X11MA-ID2:DONE|Read||true
-energy=ch.psi.pshell.epics.ChannelDouble|X11PHS-E:GO.A|||true
-energy_opt=ch.psi.pshell.epics.ChannelString|X11PHS-E:OPT|||true
-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||
+exit_slit_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-OP2-SL:TRY.RBV|Read||true
+PEEM_IMON=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-PEEM:IMON|Read||true
+PEEM_PRESSURE_MAIN=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-MAIN:PRESSURE|Read||true
+#rmu_ry=ch.psi.pshell.epics.Positioner|X11MA-OP-RMU:Ry X11MA-OP-RMU:oRy|||true
+SR_current=ch.psi.pshell.epics.ChannelDouble|AGEBD-DBPM3CURR:CURRENT-AVG|Read||true
+#field=ch.psi.pshell.epics.ChannelDouble|X11MA-XMCD:Ireadout|Read||true
+#pol_mode=ch.psi.pshell.epics.DiscretePositioner|X11MA-ID2:MODE|||true
+#pol_angle=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ALPHA|||true
+#pol_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ENERGY-OFFS|||true
+#pol_done=ch.psi.pshell.epics.ChannelString|X11MA-ID2:DONE|Read||true
+#id1_mode=ch.psi.pshell.epics.DiscretePositioner|X11MA-ID1:MODE|||true
+#id1_alpha=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:ALPHA|||true
+#id1_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:ENERGY-OFFS|||true
+#id1_harmonic=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:HARMONIC|||true
+#id1_gap=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1-GAP:READ 3|||true
+#id1_shift=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1-SHIFT:READ|||true
+#id1_done=ch.psi.pshell.epics.ChannelString|X11MA-ID1:DONE|Read||true
+ID2_mode=ch.psi.pshell.epics.DiscretePositioner|X11MA-UIND2:MODE X11MA-UIND2:MODE-ACT||1000|true
+#id2_alpha=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ALPHA|||true
+ID2_offset=ch.psi.pshell.epics.ChannelDouble|X11MA-UIND2:ENERGY-OFFS|||true
+#id2_harmonic=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:HARMONIC|||true
+ID2_gap=ch.psi.pshell.epics.ChannelDouble|X11MA-UIND2:GAP|||true
+#id2_shift=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2-SHIFT:READ|||true
+#id2_done=ch.psi.pshell.epics.ChannelString|X11MA-ID2:DONE|Read||true
+BML_energy_set=ch.psi.pshell.epics.ChannelDouble|X11PHS-E:GO.A|||true
+BML_energy_RBV=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:rbkenergy|Read||true
+BML_energy=ch.psi.pshell.epics.Positioner|X11PHS-E:GO.A X11MA-PGM:rbkenergy|||true
+BML_energy_mode=ch.psi.pshell.epics.ChannelString|X11PHS-E:OPT|||true
+#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||
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
-Temp=ch.psi.pshell.epics.ChannelDouble|X11MA-ES3-LSCI:TEMP_RBV|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
+#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
cff=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:rbkcff 3|Read||true
Grating=ch.psi.pshell.epics.ChannelString|X11MA-PGM:grating|||true
-ID1_En=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:ENERGY-READ|Read||true
-ID2_En=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ENERGY-READ|Read||true
-SLS_freq=ch.psi.pshell.epics.ChannelDouble|AGARF-TIM:BO-FREQ-GET|Read||true
-ThetaComplete=ch.psi.pshell.epics.ChannelString|X11MA-ES2-scan1.SMSG|Read||true
-BucketSize=ch.psi.pshell.epics.ChannelDouble|ACORF-FILL:MRF-INTEG|Read||true
-FillingPattern=ch.psi.pshell.epics.ChannelDoubleArray|ACORF-FILL:UnsortComp|Read||true
+#ID1_En=ch.psi.pshell.epics.ChannelDouble|X11MA-ID1:ENERGY-READ|Read||true
+#ID2_En=ch.psi.pshell.epics.ChannelDouble|X11MA-ID2:ENERGY-READ|Read||true
+#SLS_freq=ch.psi.pshell.epics.ChannelDouble|AGARF-TIM:BO-FREQ-GET|Read||true
+#ThetaComplete=ch.psi.pshell.epics.ChannelString|X11MA-ES2-scan1.SMSG|Read||true
+#BucketSize=ch.psi.pshell.epics.ChannelDouble|ACORF-FILL:MRF-INTEG|Read||true
+#FillingPattern=ch.psi.pshell.epics.ChannelDoubleArray|ACORF-FILL:UnsortComp|Read||true
#MCPArray1=ch.psi.pshell.epics.ChannelIntegerArray|X11MA-ES4:PHC-CTRWF1|Read||true
#SamplingTime=ch.psi.pshell.epics.ChannelDouble|X11MA-ES4:SAMPLE-TIME|Read||true
#MCPArray2=ch.psi.pshell.epics.ChannelIntegerArray|X11MA-ES4:PHC-CTRWF2|Read||true
#NrCounters=ch.psi.pshell.epics.ChannelInteger|X11MA-ES4:NCTR|Read||true
-energy_rbk=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:rbkenergy|Read||true
#energy_done=ch.psi.pshell.epics.ChannelDouble|X11MA-PHS:ALL-DONE|Read||true
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_bit_depth_rbv=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-SD1:cam1:BitDepth_RBV|Read||true
-eiger_mode_rbv=ch.psi.pshell.epics.ChannelString|X11MA-ES1-SD1:cam1:ImageMode_RBV|Read||true
-eiger_exposure_rbv=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-SD1:cam1:AcquireTime_RBV 2|Read||true
-eiger_threshold_rbv=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-SD1:cam1:ThresholdEnergy_RBV|Read||true
-eiger_status=ch.psi.pshell.epics.ChannelString|X11MA-ES1-SD1:cam1:Acquire|||true
-eiger_bit_depth=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-SD1:cam1:BitDepth|||true
-eiger_mode=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-SD1:cam1:ImageMode|||true
-eiger_exposure=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-SD1:cam1:AcquireTime 2|||true
-eiger_threshold=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-SD1:cam1:ThresholdEnergy|||true
-Ecrbk=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:CERBK|Read||true
+eiger_bit_depth_rbv=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-EIGER:cam1:BitDepth_RBV|Read||true
+eiger_mode_rbv=ch.psi.pshell.epics.ChannelString|X11MA-ES1-EIGER:cam1:ImageMode_RBV|Read||true
+eiger_exposure_rbv=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-EIGER:cam1:AcquireTime_RBV 2|Read||true
+eiger_threshold_rbv=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-EIGER:cam1:ThresholdEnergy_RBV|Read||true
+eiger_status=ch.psi.pshell.epics.ChannelString|X11MA-ES1-EIGER:cam1:Acquire|||true
+eiger_bit_depth=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-EIGER:cam1:BitDepth|||true
+eiger_mode=ch.psi.pshell.epics.ChannelInteger|X11MA-ES1-EIGER:cam1:ImageMode|||true
+eiger_exposure=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-EIGER:cam1:AcquireTime 2|||true
+eiger_threshold=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1-EIGER:cam1:ThresholdEnergy|||true
+#Ecrbk=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:CERBK|Read||true
CADC1=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC1|Read||true
CADC2=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC2|Read||true
CADC3=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC3|Read||true
@@ -110,11 +170,16 @@ CADC4=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC4|Read||true
#CADC5=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC5|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
+PEEM_GIRDER_x=ch.psi.pshell.epics.Positioner|X11MA-HG:X_SET X11MA-HG:X1|||true
+PEEM_GIRDER_y=ch.psi.pshell.epics.Positioner|X11MA-HG:Y_SET X11MA-HG:Y1|||true
+PEEM_GIRDER_pitch=ch.psi.pshell.epics.Positioner|X11MA-HG:PITCH_SET X11MA-HG:PITCH1|||true
+PEEM_GIRDER_roll=ch.psi.pshell.epics.Positioner|X11MA-HG:YAW_SET X11MA-HG:YAW1|||
+PEEM_GIRDER_yaw=ch.psi.pshell.epics.Positioner|X11MA-HG:ROLL_SET X11MA-HG:ROLL1|||
+#temp_readout=ch.psi.pshell.epics.ReadonlyProcessVariable|X11MA-PC-SW:Pt100-K|||true
raw=ch.psi.pshell.imaging.CameraSource|eiger|||true
-image2=ch.psi.pshell.imaging.CameraSource|cam2|||true
-img_peemcam=ch.psi.pshell.imaging.CameraSource|peemcam|||true
-#axis=ch.psi.pshell.camserver.CameraStream|http://axis-x11ma.psi.ch/axis-cgi/mjpg/video.cgi?id=176 true||-200|false
-#axis2=ch.psi.pshell.imaging.MjpegSource|http://129.129.121.54/axis-cgi/mjpg/video.cgi?id=0 true||-200|
+#image2=ch.psi.pshell.imaging.CameraSource|cam2|||true
+#img_peemcam=ch.psi.pshell.imaging.CameraSource|peemcam|||true
+axis=ch.psi.pshell.imaging.MjpegSource|http://axis-x11ma.psi.ch/axis-cgi/mjpg/video.cgi?id=176%20true||-200|false
+axis2=ch.psi.pshell.imaging.MjpegSource|http://root:monocam-4@129.129.121.54/axis-cgi/mjpg/video.cgi?id=0 true||-200|
+IMG_BML_RMU1_CAM=ch.psi.pshell.imaging.CameraSource|BML_RMU1_CAM|||true
+IMG_BML_AUSL_CAM=ch.psi.pshell.imaging.CameraSource|BML_AUSL_CAM|||true
diff --git a/config/plugins.properties b/config/plugins.properties
index 1af9151..655300f 100644
--- a/config/plugins.properties
+++ b/config/plugins.properties
@@ -1,19 +1,20 @@
+TestScript.java=disabled
BeamlineInit.java=disabled
Cooling.java=enabled
XPEEM_Settings.java=enabled
Align_ComputeShifts.java=disabled
-Imaging.java=disabled
+Imaging.java=enabled
Initialization.java=disabled
TestLuka.java=disabled
Align_TranslationFilter.java=disabled
ShiftsIO.java=disabled
Align_ComplexEdgeFiltering.java=disabled
-OTFScanBase.java=enabled
-EnergyScanBase.java=enabled
-DelayScanBase.java=enabled
-EnergyScan_TBT.java=enabled
-DelayScan.java=enabled
-EnergyScan.java=enabled
+OTFScanBase.java=disabled
+EnergyScanBase.java=disabled
+DelayScanBase.java=disabled
+EnergyScan_TBT.java=disabled
+DelayScan.java=disabled
+EnergyScan.java=disabled
DataAcquisition.java=enabled
Eiger.java=enabled
Beamline.java=enabled
diff --git a/config/preferences.json b/config/preferences.json
index 5462959..ee15982 100644
--- a/config/preferences.json
+++ b/config/preferences.json
@@ -2,7 +2,7 @@
"fontShellPanel" : {
"name" : "Monospaced",
"style" : 0,
- "size" : 13
+ "size" : 14
},
"fontShellCommand" : {
"name" : "SansSerif",
@@ -17,7 +17,7 @@
"fontEditor" : {
"name" : "Monospaced",
"style" : 0,
- "size" : 13
+ "size" : 15
},
"fontPlotLabel" : {
"name" : "SansSerif",
@@ -81,7 +81,7 @@
"plotBackground" : null,
"gridColor" : null,
"outlineColor" : null,
- "disableOffscreenBuffer" : false,
+ "directRendering" : false,
"defaultPanels" : [ {
"deviceClassName" : "ch.psi.pshell.epics.Scaler",
"panelClassName" : "ch.psi.pshell.swing.ScalerPanel"
diff --git a/config/settings.properties b/config/settings.properties
index 25d6a61..d581818 100644
--- a/config/settings.properties
+++ b/config/settings.properties
@@ -1,10 +1,10 @@
-#Wed Nov 19 10:59:00 CET 2025
+#Wed Dec 17 09:12:58 CET 2025
ALPHA_ID_2=0.0
AUTO_SWITCH_BEAMLINE=false
AUTO_SWITCH_SHUTTER=true
AUTO_SWITCH_VALVE=false
AVERAGING_DETECTOR=true
-DRY_RUN=true
+DRY_RUN=false
ENERGY=565
FdaBrowser=false
HARMONIC_ID_2=1
diff --git a/config/variables.properties b/config/variables.properties
index 73a1a62..5512bff 100644
--- a/config/variables.properties
+++ b/config/variables.properties
@@ -1,4 +1,4 @@
-#Thu Oct 30 16:27:52 CET 2025
-DaySequentialNumber=27
-FileSequentialNumber=156
-LastRunDate=251030
+#Wed Dec 17 09:47:43 CET 2025
+DaySequentialNumber=6
+FileSequentialNumber=633
+LastRunDate=251217
diff --git a/devices/BML_AU_TRXR.properties b/devices/BML_AU_TRXR.properties
new file mode 100644
index 0000000..9a73ddb
--- /dev/null
+++ b/devices/BML_AU_TRXR.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:43 CET 2025
+deadband=0.001275
+defaultSpeed=1.0
+description=AU right jaw
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=40.0
+minSpeed=0.05
+minValue=-7.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_AU_TRXW.properties b/devices/BML_AU_TRXW.properties
new file mode 100644
index 0000000..95eb413
--- /dev/null
+++ b/devices/BML_AU_TRXW.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:42 CET 2025
+deadband=0.001275
+defaultSpeed=1.0
+description=AU left jaw
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=9.0
+minSpeed=0.05
+minValue=-40.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_AU_TRXWR.properties b/devices/BML_AU_TRXWR.properties
new file mode 100644
index 0000000..57bf93c
--- /dev/null
+++ b/devices/BML_AU_TRXWR.properties
@@ -0,0 +1,19 @@
+#Thu Nov 13 18:03:11 CET 2025
+deadband=0.001275
+defaultSpeed=1.0
+description=AU right jaw
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=40.0
+minSpeed=0.05
+minValue=-7.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_AU_TRYB.properties b/devices/BML_AU_TRYB.properties
new file mode 100644
index 0000000..47871a1
--- /dev/null
+++ b/devices/BML_AU_TRYB.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:42 CET 2025
+deadband=0.006375
+defaultSpeed=1.0
+description=AU bottom jaw
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=9.0
+minSpeed=0.05
+minValue=-40.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_AU_TRYT.properties b/devices/BML_AU_TRYT.properties
new file mode 100644
index 0000000..714de8c
--- /dev/null
+++ b/devices/BML_AU_TRYT.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:42 CET 2025
+deadband=0.001275
+defaultSpeed=1.0
+description=AU top jaw
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=40.0
+minSpeed=0.05
+minValue=-11.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_AU_sizeH.properties b/devices/BML_AU_sizeH.properties
new file mode 100644
index 0000000..485dd39
--- /dev/null
+++ b/devices/BML_AU_sizeH.properties
@@ -0,0 +1,19 @@
+#Thu Nov 13 17:37:51 CET 2025
+deadband=NaN
+defaultSpeed=NaN
+description=null
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=NaN
+minSpeed=NaN
+minValue=NaN
+monitorByPosition=false
+offset=0.0
+precision=-1
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=null
diff --git a/devices/BML_AU_sizeV.properties b/devices/BML_AU_sizeV.properties
new file mode 100644
index 0000000..7616187
--- /dev/null
+++ b/devices/BML_AU_sizeV.properties
@@ -0,0 +1,19 @@
+#Thu Nov 13 17:43:15 CET 2025
+deadband=0.005
+defaultSpeed=1.0
+description=AU vertical size
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=10.0
+minSpeed=0.0
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_ROX.properties b/devices/BML_CMU_ROX.properties
new file mode 100644
index 0000000..2a62261
--- /dev/null
+++ b/devices/BML_CMU_ROX.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 09:05:20 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.05
+description=CM roll adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_ROY.properties b/devices/BML_CMU_ROY.properties
new file mode 100644
index 0000000..cb8e478
--- /dev/null
+++ b/devices/BML_CMU_ROY.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 09:05:20 CET 2025
+deadband=2.5E-4
+defaultSpeed=0.1
+description=CM pitch adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=7.0
+minSpeed=0.01
+minValue=-7.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_ROZ.properties b/devices/BML_CMU_ROZ.properties
new file mode 100644
index 0000000..1fb38f7
--- /dev/null
+++ b/devices/BML_CMU_ROZ.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 09:05:20 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.1
+description=CM yaw adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_RX.properties b/devices/BML_CMU_RX.properties
new file mode 100644
index 0000000..2afa043
--- /dev/null
+++ b/devices/BML_CMU_RX.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 22:33:10 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.05
+description=CM roll adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_RX_physical.properties b/devices/BML_CMU_RX_physical.properties
new file mode 100644
index 0000000..b9356a1
--- /dev/null
+++ b/devices/BML_CMU_RX_physical.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 08:49:53 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.05
+description=CM roll adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_RY.properties b/devices/BML_CMU_RY.properties
new file mode 100644
index 0000000..6bdbb15
--- /dev/null
+++ b/devices/BML_CMU_RY.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 22:33:10 CET 2025
+deadband=2.5E-4
+defaultSpeed=0.1
+description=CM pitch adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=7.0
+minSpeed=0.01
+minValue=-7.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_RY_physical.properties b/devices/BML_CMU_RY_physical.properties
new file mode 100644
index 0000000..ce581fa
--- /dev/null
+++ b/devices/BML_CMU_RY_physical.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 08:49:53 CET 2025
+deadband=2.5E-4
+defaultSpeed=0.1
+description=CM pitch adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=7.0
+minSpeed=0.01
+minValue=-7.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_RZ.properties b/devices/BML_CMU_RZ.properties
new file mode 100644
index 0000000..968b253
--- /dev/null
+++ b/devices/BML_CMU_RZ.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 22:33:10 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.1
+description=CM yaw adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_RZ_physical.properties b/devices/BML_CMU_RZ_physical.properties
new file mode 100644
index 0000000..3e7796f
--- /dev/null
+++ b/devices/BML_CMU_RZ_physical.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 08:49:53 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.1
+description=CM yaw adjustment
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_TRY.properties b/devices/BML_CMU_TRY.properties
new file mode 100644
index 0000000..05b860f
--- /dev/null
+++ b/devices/BML_CMU_TRY.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 09:05:20 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.1
+description=CM vertical translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_TRZ.properties b/devices/BML_CMU_TRZ.properties
new file mode 100644
index 0000000..c094c78
--- /dev/null
+++ b/devices/BML_CMU_TRZ.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 09:05:20 CET 2025
+deadband=2.5E-4
+defaultSpeed=0.5
+description=CM transverse translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.05
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_Y.properties b/devices/BML_CMU_Y.properties
new file mode 100644
index 0000000..5c30c64
--- /dev/null
+++ b/devices/BML_CMU_Y.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 22:33:10 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.1
+description=CM vertical translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_Y_physical.properties b/devices/BML_CMU_Y_physical.properties
new file mode 100644
index 0000000..020ea3c
--- /dev/null
+++ b/devices/BML_CMU_Y_physical.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 08:49:53 CET 2025
+deadband=1.25E-4
+defaultSpeed=0.1
+description=CM vertical translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.01
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_Z.properties b/devices/BML_CMU_Z.properties
new file mode 100644
index 0000000..39cb4b5
--- /dev/null
+++ b/devices/BML_CMU_Z.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 22:33:10 CET 2025
+deadband=2.5E-4
+defaultSpeed=0.5
+description=CM transverse translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.05
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_CMU_Z_physical.properties b/devices/BML_CMU_Z_physical.properties
new file mode 100644
index 0000000..c4d905d
--- /dev/null
+++ b/devices/BML_CMU_Z_physical.properties
@@ -0,0 +1,19 @@
+#Sun Nov 23 08:49:53 CET 2025
+deadband=2.5E-4
+defaultSpeed=0.5
+description=CM transverse translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=10.0
+minSpeed=0.05
+minValue=-10.0
+monitorByPosition=false
+offset=0.0
+precision=5
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_DIAG_POSITION.properties b/devices/BML_DIAG_POSITION.properties
new file mode 100644
index 0000000..e1e39b0
--- /dev/null
+++ b/devices/BML_DIAG_POSITION.properties
@@ -0,0 +1,19 @@
+#Thu Dec 11 22:26:23 CET 2025
+deadband=0.01
+defaultSpeed=1.0
+description=Knive edge before ES4
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=10.0
+maxValue=55.0
+minSpeed=0.1
+minValue=-0.001
+monitorByPosition=false
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_FE_centerX.properties b/devices/BML_FE_centerX.properties
new file mode 100644
index 0000000..397eb4f
--- /dev/null
+++ b/devices/BML_FE_centerX.properties
@@ -0,0 +1,19 @@
+#Fri Nov 21 13:51:01 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=slit X center
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_FE_centerY.properties b/devices/BML_FE_centerY.properties
new file mode 100644
index 0000000..2427390
--- /dev/null
+++ b/devices/BML_FE_centerY.properties
@@ -0,0 +1,19 @@
+#Fri Nov 21 13:51:14 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=slit X center
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_FE_sizeX.properties b/devices/BML_FE_sizeX.properties
new file mode 100644
index 0000000..6941a66
--- /dev/null
+++ b/devices/BML_FE_sizeX.properties
@@ -0,0 +1,19 @@
+#Fri Nov 21 13:50:04 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=slit X size
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=4.0
+minSpeed=0.1
+minValue=-2.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=3
+unit=mm
diff --git a/devices/BML_FE_sizeY.properties b/devices/BML_FE_sizeY.properties
new file mode 100644
index 0000000..55324e8
--- /dev/null
+++ b/devices/BML_FE_sizeY.properties
@@ -0,0 +1,19 @@
+#Fri Nov 21 13:49:51 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=slit Y size
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=4.0
+minSpeed=0.1
+minValue=-2.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=3
+unit=mm
diff --git a/devices/BML_FMU_ROTY.properties b/devices/BML_FMU_ROTY.properties
new file mode 100644
index 0000000..3d9d32d
--- /dev/null
+++ b/devices/BML_FMU_ROTY.properties
@@ -0,0 +1,19 @@
+#Thu Nov 20 23:34:41 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=Y Rotation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mm
diff --git a/devices/BML_FMU_TRX.properties b/devices/BML_FMU_TRX.properties
new file mode 100644
index 0000000..55e22f3
--- /dev/null
+++ b/devices/BML_FMU_TRX.properties
@@ -0,0 +1,19 @@
+#Sat Nov 22 11:41:46 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=X Translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=6.05
+minSpeed=0.1
+minValue=-6.05
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mm
diff --git a/devices/BML_FMU_TRYD.properties b/devices/BML_FMU_TRYD.properties
new file mode 100644
index 0000000..1b43500
--- /dev/null
+++ b/devices/BML_FMU_TRYD.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 23:16:28 CET 2025
+deadband=0.001
+defaultSpeed=0.1
+description=Y Downstream
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mm
diff --git a/devices/BML_FMU_TRYUR.properties b/devices/BML_FMU_TRYUR.properties
new file mode 100644
index 0000000..25a1b67
--- /dev/null
+++ b/devices/BML_FMU_TRYUR.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 23:03:59 CET 2025
+deadband=0.005
+defaultSpeed=0.1
+description=Y Upstream Ring
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mm
diff --git a/devices/BML_FMU_TRYUW.properties b/devices/BML_FMU_TRYUW.properties
new file mode 100644
index 0000000..36f4348
--- /dev/null
+++ b/devices/BML_FMU_TRYUW.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 23:02:46 CET 2025
+deadband=0.005
+defaultSpeed=0.1
+description=Y Upstream Wall
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=5.0
+minSpeed=0.1
+minValue=-5.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mm
diff --git a/devices/BML_FMU_X.properties b/devices/BML_FMU_X.properties
new file mode 100644
index 0000000..9b03e0e
--- /dev/null
+++ b/devices/BML_FMU_X.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 22:49:25 CET 2025
+deadband=0.005
+defaultSpeed=0.1
+description=Translation X
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mm
diff --git a/devices/BML_FMU_Y.properties b/devices/BML_FMU_Y.properties
new file mode 100644
index 0000000..04027cc
--- /dev/null
+++ b/devices/BML_FMU_Y.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 22:45:22 CET 2025
+deadband=0.005
+defaultSpeed=0.1
+description=Translation Y
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mm
diff --git a/devices/BML_FMU_YAW.properties b/devices/BML_FMU_YAW.properties
new file mode 100644
index 0000000..97293af
--- /dev/null
+++ b/devices/BML_FMU_YAW.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 23:05:51 CET 2025
+deadband=0.005
+defaultSpeed=0.1
+description=YAW Rotation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=4.0
+minSpeed=0.1
+minValue=-4.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=5
+unit=mrad
diff --git a/devices/BML_RMU1_ROTY.properties b/devices/BML_RMU1_ROTY.properties
new file mode 100644
index 0000000..ff74381
--- /dev/null
+++ b/devices/BML_RMU1_ROTY.properties
@@ -0,0 +1,19 @@
+#Fri Nov 28 17:34:15 CET 2025
+deadband=1.0
+defaultSpeed=0.15
+description=Y Rotation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=4.0
+minSpeed=0.1
+minValue=-6.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_RMU1_TRX.properties b/devices/BML_RMU1_TRX.properties
new file mode 100644
index 0000000..5a2e61e
--- /dev/null
+++ b/devices/BML_RMU1_TRX.properties
@@ -0,0 +1,19 @@
+#Fri Nov 28 17:34:01 CET 2025
+deadband=0.1
+defaultSpeed=0.15
+description=X Translation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=4.0
+minSpeed=0.1
+minValue=-6.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_RMU1_TRYD.properties b/devices/BML_RMU1_TRYD.properties
new file mode 100644
index 0000000..ccb6d2f
--- /dev/null
+++ b/devices/BML_RMU1_TRYD.properties
@@ -0,0 +1,19 @@
+#Wed Nov 26 09:55:53 CET 2025
+deadband=NaN
+defaultSpeed=NaN
+description=null
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=NaN
+minSpeed=NaN
+minValue=NaN
+monitorByPosition=false
+offset=0.0
+precision=-1
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=null
diff --git a/devices/BML_RMU1_TRYDR.properties b/devices/BML_RMU1_TRYDR.properties
new file mode 100644
index 0000000..d6e2f79
--- /dev/null
+++ b/devices/BML_RMU1_TRYDR.properties
@@ -0,0 +1,19 @@
+#Wed Nov 26 11:07:19 CET 2025
+deadband=1.0
+defaultSpeed=0.15
+description=Y Downstream Ring
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=200.0
+minSpeed=0.1
+minValue=-200.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_RMU1_TRYDW.properties b/devices/BML_RMU1_TRYDW.properties
new file mode 100644
index 0000000..7d01233
--- /dev/null
+++ b/devices/BML_RMU1_TRYDW.properties
@@ -0,0 +1,19 @@
+#Wed Nov 26 10:01:08 CET 2025
+deadband=0.001
+defaultSpeed=0.15
+description=Y Downstream Wall
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=200.0
+minSpeed=NaN
+minValue=-200.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_RMU1_TRYU.properties b/devices/BML_RMU1_TRYU.properties
new file mode 100644
index 0000000..b41da19
--- /dev/null
+++ b/devices/BML_RMU1_TRYU.properties
@@ -0,0 +1,19 @@
+#Wed Nov 26 11:06:59 CET 2025
+deadband=1.0
+defaultSpeed=0.15
+description=Y Upstream
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=0.2
+maxValue=200.0
+minSpeed=0.1
+minValue=-200.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_RMU1_TRYUR.properties b/devices/BML_RMU1_TRYUR.properties
new file mode 100644
index 0000000..ccb6d2f
--- /dev/null
+++ b/devices/BML_RMU1_TRYUR.properties
@@ -0,0 +1,19 @@
+#Wed Nov 26 09:55:53 CET 2025
+deadband=NaN
+defaultSpeed=NaN
+description=null
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=NaN
+minSpeed=NaN
+minValue=NaN
+monitorByPosition=false
+offset=0.0
+precision=-1
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=null
diff --git a/devices/BML_RMU1_TRYUW.properties b/devices/BML_RMU1_TRYUW.properties
new file mode 100644
index 0000000..ccb6d2f
--- /dev/null
+++ b/devices/BML_RMU1_TRYUW.properties
@@ -0,0 +1,19 @@
+#Wed Nov 26 09:55:53 CET 2025
+deadband=NaN
+defaultSpeed=NaN
+description=null
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=NaN
+minSpeed=NaN
+minValue=NaN
+monitorByPosition=false
+offset=0.0
+precision=-1
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=null
diff --git a/devices/BML_RMU1_X.properties b/devices/BML_RMU1_X.properties
new file mode 100644
index 0000000..334343f
--- /dev/null
+++ b/devices/BML_RMU1_X.properties
@@ -0,0 +1,19 @@
+#Fri Nov 28 17:43:58 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=Translation X
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=5.0
+minSpeed=0.1
+minValue=-6.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_RMU1_YAW.properties b/devices/BML_RMU1_YAW.properties
new file mode 100644
index 0000000..ae658c2
--- /dev/null
+++ b/devices/BML_RMU1_YAW.properties
@@ -0,0 +1,19 @@
+#Fri Nov 28 17:43:28 CET 2025
+deadband=1.0
+defaultSpeed=0.1
+description=YAW Rotation
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=2.0
+maxValue=70.0
+minSpeed=0.1
+minValue=-70.0
+monitorByPosition=false
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mrad
diff --git a/devices/BML_XBPM_A_TRX.properties b/devices/BML_XBPM_A_TRX.properties
new file mode 100644
index 0000000..10a2c2e
--- /dev/null
+++ b/devices/BML_XBPM_A_TRX.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:42 CET 2025
+deadband=0.005
+defaultSpeed=0.8
+description=XBPM motion X
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=8.5
+maxValue=0.9
+minSpeed=0.1
+minValue=-0.9
+monitorByPosition=true
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=3
+unit=mm
diff --git a/devices/BML_XBPM_A_TRY.properties b/devices/BML_XBPM_A_TRY.properties
new file mode 100644
index 0000000..5222ab5
--- /dev/null
+++ b/devices/BML_XBPM_A_TRY.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:42 CET 2025
+deadband=0.005
+defaultSpeed=0.8
+description=XBPM motion Y
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=8.5
+maxValue=0.9
+minSpeed=0.1
+minValue=-0.9
+monitorByPosition=true
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_XBPM_B_TRX.properties b/devices/BML_XBPM_B_TRX.properties
new file mode 100644
index 0000000..786e4b4
--- /dev/null
+++ b/devices/BML_XBPM_B_TRX.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:43 CET 2025
+deadband=0.005
+defaultSpeed=10.0
+description=SiC Chamber Horizontal
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=10.0
+maxValue=5.0
+minSpeed=2.0
+minValue=-5.0
+monitorByPosition=true
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_XBPM_B_TRY.properties b/devices/BML_XBPM_B_TRY.properties
new file mode 100644
index 0000000..d803b9d
--- /dev/null
+++ b/devices/BML_XBPM_B_TRY.properties
@@ -0,0 +1,19 @@
+#Wed Nov 19 09:53:43 CET 2025
+deadband=0.005
+defaultSpeed=2.5
+description=SiC Chamber Vertical
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=10.0
+maxValue=10.0
+minSpeed=1.0
+minValue=-400.0
+monitorByPosition=true
+offset=0.0
+precision=4
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=mm
diff --git a/devices/BML_energy.properties b/devices/BML_energy.properties
new file mode 100644
index 0000000..b90a396
--- /dev/null
+++ b/devices/BML_energy.properties
@@ -0,0 +1,19 @@
+#Fri Dec 12 14:05:28 CET 2025
+deadband=0.05
+defaultSpeed=NaN
+description=null
+estbilizationDelay=0
+hasEnable=false
+homingType=None
+maxSpeed=NaN
+maxValue=2000.0
+minSpeed=NaN
+minValue=100.0
+monitorByPosition=false
+offset=0.0
+precision=-1
+rotation=false
+scale=1.0
+sign_bit=0
+startRetries=1
+unit=null
diff --git a/devices/IMG_BML_AUSL_CAM.properties b/devices/IMG_BML_AUSL_CAM.properties
new file mode 100644
index 0000000..408eac2
--- /dev/null
+++ b/devices/IMG_BML_AUSL_CAM.properties
@@ -0,0 +1,25 @@
+#Tue Dec 09 16:07:13 CET 2025
+colormap=Grayscale
+colormapAutomatic=false
+colormapLogarithmic=false
+colormapMax=NaN
+colormapMin=NaN
+flipHorizontally=false
+flipVertically=false
+grayscale=false
+invert=false
+rescaleFactor=1.0
+rescaleOffset=0.0
+roiHeight=-1
+roiWidth=-1
+roiX=0
+roiY=0
+rotation=0.0
+rotationCrop=false
+scale=1.0
+spatialCalOffsetX=NaN
+spatialCalOffsetY=NaN
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+spatialCalUnits=mm
+transpose=false
diff --git a/devices/IMG_BML_RMU1_CAM.properties b/devices/IMG_BML_RMU1_CAM.properties
new file mode 100644
index 0000000..0d4f910
--- /dev/null
+++ b/devices/IMG_BML_RMU1_CAM.properties
@@ -0,0 +1,25 @@
+#Wed Nov 19 16:22:47 CET 2025
+colormap=Grayscale
+colormapAutomatic=false
+colormapLogarithmic=false
+colormapMax=NaN
+colormapMin=NaN
+flipHorizontally=false
+flipVertically=false
+grayscale=false
+invert=false
+rescaleFactor=1.0
+rescaleOffset=0.0
+roiHeight=-1
+roiWidth=-1
+roiX=0
+roiY=0
+rotation=0.0
+rotationCrop=false
+scale=1.0
+spatialCalOffsetX=NaN
+spatialCalOffsetY=NaN
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+spatialCalUnits=mm
+transpose=false
diff --git a/devices/PEEM_GIRDER_pitch.properties b/devices/PEEM_GIRDER_pitch.properties
new file mode 100644
index 0000000..082ff96
--- /dev/null
+++ b/devices/PEEM_GIRDER_pitch.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:34:17 CET 2025
+deadband=NaN
+description=pitch set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mrad
diff --git a/devices/PEEM_GIRDER_roll.properties b/devices/PEEM_GIRDER_roll.properties
new file mode 100644
index 0000000..f10693b
--- /dev/null
+++ b/devices/PEEM_GIRDER_roll.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:34:17 CET 2025
+deadband=NaN
+description=yaw set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mrad
diff --git a/devices/PEEM_GIRDER_x.properties b/devices/PEEM_GIRDER_x.properties
new file mode 100644
index 0000000..2a95d3e
--- /dev/null
+++ b/devices/PEEM_GIRDER_x.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:34:17 CET 2025
+deadband=NaN
+description=x set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mm
diff --git a/devices/PEEM_GIRDER_y.properties b/devices/PEEM_GIRDER_y.properties
new file mode 100644
index 0000000..5523580
--- /dev/null
+++ b/devices/PEEM_GIRDER_y.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:34:17 CET 2025
+deadband=NaN
+description=y set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mm
diff --git a/devices/PEEM_GIRDER_yaw.properties b/devices/PEEM_GIRDER_yaw.properties
new file mode 100644
index 0000000..66a1426
--- /dev/null
+++ b/devices/PEEM_GIRDER_yaw.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:34:17 CET 2025
+deadband=NaN
+description=roll set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mrad
diff --git a/devices/girder_pitch.properties b/devices/girder_pitch.properties
new file mode 100644
index 0000000..df3214b
--- /dev/null
+++ b/devices/girder_pitch.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:26:37 CET 2025
+deadband=NaN
+description=pitch set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mrad
diff --git a/devices/girder_roll.properties b/devices/girder_roll.properties
new file mode 100644
index 0000000..c0deecb
--- /dev/null
+++ b/devices/girder_roll.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:32:15 CET 2025
+deadband=NaN
+description=yaw set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mrad
diff --git a/devices/girder_yaw.properties b/devices/girder_yaw.properties
new file mode 100644
index 0000000..0b1e4fd
--- /dev/null
+++ b/devices/girder_yaw.properties
@@ -0,0 +1,11 @@
+#Fri Nov 28 00:32:15 CET 2025
+deadband=NaN
+description=roll set point
+maxValue=2.0
+minValue=-2.0
+offset=0.0
+precision=3
+rotation=false
+scale=1.0
+sign_bit=0
+unit=mrad
diff --git a/devices/image.properties b/devices/image.properties
index 3d348d6..359cccc 100644
--- a/devices/image.properties
+++ b/devices/image.properties
@@ -1,8 +1,8 @@
-#Mon Oct 27 13:27:27 CET 2025
+#Mon Dec 15 12:53:06 CET 2025
colormap=Grayscale
colormapAutomatic=false
colormapLogarithmic=false
-colormapMax=9.0
+colormapMax=1.0
colormapMin=0.0
flipHorizontally=false
flipVertically=false
diff --git a/devices/img_0.tiff.properties b/devices/img_0.tiff.properties
new file mode 100644
index 0000000..32b6646
--- /dev/null
+++ b/devices/img_0.tiff.properties
@@ -0,0 +1,20 @@
+#Wed Nov 26 16:18:31 CET 2025
+flipHorizontally=false
+flipVertically=false
+grayscale=false
+invert=false
+rescaleFactor=1.0
+rescaleOffset=0.0
+roiHeight=-1
+roiWidth=-1
+roiX=0
+roiY=0
+rotation=0.0
+rotationCrop=false
+scale=1.0
+spatialCalOffsetX=NaN
+spatialCalOffsetY=NaN
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+spatialCalUnits=mm
+transpose=false
diff --git a/devices/raw.properties b/devices/raw.properties
index ed88e18..6edda20 100644
--- a/devices/raw.properties
+++ b/devices/raw.properties
@@ -1,7 +1,7 @@
-#Thu Sep 25 10:22:27 CEST 2025
+#Wed Nov 19 22:11:35 CET 2025
colormap=Flame
colormapAutomatic=true
-colormapLogarithmic=false
+colormapLogarithmic=true
colormapMax=1.0
colormapMin=0.0
flipHorizontally=false
diff --git a/devices/scan_1_AxisData_0000.tiff.properties b/devices/scan_1_AxisData_0000.tiff.properties
new file mode 100644
index 0000000..457cfd0
--- /dev/null
+++ b/devices/scan_1_AxisData_0000.tiff.properties
@@ -0,0 +1,20 @@
+#Thu Nov 27 13:11:24 CET 2025
+flipHorizontally=false
+flipVertically=false
+grayscale=false
+invert=false
+rescaleFactor=1.0
+rescaleOffset=0.0
+roiHeight=-1
+roiWidth=-1
+roiX=0
+roiY=0
+rotation=0.0
+rotationCrop=false
+scale=1.0
+spatialCalOffsetX=NaN
+spatialCalOffsetY=NaN
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+spatialCalUnits=mm
+transpose=false
diff --git a/devices/txt.tiff.properties b/devices/txt.tiff.properties
new file mode 100644
index 0000000..cbb88dd
--- /dev/null
+++ b/devices/txt.tiff.properties
@@ -0,0 +1,20 @@
+#Wed Nov 26 16:16:02 CET 2025
+flipHorizontally=false
+flipVertically=false
+grayscale=false
+invert=false
+rescaleFactor=1.0
+rescaleOffset=0.0
+roiHeight=-1
+roiWidth=-1
+roiX=0
+roiY=0
+rotation=0.0
+rotationCrop=false
+scale=1.0
+spatialCalOffsetX=NaN
+spatialCalOffsetY=NaN
+spatialCalScaleX=NaN
+spatialCalScaleY=NaN
+spatialCalUnits=mm
+transpose=false
diff --git a/plugins/Cooling.form b/plugins/Cooling.form
index df4a590..fd6a5ac 100644
--- a/plugins/Cooling.form
+++ b/plugins/Cooling.form
@@ -149,12 +149,12 @@
-
+
-
+
diff --git a/plugins/Cooling.java b/plugins/Cooling.java
index ab9bd90..73d6b04 100644
--- a/plugins/Cooling.java
+++ b/plugins/Cooling.java
@@ -134,9 +134,9 @@ public class Cooling extends Panel {
label2.setText("He Flow Meter");
panelHeFlowSet.setDecimals(3);
- panelHeFlowSet.setName("X11MA-PC-BRONKHORST:PEEM-SET-SETPOINT"); // NOI18N
+ panelHeFlowSet.setName("X11MA-CPCL-BRONKHORST:PEEM-SET-SETPOINT"); // NOI18N
- panelHeFlowGet.setName("X11MA-PC-BRONKHORST:PEEM-GET-MEASURE"); // NOI18N
+ panelHeFlowGet.setName("X11MA-CPCL-BRONKHORST:PEEM-GET-MEASURE"); // NOI18N
jLabel1.setFont(new java.awt.Font("DejaVu Sans", 1, 12)); // NOI18N
jLabel1.setText("LEEM Filament");
diff --git a/script/Users/PEEM/Armin/test.py b/script/Users/PEEM/Armin/test.py
index 5d88966..fb96377 100644
--- a/script/Users/PEEM/Armin/test.py
+++ b/script/Users/PEEM/Armin/test.py
@@ -1,2 +1,2 @@
#cscan([girder_x], ['ca://machine_cur'], [0.16], [0.18], [0.01], latency=1.0, time=10.0, relative=False, passes=1, zigzag=False, keep=False, name='Unknown')
-cscan(girder_x, machine_cur, 0.16, 0.18, 0.01)
\ No newline at end of file
+cscan(girder_x, SR_current, 0.16, 0.18, 0.01)
\ No newline at end of file
diff --git a/script/beamline_alignment/0012.json b/script/beamline_alignment/0012.json
deleted file mode 100644
index 10eed5b..0000000
--- a/script/beamline_alignment/0012.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "CMU": {
- "CMU_Ry": {
- "value": 0.18337499999999998,
- "tolerance": 0.0001
- },
- "CMU_Rx": {
- "value": 11.644256250000002,
- "tolerance": 0.0001
- },
- "CMU_Rz": {
- "value": 3.0822062500000005,
- "tolerance": 0.0001
- },
- "CMU_baffle": {
- "value": 0.0,
- "tolerance": 0.0001
- },
- "CMU_X": {
- "value": -0.90653125,
- "tolerance": 0.0001
- },
- "CMU_Y": {
- "value": 1.6755312500000001,
- "tolerance": 0.0001
- },
- "CMU_Z": {
- "value": -0.26413437500000003,
- "tolerance": 0.0001
- }
- },
- "Diag": {
- "select": {
- "value": "Photodiode",
- "tolerance": 0.0
- },
- "position": {
- "value": 27.999899999999997,
- "tolerance": 0.1
- }
- },
- "ESLIT": {
- "width": {
- "value": 20.0,
- "tolerance": 1.0
- },
- "position": {
- "value": 12.4625,
- "tolerance": 0.1
- }
- },
- "SR": {
- "SR_orbit-X-RMS": {
- "value": 0.12711276155333132,
- "tolerance": 0.0001
- },
- "SR_life_time": {
- "value": 12.446634499727455,
- "tolerance": 0.0001
- },
- "SR_current": {
- "value": 399.8668489456177,
- "tolerance": 0.0001
- },
- "SR_orbit-Y-RMS": {
- "value": 0.12815728431397083,
- "tolerance": 0.0001
- }
- }
-}
\ No newline at end of file
diff --git a/script/beamline_alignment/01_beamline_functions.py b/script/beamline_alignment/01_beamline_functions.py
new file mode 100644
index 0000000..55469cc
--- /dev/null
+++ b/script/beamline_alignment/01_beamline_functions.py
@@ -0,0 +1,46 @@
+def close_FE_slits():
+
+
+ BML_FE_sizeX.setSpeed(0.4)
+ BML_FE_sizeY.setSpeed(0.4)
+
+ BML_FE_sizeX.moveAsync(0.0)
+ BML_FE_sizeY.move(0.0)
+
+ BML_FE_sizeX.setSpeed(0.1)
+ BML_FE_sizeY.setSpeed(0.1)
+
+def open_AU_slits():
+
+ BML_AU_TRYB.moveAsync(-5.0)
+ BML_AU_TRYT.moveAsync(5.0)
+ BML_AU_TRXW.moveAsync(-5.0)
+ BML_AU_TRXR.moveAsync(5.0)
+
+
+def range_to_number(selection):
+
+ selection = selection.strip()
+ mapping = [
+ "AUTO",
+ "20 mA", "2 mA",
+ "200 uA", "20 uA", "2 uA",
+ "200 nA", "20 nA", "2 nA",
+ "200 pA", "20 pA"
+ ]
+ try:
+ return mapping.index(selection)
+ except:
+ raise Exception("Invalid selection: " + str(selection))
+
+
+def select_Keithley_11_range():
+
+ msg = "Select range Keithley 11: "
+
+ Keithley_11_range = get_string(msg, default = "AUTO", alternatives = ["AUTO", "20 mA", "2 mA", "200 uA", "20 uA","2 uA", "200 nA", "20 nA", "2 nA", "200 pA", "20 pA"], password = False)
+# print(Keithley_11_range)
+ return Keithley_11_range
+
+
+
diff --git a/script/beamline_alignment/beamline_configuration.py b/script/beamline_alignment/02_beamline_configuration.py
old mode 100755
new mode 100644
similarity index 55%
rename from script/beamline_alignment/beamline_configuration.py
rename to script/beamline_alignment/02_beamline_configuration.py
index 96829f7..eb19c7c
--- a/script/beamline_alignment/beamline_configuration.py
+++ b/script/beamline_alignment/02_beamline_configuration.py
@@ -1,43 +1,105 @@
+# This script contains seveal user functions:
+# 1 bml_save_current_settings()
+# 2 bml_current_settings_for_functions()
+# 3 bml_display_current_settings()
+# 4 bml_restore_saved_settings()
+# 5 bml_display_saved_settings()
+# 6 bml_show_difference_to_saved_settings()
+
+# A bit more in detail:
+# 1 bml_save_current_settings()
+# 2 save_data_and_config(default_dir=DATA_DIR, default_name=None):
+# 3 select_components(selected_components=None) - is called by the following functions)
+# 4 bml_display_current_settings(selected_components=None)
+# 5 bml_restore_saved_settings(selected_components=None)
+# 6 bml_display_saved_settings(selected_components=None)
+# 7 bml_show_difference_to_saved_settings(selected_components=None)
+# see also Python Projekte/Strings in Datei speichern
+
from collections import OrderedDict
import os
import json
+import shutil
-# This script contains seveal functions:
-# 1 bml_save_current_settings()
-# 2 (select_components(selected_components=None) - is called by the following functions)
-# 3 bml_display_current_settings(selected_components=None)
-# 4 bml_restore_saved_settings(selected_components=None)
-# 5 bml_display_saved_settings(selected_components=None)
-# 6 bml_show_difference_to_saved_settings(selected_components=None)
-# see also Python Projekte/Strings in Datei speichern
+from javax.swing import JFrame, JFileChooser
+from javax.swing.filechooser import FileNameExtensionFilter
+from java.io import File
+
+BEAMLINE_PARAMETERS_FILE = "/home/gac-x11ma/pshell/home/script/beamline_alignment/bml_align_params.json"
+DATA_FILE = "/home/gac-x11ma/pshell/home/data/2025_11/20251113/Monocam_AU_131.json"
+DATA_DIR = "/home/gac-x11ma/network_drives/home/Data/2025_11/"
-BEAMLINE_PARAMETERS_FILE = "/sls/X11MA/data/X11MA/pshell/home/script/beamline_alignment/bml_align_params.json"
-DATA_FILE = "/sls/X11MA/data/X11MA/pshell/home/data/2025_11/20251113/Monocam_AU_083.json"
#DATA_FILE = "/sls/X11MA/data/X11MA/scans/2511/0081.json"
+#DATA_FILE = "/home/gac-x11ma/pshell/home/data/2025_11/20251113/Monocam_AU_131.json"
+#DATA_DIR = "/home/gac-x11ma/pshell/home/data/2025_11/"
+
+def save_data_and_config(default_dir=DATA_DIR, default_name=None, save_dialog=True):
+ """
+ Offnet einen JSON-Datei-Dialog.
+
+ Parameter:
+ default_dir (str): Optionaler Standardordner
+ default_name (str): Optionaler Standard-Dateiname (nur relevant beim Speichern)
+ save_dialog (bool): True = "Speichern unter", False = "Offnen"
+
+ Ruckgabe:
+ tuple (full_path, name_without_ext) oder (None, None), falls abgebrochen
+ """
+ frame = JFrame()
+ frame.setAlwaysOnTop(True)
+
+ chooser = JFileChooser()
+
+ # Default-Ordner setzen
+ if default_dir:
+ chooser.setCurrentDirectory(File(default_dir))
+
+ # Default-Dateiname nur beim Speichern
+ if save_dialog and default_dir and default_name:
+ chooser.setSelectedFile(File(default_dir, default_name))
+
+ # JSON-Filter
+ json_filter = FileNameExtensionFilter("JSON Dateien (*.json)", ["json"])
+ chooser.setFileFilter(json_filter)
+
+ # Dialog anzeigen
+ if save_dialog:
+ result = chooser.showSaveDialog(frame)
+ else:
+ result = chooser.showOpenDialog(frame)
+
+ if result == JFileChooser.APPROVE_OPTION:
+ file = chooser.getSelectedFile()
+ path = file.getAbsolutePath()
+
+ # Nur beim Speichern: sicherstellen, dass .json angehangt wird
+ if save_dialog and not path.lower().endswith(".json"):
+ path += ".json"
+
+ name_without_ext = os.path.splitext(os.path.basename(path))[0]
+ return path, name_without_ext
+ else:
+ return None, None
def bml_save_current_settings():
+ # Allows the user to save relevant beamline parameters in aJSON file.
- #Allows the user to save relevant beamline parameters in aJSON file.
-
- msg = "Save as ..."
- # User inputs the file path
- path = get_string(msg, default = DATA_FILE, alternatives = None, password = False)
+ path, name_only = save_data_and_config(default_dir=DATA_DIR, default_name=None, save_dialog=True)
# 1 Check if the user cancelled
if path is None:
print("Aborted by user.")
- return # ✅ exit the function immediately
+ return # exit the function immediately
# 2 Get the parent folder of the file
folder = os.path.dirname(path)
-# print(folder)
-
- # 3 ️Check if the folder exists
+ #print(folder)
+ # 3 Check if the folder exists
if not os.path.isdir(folder):
- print ("Aborted. Folder: " + folder + " does not exist.")
- return # ✅ exit the function cleanly
-
+ print("Aborted. Folder: " + folder + " does not exist.")
+ return # exit the function cleanly
+
# 4 Mapping from component + parameter to individual read string (Dictionary)
# Each component contains its parameters, with the corresponding read string
# and optional tolerance
@@ -47,31 +109,31 @@ def bml_save_current_settings():
parameters = {}
nan_occurred = False
- # 5️ Read each parameter from the machine
+ # 5 read each parameter from the machoine
for comp, param_dict in machine_parameters.items():
print("\nComponent: " + comp)
parameters[comp] = {}
for p, info in param_dict.items():
cmd = info["read_cmd"]
- #print(cmd)
+ # print(cmd)
tol = info["tolerance"]
- #print(tol)
+ # print(tol)
try:
value = caget(cmd)
if isinstance(value, str):
display_value = value
else:
- #value = string(value) c ensure float
+ # value = string(value) c ensure float
display_value = str(value)
print(comp + "_" + p + " = " + display_value)
-# print(value)
+ # print(value)
except:
-# print("Problem")
-# value = float('nan')
+ # print("Problem")
+ # value = float('nan')
nan_occurred = True
print(comp + p + " = NaN")
parameters[comp][p] = {"value": value, "tolerance": tol}
-
+
# 6 Save parameters to JSON file
try:
with open(path, "w") as f:
@@ -84,15 +146,108 @@ def bml_save_current_settings():
if nan_occurred:
print("There were NaN-Values")
-def select_components(selected_components=None):
+ return path, name_only
+
+def bml_save_scan_settings_json(path):
+
+ # 1 Mapping from component + parameter to individual read string (Dictionary)
+ # Each component contains its parameters, with the corresponding read string
+ # and optional tolerance
+
+ with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
+ machine_parameters = json.load(f, object_pairs_hook=OrderedDict)
+
+ parameters = {}
+ nan_occurred = False
+
+ # 2 read each parameter from the machoine
+ for comp, param_dict in machine_parameters.items():
+ print("\nComponent: " + comp)
+ parameters[comp] = {}
+ for p, info in param_dict.items():
+ cmd = info["read_cmd"]
+ # print(cmd)
+ tol = info["tolerance"]
+ # print(tol)
+ try:
+ value = caget(cmd)
+ if isinstance(value, str):
+ display_value = value
+ else:
+ # value = string(value) c ensure float
+ display_value = str(value)
+ print(comp + "_" + p + " = " + display_value)
+ # print(value)
+ except:
+ # print("Problem")
+ # value = float('nan')
+ nan_occurred = True
+ print(comp + p + " = NaN")
+ parameters[comp][p] = {"value": value, "tolerance": tol}
+
+ # 3 Save parameters to JSON file
+
+ file_path = path + "/bml_settings_after_scan.json"
+
+ try:
+ with open(file_path, "w") as f:
+ json.dump(parameters, f, indent=4, allow_nan=True)
+ print("Parameters successfully saved in: " + file_path)
+ except:
+ print("Error while saving file.")
+
+ # Warn if NaN occurred
+ if nan_occurred:
+ print("There were NaN-Values")
+
+
+def bml_current_settings_for_functions():
+
+ # 4 Mapping from component + parameter to individual read string (Dictionary)
+ # Each component contains its parameters, with the corresponding read string
+ # and optional tolerance
+ with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
+ machine_parameters = json.load(f, object_pairs_hook=OrderedDict)
+
+ parameters = {}
+ nan_occurred = False
+
+ # 5 read each parameter from the machoine
+ for comp, param_dict in machine_parameters.items():
+ print("\nComponent: " + comp)
+ parameters[comp] = {}
+ for p, info in param_dict.items():
+ cmd = info["read_cmd"]
+ # print(cmd)
+ tol = info["tolerance"]
+ # print(tol)
+ try:
+ value = caget(cmd)
+ if isinstance(value, str):
+ display_value = value
+ else:
+ # value = string(value) c ensure float
+ display_value = str(value)
+ print(comp + "_" + p + " = " + display_value)
+ # print(value)
+ except:
+ # print("Problem")
+ # value = float('nan')
+ nan_occurred = True
+ print(comp + p + " = NaN")
+ parameters[comp][p] = {"value": value, "tolerance": tol}
+
+ return parameters
+
+def select_components(selected_components=None):
# Allows the user (or another function) to select one
# or more components either interactively or
# by providing a list. It validates the selection against
# the available components in the JSON file.
msg = "Select components: "
-
+
# 1 Load machine parameters
try:
with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
@@ -103,81 +258,79 @@ def select_components(selected_components=None):
# 2 Extract component names
all_components = list(machine_parameters.keys())
-# print("Available components:")
-# for comp in all_components:
-# print("- " + comp)
+ # print("Available components:")
+ # for comp in all_components:
+ # print("- " + comp)
# 3 determine components to display
if selected_components is None:
-
+
# user didn't specify -> use all from JSON
presented_to_select = all_components[:]
presented_to_select.append("all")
- selected = get_string(msg, default = None, alternatives = presented_to_select, password = False)
- #print(selected)
+ selected = get_string(msg, default=None, alternatives=presented_to_select, password=False)
+ # print(selected)
if selected is None:
print("Selection aborted by user.")
return None
elif selected == "all":
- # Display components
- print("Selected components:")
- for comp in all_components:
- print("- " + comp)
- return all_components
+ # Display components
+ print("Selected components:")
+ for comp in all_components:
+ print("- " + comp)
+ return all_components
else:
- selected_components = [selected] if not isinstance(selected, list) else selected
- print("Selected components:")
- for comp in selected_components:
- print("- " + comp)
- return selected_components
+ selected_components = [selected] if not isinstance(selected, list) else selected
+ print("Selected components:")
+ for comp in selected_components:
+ print("- " + comp)
+ return selected_components
- elif selected_components == "all":
+ elif selected_components == "all":
# Display components
print("Selected components:")
for comp in all_components:
print("- " + comp)
return all_components
-
+
else:
# ensure it is a list
if not isinstance(selected_components, list):
print("Error: selected_components must be a list of the form \"[\"Diag\", \"CMU\", ...]\" or \"all\".")
- return
- # validate each component
+ return
+ # validate each component
invalid = [c for c in selected_components if c not in all_components]
if invalid:
- print("Error: Invalid component(s):")
- for comp in invalid:
- print("- " + comp)
-
- print("Valid components are:")
- for comp in all_components:
- print("- " + comp)
-
- return None
- else:
- print("Selected components:")
- for comp in selected_components:
+ print("Error: Invalid component(s):")
+ for comp in invalid:
print("- " + comp)
- return selected_components
+
+ print("Valid components are:")
+ for comp in all_components:
+ print("- " + comp)
+
+ return None
+ else:
+ print("Selected components:")
+ for comp in selected_components:
+ print("- " + comp)
+ return selected_components
-def bml_display_current_settings(selected_components=None):
-
+def bml_display_current_settings(selected_components=None):
# Displays parameters for selected components.
# - Uses select_components() to choose components.
# - Prints each parameter with its value.
# - If a parameter value is missing or cannot be read, prints NaN.
-
- # 1️ Get the selected components (interactive or via argument)
+ # 1 Get the selected component
selection = select_components(selected_components)
if selection is None:
return # user cancelled or invalid input
- # 2️ Load the machine parameters JSON
+ # 2 Load the machine poarametrers JSON
try:
with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
machine_parameters = json.load(f, object_pairs_hook=OrderedDict)
@@ -185,7 +338,7 @@ def bml_display_current_settings(selected_components=None):
print("Error loading machine_parameters.json")
return
- # 3️ Loop through components and display their parameters
+ # 3 Loop through the components and display their parameters
for comp in selection:
print("\nComponent: " + comp)
params = machine_parameters.get(comp, {})
@@ -195,9 +348,9 @@ def bml_display_current_settings(selected_components=None):
for key, param_info in params.items():
- # param_info enthält z.B. den read_cmd
- read_cmd = param_info.get("read_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
-
+ # param_info enthalt z.B. den read_cmd
+ read_cmd = param_info.get("read_cmd") # JSON muss fur jeden Parameter den entsprechenden Befehl enthalten
+
try:
display_value = caget(read_cmd)
print(key + " = " + str(display_value))
@@ -206,18 +359,17 @@ def bml_display_current_settings(selected_components=None):
# print(" " + key + ": " + display_value)
def bml_restore_saved_settings(selected_components=None):
-
# Restore parameter values from a previously saved JSON file.
# The user selects which components to restore, and only parameters
# marked as "restorable": true in machine_parameters.json will be written back.
- msg = "Open *.json configuration file ..."
+ restore_file, name_only = save_data_and_config(default_dir=DATA_DIR, default_name=None, save_dialog=False)
# 1 Select file
- restore_file = get_string(msg, default = DATA_FILE, alternatives = None, password = False)
- if restore_file is None:
- print("Restore aborted: no file specified.")
- return
+ # restore_file = get_string(msg, default = DATA_FILE, alternatives = None, password = False)
+ # if path is None:
+ # print("Restore aborted: no file specified.")
+ # return
try:
with open(restore_file, "r") as f:
@@ -266,23 +418,23 @@ def bml_restore_saved_settings(selected_components=None):
if not param_info.get("restorable", False):
continue
- # get saved value
+ # get saved value
saved_entry = saved_params.get(key, None)
if saved_entry is not None and 'value' in saved_entry:
saved_value = saved_entry['value']
else:
saved_value = "NaN"
- # param_info enthält z.B. den read_cmd
- read_cmd = param_info.get("read_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
- write_cmd = param_info.get("write_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
+ # param_info enthalt z.B. den read_cmd
+ read_cmd = param_info.get("read_cmd") # JSON muss fur jeden Parameter den entsprechenden Befehl enthalten
+ write_cmd = param_info.get("write_cmd") # JSON muss fur jeden Parameter den entsprechenden Befehl enthalten
tolerance = param_info.get("tolerance")
-
+
try:
display_value = caget(read_cmd)
# print(read_cmd + " = " + str(display_value) + ", saved value = " + str(saved_value))
# difference = float(display_value) - float(saved_value)
- # compute difference if possible
+ # compute difference if possible
if saved_value != "NaN" and display_value != "NaN":
try:
difference = abs(float(display_value) - float(saved_value))
@@ -294,7 +446,7 @@ def bml_restore_saved_settings(selected_components=None):
if float(difference) > float(tolerance):
print(key + " - Not OK. Set to " + str(round(saved_value, 5)))
write_cmd_new = "\"" + write_cmd + "\""
- #print(write_cmd_new)
+ # print(write_cmd_new)
caput(write_cmd, float(saved_value))
check_restored_value = caget(read_cmd)
print(key + " - Reads now: " + str(check_restored_value))
@@ -303,21 +455,22 @@ def bml_restore_saved_settings(selected_components=None):
except:
display_value = "NaN"
# print(" " + key + ": " + display_value)
-
+
+
def bml_display_saved_settings(selected_components=None):
-
# Diplay parameter values from a previously saved JSON file.
# The user selects which components to restore, and only parameters
# marked as "restorable": true in machine_parameters.json will be written back.
- msg = "Open *.json configuration file ..."
+ # msg = "Open *.json configuration file ..."
+ restore_file, name_only = save_data_and_config(default_dir=DATA_DIR, default_name=None, save_dialog=False)
# 1 Select file
- #restore_file = get_string(msg, default = "/sls/X11MA/data/X11MA/scans/2511/0012.json", alternatives = None, password = False)
- restore_file = get_string(msg, default = DATA_FILE, alternatives = None, password = False)
- if restore_file is None:
- print("Restore aborted: no file specified.")
- return
+ # restore_file = get_string(msg, default = "/sls/X11MA/data/X11MA/scans/2511/0012.json", alternatives = None, password = False)
+ # path = get_string(msg, default = DATA_FILE, alternatives = None, password = False)
+ # if restore_file is None:
+ # print("Restore aborted: no file specified.")
+ # return
try:
with open(restore_file, "r") as f:
@@ -363,30 +516,28 @@ def bml_display_saved_settings(selected_components=None):
for key, param_info in params.items():
-# if not param_info.get("restorable", False):
-# continue
+ # if not param_info.get("restorable", False):
+ # continue
- # get saved value
+ # get saved value
saved_entry = saved_params.get(key, None)
if saved_entry is not None and 'value' in saved_entry:
saved_value = saved_entry['value']
-
+
else:
saved_value = "NaN"
-
+
print(key + " was: " + str(saved_value))
-def bml_show_difference_to_saved_settings(selected_components=None):
+def bml_show_difference_to_saved_settings(selected_components=None):
# Restore parameter values from a previously saved JSON file.
# The user selects which components to restore, and only parameters
# marked as "restorable": true in machine_parameters.json will be written back.
- msg = "Open *.json configuration file ..."
+ restore_file, name_only = save_data_and_config(default_dir=DATA_DIR, default_name=None, save_dialog=False)
- # 1 Select file
- restore_file = get_string(msg, default = DATA_FILE, alternatives = None, password = False)
- #restore_file = get_string(msg, default = "/sls/X11MA/data/X11MA/scans/2511/0012.json", alternatives = None, password = False)
+ # restore_file = get_string(msg, default = "/sls/X11MA/data/X11MA/scans/2511/0012.json", alternatives = None, password = False)
if restore_file is None:
print("Restore aborted: no file specified.")
return
@@ -435,26 +586,26 @@ def bml_show_difference_to_saved_settings(selected_components=None):
for key, param_info in params.items():
-# if not param_info.get("restorable", False):
-# continue
+ # if not param_info.get("restorable", False):
+ # continue
- # get saved value
+ # get saved value
saved_entry = saved_params.get(key, None)
if saved_entry is not None and 'value' in saved_entry:
saved_value = saved_entry['value']
else:
saved_value = "NaN"
- # param_info enthält z.B. den read_cmd
- read_cmd = param_info.get("read_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
-# write_cmd = param_info.get("write_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
+ # param_info enthalt z.B. den read_cmd
+ read_cmd = param_info.get("read_cmd") # JSON muss fur jeden Parameter den entsprechenden Befehl enthalten
+ # write_cmd = param_info.get("write_cmd") # JSON muss fur jeden Parameter den entsprechenden Befehl enthalten
tolerance = param_info.get("tolerance")
-
+
try:
display_value = caget(read_cmd)
# print(read_cmd + " = " + str(display_value) + ", saved value = " + str(saved_value))
# difference = float(display_value) - float(saved_value)
- # compute difference if possible
+ # compute difference if possible
if saved_value != "NaN" and display_value != "NaN":
try:
difference = abs(float(display_value) - float(saved_value))
@@ -465,17 +616,14 @@ def bml_show_difference_to_saved_settings(selected_components=None):
# print(read_cmd + " = " + str(display_value) + ", diff = " + str(round(difference, 5)) + ", tolerance = " + str(round(tolerance, 5)))
if float(difference) > float(tolerance):
print(key + " - Differs from saved value: " + str(round(saved_value, 5)))
-# write_cmd_new = "\"" + write_cmd + "\""
- #print(write_cmd_new)
-# caput(write_cmd, float(saved_value))
-# check_restored_value = caget(read_cmd)
-# print(key + " - Reads now: " + str(check_restored_value))
+ # write_cmd_new = "\"" + write_cmd + "\""
+ # print(write_cmd_new)
+ # caput(write_cmd, float(saved_value))a
+ # check_restored_value = caget(read_cmd)
+ # print(key + " - Reads now: " + str(check_restored_value))
else:
print(key + " - OK.")
except:
display_value = "NaN"
# print(" " + key + ": " + display_value)
-
-# print("Component:", comp)
-# run('beamline_init/with_x-rays/functions/SlitCalib.py')
\ No newline at end of file
diff --git a/script/beamline_alignment/03_AU_scan.py b/script/beamline_alignment/03_AU_scan.py
new file mode 100644
index 0000000..d5f0952
--- /dev/null
+++ b/script/beamline_alignment/03_AU_scan.py
@@ -0,0 +1,279 @@
+import os
+import time
+import random
+
+
+# 2025.11.15, beamline commissioning, A. Kleibert, C.A.F. Vaz
+# Functions here require to compile first beamline_configurations.py and probably also beamline_functions.py
+# path, name_only = bml_save_current_settings()
+#
+# We used monocam-4@129.129.121.54 with neutral density filters to image the beam after on the AV- blade of
+# the aperture unit aftethe CMU at fully open front end slit.
+#
+# FE_slit_scan_on_AU() is a pressure supervising code to take images while opening the FE slits.
+
+
+def take_image_and_save_data():
+ path, name_only = bml_save_current_settings()
+ # output_file = os.path.join(os.path.dirname(path), "Monocam_AU_"+name_only + ".jpg")
+ output_file = "/sls/X11MA/data/X11MA/pshell/home/data/2025_11/20251115/AU scans/" + name_only + ".jpg"
+ cmd = " curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o " + output_file
+ os.system(cmd)
+
+ # cmd2 = "cp " + output_file + " " + copy_file
+ # cp -u *.jpg /sls/X11MA/data/X11MA/scratch/kleibert/20251113/
+ # copy_file = "/sls/X11MA/data/X11MA/scratch/kleibert/20251113/Monocam_AU_" + name_only + ".jpg"
+ # cmd = ["curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o ", output_file]
+ # os.system(cmd)
+
+
+
+def FE_slit_quick_photo_AU():
+
+ BML_FE_sizeX.setSpeed(0.4)
+ BML_FE_sizeY.setSpeed(0.4)
+
+ BML_FE_centerX.move(0.0)
+ BML_FE_centerY.move(0.0)
+
+ BML_FE_sizeX.move(2.5)
+ BML_FE_sizeY.move(2.5)
+
+ BML_FE_sizeX.moveAsync(-0.5)
+ BML_FE_sizeY.move(-0.5)
+
+ BML_FE_centerX.move(-0.2491)
+ BML_FE_centerY.move(0.5291)
+
+ BML_FE_sizeX.setSpeed(0.1)
+ BML_FE_sizeY.setSpeed(0.1)
+
+
+def FE_slit_opening_scan_on_AU():
+ close_FE_slits()
+
+ # BML_FE_centerX.move(0.0)
+ # BML_FE_centerY.move(0.0)
+ # pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+
+ max_versuche = 7
+ versuche = 0
+ cam_step = 40 # Jeder 3. Schritt
+
+ abbruch = False # Flag zum Verlassen aller Schleifen
+ schritt = 0 # Counter for images
+
+ wait_pressure = 10.0 # Wait time for pressure in seconds
+ pressure_threshold = 1.0e-7
+ y = 0.0
+ y_step = 0.002
+ y_max = 4.0
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ while y <= y_max and not abbruch:
+ # x = random.uniform(0, 20)
+ pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+ x = pressure
+ print("current pressure: " + str(x) + ", y: " + str(y) + ", pressure: " + str(pressure))
+
+ while x > pressure_threshold:
+ versuche += 1
+ if versuche >= max_versuche:
+ print("Abort")
+ abbruch = True # Flag setzen
+ break # innere Schleife verlassen
+ print("wait for pressure...")
+ time.sleep(wait_pressure)
+ # x = random.uniform(0, 20)
+ pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+ x = pressure
+ print("current pressure: " + str(x) + ", y: " + str(y) + ", pressure: " + str(pressure))
+
+ if abbruch:
+ break # aussere Schleife verlassen
+
+ if x <= pressure_threshold:
+ print("pressure is fine")
+ BML_FE_sizeX.move(y)
+ BML_FE_sizeY.move(y)
+ schritt += 1
+ if schritt % cam_step == 0: # Jeder 3. Schritt
+ schritt_str = "%04d" % schritt
+ print("take image: " + schritt_str)
+ output_file = "/sls/X11MA/data/X11MA/pshell/home/data/2025_11/20251115/" + schritt_str + ".jpg"
+ cmd = " curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o " + output_file
+ print("write data to: " + cmd)
+ # time.sleep(0.5)
+ os.system(cmd)
+ # time.sleep(0.5)
+ versuche = 0
+ y += y_step # y nur erhohen, wenn x <= 10.0
+
+ time.sleep(0.1)
+
+ if not abbruch:
+ print("y = 4.0 erreicht. Fertig!")
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
+ close_FE_slits()
+
+def AU_blades_dive(p_threshold, I_threshold):
+
+# blades = ["BML_AU_TRYB", "BML_AU_TRYT", "BML_AU_TRXW", "BML_AU_TRXR"]
+# BLADE = blades[number]
+# BLADE.read()
+
+# 1 Set blades to open position
+ BML_AU_TRYT.move(10.0)
+# BML_AU_TRYB.move(-10.0)
+# BML_AU_TRXR.move(10.0)
+# BML_AU_TRXW.move(-10.0)
+
+# 2 Setup dive parameters
+
+ max_versuche = 7
+ versuche = 0
+
+ abbruch = False # Flag zum Verlassen aller Schleifen
+
+ wait_pressure = 2.0 # Wait time for pressure in seconds
+ pressure_threshold = 1e-7
+ intensity_threshold_percent = 0.5
+
+# 3 BML_AU_TRYT dive
+
+ y = 10.0
+ y_step = -0.002
+# y_step = -1.0
+ y_max = BML_AU_TRYT.getMinValue()
+
+ intensity_ini = float(Keithley_2_raw.read())
+ intensity_threshold = intensity_threshold_percent * intensity_ini
+
+# started = time.strftime("%H:%M:%S", time.localtime())
+
+ while y >= y_max and not abbruch:
+# pressure = random.uniform(0, 20)
+# intensity = random.uniform(0, 10)
+ pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+ intensity = float(Keithley_2_raw.read())
+# x = pressure
+ print("current pressure: " + str(pressure) + ", y: " + str(y) + ", intensity: " + str(intensity))
+#
+ while pressure > pressure_threshold:
+ versuche += 1
+ if versuche >= max_versuche:
+ print("abort")
+ abbruch = True # Flag setzen
+ break # innere Schleife verlassen
+ print("wait for pressure...")
+ time.sleep(wait_pressure)
+# pressure = random.uniform(0, 20)
+ pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+# x = pressure
+# print("current pressure: " + str(x) + ", y: " + str(y) + ", pressure: " + str(pressure))
+#
+ if abbruch:
+ break # aussere Schleife verlassen
+#
+ if pressure <= pressure_threshold:
+ print("pressure is fine")
+ intensity = float(Keithley_2_raw.read())
+ print("current position: " + str(y) + ", intensity: " + str(intensity))
+ if intensity <= intensity_threshold:
+ print("intensity threshold reached at y = " + str(y))
+ abbruch = True
+ break
+ if abbruch:
+ break # aussere Schleife verlassen
+# BML_FE_sizeX.move(y)
+# BML_FE_sizeY.move(y)
+ versuche = 0
+ y += y_step # y nur erhohen, wenn x <= 10.0
+
+ time.sleep(0.1)
+
+ if not abbruch:
+ print("limit reached. no change in intensity")
+#
+# stopped = time.strftime("%H:%M:%S", time.localtime())
+# print("started: " + started)
+# print("stopped: " + stopped)
+
+
+
+#def AU_2D_scan():
+#
+# close_FE_slits()
+#
+# # BML_FE_centerX.move(0.0)
+# # BML_FE_centerY.move(0.0)
+# # pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+#
+# max_versuche = 7
+# versuche = 0
+# cam_step = 40 # Jeder 3. Schritt
+#
+# abbruch = False # Flag zum Verlassen aller Schleifen
+# schritt = 0 # Counter for images
+#
+# wait_pressure = 10.0 # Wait time for pressure in seconds
+# pressure_threshold = 1.0e-7
+# y = 0.0
+# y_step = 0.002
+# y_max = 0.25
+#
+# started = time.strftime("%H:%M:%S", time.localtime())
+#
+# while y <= y_max and not abbruch:
+# # x = random.uniform(0, 20)
+# pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+# x = pressure
+# print("current pressure: " + str(x) + ", y: " + str(y) + ", pressure: " + str(pressure))
+#
+# while x > pressure_threshold:
+# versuche += 1
+# if versuche >= max_versuche:
+# print("Abort")
+# abbruch = True # Flag setzen
+# break # innere Schleife verlassen
+# print("wait for pressure...")
+# time.sleep(wait_pressure)
+# # x = random.uniform(0, 20)
+# pressure = float(caget("X11MA-OP-AUMP:PRESSURE"))
+# x = pressure
+# print("current pressure: " + str(x) + ", y: " + str(y) + ", pressure: " + str(pressure))
+#
+# if abbruch:
+# break # aussere Schleife verlassen
+#
+# if x <= pressure_threshold:
+# print("pressure is fine")
+# BML_FE_sizeX.move(y)
+# BML_FE_sizeY.move(y)
+# schritt += 1
+# if schritt % cam_step == 0: # Jeder 3. Schritt
+# schritt_str = "%04d" % schritt
+# print("take image: " + schritt_str)
+# output_file = "/sls/X11MA/data/X11MA/pshell/home/data/2025_11/20251115/" + schritt_str + ".jpg"
+# cmd = " curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o " + output_file
+# print("write data to: " + cmd)
+# # time.sleep(0.5)
+# os.system(cmd)
+# # time.sleep(0.5)
+# versuche = 0
+# y += y_step # y nur erhohen, wenn x <= 10.0
+#
+# time.sleep(0.1)
+#
+# if not abbruch:
+# print("y = 4.0 erreicht. Fertig!")
+#
+# stopped = time.strftime("%H:%M:%S", time.localtime())
+# print("started: " + started)
+# print("stopped: " + stopped)
+#
diff --git a/script/beamline_alignment/04_XBPM1_scans.py b/script/beamline_alignment/04_XBPM1_scans.py
new file mode 100644
index 0000000..14f5f76
--- /dev/null
+++ b/script/beamline_alignment/04_XBPM1_scans.py
@@ -0,0 +1,52 @@
+
+def scan_XBPM1_2D():
+
+ # Functions here require to compile first beamline_configurations.py and probably also beamline_functions.py
+
+ # In case that we will later define a center position
+ xbpm1_cx = 0.0
+ xbpm1_cy = 0.0
+ # Read initial speed
+# xbpm1_ini_x_speed = BML_XBPM_A_TRX.getSpeed()
+# xbpm1_ini_y_speed = BML_XBPM_A_TRY.getSpeed()
+#
+# BML_XBPM_A_TRX.setSpeed(0.8)
+# BML_XBPM_A_TRY.setSpeed(0.8)
+#
+# BML_XBPM_A_TRX.move(xbpm1_cx)
+# BML_XBPM_A_TRY.move(xbpm1_cy)
+
+ x_range = 1.8
+ y_range = 1.8
+ x_steps = 0.1
+ y_steps = 0.1
+
+ xmin = xbpm1_cx - x_range/2
+ xmax = xbpm1_cx + x_range/2
+
+ ymin = xbpm1_cy - y_range/2
+ ymax = xbpm1_cy + y_range/2
+#
+# BML_XBPM_A_TRX.setSpeed(3.0)
+# BML_XBPM_A_TRY.setSpeed(3.0)
+
+ BML_XBPM_A_TRX.move(xmin)
+ BML_XBPM_A_TRY.move(ymin)
+
+ sensors = [BML_XBPM_A_CUR_1, BML_XBPM_A_CUR_2, BML_XBPM_A_CUR_3, BML_XBPM_A_CUR_4]
+ #detector = Keithley_2_raw
+
+ ascan([BML_XBPM_A_TRX, BML_XBPM_A_TRY], sensors, [xmin, ymin], [xmax, ymax], [x_steps, y_steps], latency=0.2, zigzag=False)
+ #ascan([FE_CX, FE_CY], sensors, [-1.0, 0.3], [0.0, 1.3], [0.1, 0.1], latency=0.5, zigzag=True)
+ #ascan([FE_CX, FE_CY], sensors, [xmin, ymin], [xmax, ymax], [STEPS, STEPS], latency=0.25, zigzag=True)
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+ BML_XBPM_A_TRX.move(xbpm1_cx)
+ BML_XBPM_A_TRY.move(xbpm1_cy)
+
+# BML_XBPM_A_TRX.setSpeed(xbpm1_ini_x_speed)
+# BML_XBPM_A_TRY.setSpeed(xbpm1_ini_y_speed)
+#
+
diff --git a/script/beamline_alignment/05_XBPM2_scans.py b/script/beamline_alignment/05_XBPM2_scans.py
new file mode 100755
index 0000000..bd0acfa
--- /dev/null
+++ b/script/beamline_alignment/05_XBPM2_scans.py
@@ -0,0 +1,135 @@
+import time
+
+def scan_2dfe_center():
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ fe_slit_sizex = 0.4
+ fe_slit_sizey = 0.4
+
+ offset_sizex = -0.3
+ offset_sizey = 0.0
+
+ fe_slit_centerx = 0.0
+ fe_slit_centery = 0.0
+
+# offset_centerx = -0.3
+# offset_centery = 1.25
+
+ offset_centerx = -0.6
+ offset_centery = 1.3
+
+ # Read initial speed
+ # original fe_slit_ini_x_speed = 0.1000
+ # original fe_slit_ini_y_speed = 0.1000
+
+ fe_slit_ini_x_speed = BML_FE_centerX.getSpeed()
+ fe_slit_ini_y_speed = BML_FE_centerY.getSpeed()
+
+ BML_FE_centerX.setSpeed(0.8)
+ BML_FE_centerY.setSpeed(0.8)
+
+ sizex = fe_slit_sizex + offset_sizex
+ sizey = fe_slit_sizey + offset_sizey
+
+ BML_FE_sizeX.move(sizex)
+ BML_FE_sizeY.move(sizey)
+
+ centerx = fe_slit_centerx + offset_centerx
+ centery = fe_slit_centery + offset_centery
+
+ BML_FE_centerX.move(centerx)
+ BML_FE_centerY.move(centery)
+
+ x_range = 1.1
+ y_range = 1.1
+
+ x_steps = 0.05
+ y_steps = 0.05
+
+ xmin = centerx - x_range/2
+ xmax = centerx + x_range/2
+
+ ymin = centery - y_range/2
+ ymax = centery + y_range/2
+
+ print(xmin)
+ print(xmax)
+ print(ymin)
+ print(ymax)
+ print(x_steps)
+ print(y_steps)
+
+ BML_FE_centerX.move(xmin)
+ BML_FE_centerY.move(ymin)
+
+ sensors = [BML_FE_CX_RBV, BML_FE_CY_RBV, BML_FE_CX_RBV, BML_FE_CX_RBV, BML_FE_CX_RBV, CADC2]
+ #sensors = [BML_FE_CX_RBV, BML_FE_CY_RBV, BML_XBPM_B_SUM, BML_XBPM_B_POS_X, BML_XBPM_B_POS_Y, CADC2]
+ #detector = Keithley_2_raw
+
+ ascan([BML_FE_centerX, BML_FE_centerY], sensors, [xmin, ymin], [xmax, ymax], [x_steps, y_steps], latency=0.1, zigzag=False)
+
+ BML_FE_sizeX.move(offset_sizex)
+ BML_FE_sizeY.move(offset_sizey)
+
+ BML_FE_centerX.move(offset_centerx)
+ BML_FE_centerY.move(offset_centery)
+
+ BML_FE_centerX.setSpeed(0.1)
+ BML_FE_centerY.setSpeed(0.1)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
+def scan_xbpm2():
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+ # In case that we will later define a center position
+ # original xbpm2_cx = 1.395, see /sls/X11MA/data/X11MA/scans/2511/0081.json
+ # original xbpm2_cy = -139.7175
+ xbpm2_cx = 0.0
+ xbpm2_cy = -339.7
+ # Read initial speed
+ # original xbpm2_ini_x_speed = 2.500
+ # original xbpm2_ini_y_speed = 2.500
+
+ xbpm2_ini_x_speed = BML_XBPM_B_TRX.getSpeed()
+ xbpm2_ini_y_speed = BML_XBPM_B_TRY.getSpeed()
+
+ BML_XBPM_B_TRX.setSpeed(2.5)
+ BML_XBPM_B_TRY.setSpeed(2.5)
+
+ BML_XBPM_B_TRY.move(xbpm2_cy)
+ BML_XBPM_B_TRX.move(xbpm2_cx)
+
+ x_range = 0.5
+ y_range = 0.5
+ x_steps = 0.05
+ y_steps = 0.05
+
+ xmin = xbpm2_cx - x_range/2
+ xmax = xbpm2_cx + x_range/2
+
+ ymin = xbpm2_cy - y_range/2
+ ymax = xbpm2_cy + y_range/2
+
+ BML_XBPM_B_TRX.move(xmin)
+ BML_XBPM_B_TRY.move(ymin)
+
+ sensors = [BML_XBPM_B_TRX_RBV, BML_XBPM_B_TRY_RBV, BML_XBPM_B_SUM, BML_XBPM_B_POS_X, BML_XBPM_B_POS_Y]
+ #detector = Keithley_2_raw
+
+ ascan([BML_XBPM_B_TRX, BML_XBPM_B_TRY], sensors, [xmin, ymin], [xmax, ymax], [x_steps, y_steps], latency=0.4, zigzag=True)
+ #ascan([FE_CX, FE_CY], sensors, [-1.0, 0.3], [0.0, 1.3], [0.1, 0.1], latency=0.5, zigzag=True)
+ #ascan([FE_CX, FE_CY], sensors, [xmin, ymin], [xmax, ymax], [STEPS, STEPS], latency=0.25, zigzag=True)
+
+ BML_XBPM_B_TRY.move(xbpm2_cy)
+ BML_XBPM_B_TRX.move(xbpm2_cx)
+
+ BML_XBPM_B_TRY.setSpeed(xbpm2_ini_y_speed)
+ BML_XBPM_B_TRX.setSpeed(xbpm2_ini_x_speed)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
\ No newline at end of file
diff --git a/script/beamline_alignment/06_CMU_FMU_scans.py b/script/beamline_alignment/06_CMU_FMU_scans.py
new file mode 100644
index 0000000..36156f9
--- /dev/null
+++ b/script/beamline_alignment/06_CMU_FMU_scans.py
@@ -0,0 +1,5 @@
+
+def correlated_transverse_shift(step):
+
+ BML_CMU_Z.moveRelAsync(step)
+ BML_FMU_TRX.moveRelAsync(-step)
\ No newline at end of file
diff --git a/script/beamline_alignment/07_BML_cameras.py b/script/beamline_alignment/07_BML_cameras.py
new file mode 100644
index 0000000..257c003
--- /dev/null
+++ b/script/beamline_alignment/07_BML_cameras.py
@@ -0,0 +1 @@
+findrecord X11MA | grep AcquirePeriod_RBV | grep cam1
\ No newline at end of file
diff --git a/script/beamline_alignment/08_FE_slit_scans.py b/script/beamline_alignment/08_FE_slit_scans.py
new file mode 100644
index 0000000..1300a0b
--- /dev/null
+++ b/script/beamline_alignment/08_FE_slit_scans.py
@@ -0,0 +1,193 @@
+def scan_2D_FE_slits():
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_ROTY, sensors, -0.06, 0.00, 30, 0.5)
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_TRX, sensors, -3.8, 3.8, 20, 0.5)
+
+# 1 Determine initial state
+#
+# Keithley:
+#
+ Keithley_11_range_string ='X11MA-KEI11:RANGE'
+ detector_range_ini = caget('X11MA-KEI11:RANGE')
+ range_number_ini = range_to_number(detector_range_ini)
+# print(range_number_ini)
+#
+# FMU:
+#
+# TRX_speed_ini = BML_FMU_TRX.getSpeed()
+# ROTY_speed_ini = BML_FMU_ROTY.getSpeed()
+ FE_centerX_ini = BML_FE_centerX.read()
+ FE_centerY_ini = BML_FE_centerY.read()
+ FE_sizeX_ini = BML_FE_sizeX.read()
+ FE_sizeY_ini = BML_FE_sizeY.read()
+ FE_speedX_ini = BML_FE_sizeX.getSpeed()
+ FE_speedY_ini = BML_FE_sizeY.getSpeed()
+
+# 2 Set Keithley range for scan
+#
+ detector_range = select_Keithley_11_range()
+# print(detector_range)
+ range_number = range_to_number(detector_range)
+# print(range_number)
+ caput(Keithley_11_range_string, range_number) # 6 --> 200 nA
+
+# 3 Set motor speed for scan
+#
+# BML_FE_sizeX.setSpeed(2.0)
+# BML_FE_sizeY.setSpeed(2.0)
+# BML_FE_centerX.setSpeed(2.0)
+# BML_FE_centerY.setSpeed(2.0)
+
+ BML_FE_sizeX.update()
+ BML_FE_sizeY.update()
+ BML_FE_centerX.update()
+ BML_FE_centerY.update()
+
+
+ BML_FE_sizeX.setSpeed(0.1)
+ BML_FE_sizeY.setSpeed(0.1)
+ BML_FE_centerX.setSpeed(0.1)
+ BML_FE_centerY.setSpeed(0.1)
+
+# 4 Set scan parameters
+
+ sensors = [Keithley_2_raw, CADC2, CADC2, CADC2]
+
+# FE_centerX = -1.15
+# FE_centerY = 1.45
+
+ FE_centerX = -1.25
+ FE_centerY = 1.0
+
+ FE_sizeX = 0.1
+ FE_sizeY = 0.1
+
+ x_range = 1.0
+ y_range = 1.0
+
+ x_steps = 0.05
+ y_steps = 0.05
+
+ xmin = FE_centerX - x_range/2
+ xmax = FE_centerX + x_range/2
+
+ ymin = FE_centerY - y_range/2
+ ymax = FE_centerY + y_range/2
+
+ xsteps = x_steps
+ ysteps = y_steps
+
+# 5 Perform scan
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ BML_FE_sizeX.move(FE_sizeX)
+ BML_FE_sizeY.move(FE_sizeY)
+
+ BML_FE_centerX.move(xmin)
+ BML_FE_centerY.move(ymin)
+
+ sleep(1.0)
+
+ ascan([BML_FE_centerX, BML_FE_centerY], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=0.1, zigzag=True)
+
+# 5 Put back to initial settings
+
+ caput(Keithley_11_range_string, range_number_ini)
+# BML_FMU_TRX.setSpeed(0.1)
+# BML_FMU_ROTY.setSpeed(0.1)
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
+ BML_FE_sizeX.update()
+ BML_FE_sizeY.update()
+ BML_FE_centerX.update()
+ BML_FE_centerY.update()
+
+ BML_FE_sizeX.move(FE_sizeX_ini)
+ BML_FE_sizeY.move(FE_sizeY_ini)
+ BML_FE_centerX.move(FE_centerX_ini)
+ BML_FE_centerY.move(FE_centerY_ini)
+
+ BML_FE_sizeX.setSpeed(2.0)
+ BML_FE_sizeY.setSpeed(2.0)
+ BML_FE_centerX.setSpeed(2.0)
+ BML_FE_centerY.setSpeed(2.0)
+
+def scan_3D_FE_slits(Scan_params, Sensors):
+ print(Scan_params)
+ print(Sensors)
+#def scan_2D_FE_slits():
+
+# 1 Set scan parameters
+
+ emin = Scan_params[0]
+ emax = Scan_params[1]
+ esteps = Scan_params[2]
+
+ FE_centerX = Scan_params[3]
+ FE_centerY = Scan_params[4]
+
+ FE_size_x = Scan_params[5]
+ FE_size_y = Scan_params[6]
+
+ x_range_full = Scan_params[7]
+ y_range_full = Scan_params[8]
+
+ x_steps = Scan_params[9]
+ y_steps = Scan_params[10]
+
+ x_range = x_range_full - FE_size_x
+ y_range = y_range_full - FE_size_y
+
+ xmin = FE_centerX - x_range/2
+ xmax = FE_centerX + x_range/2
+
+ ymin = FE_centerY - y_range/2
+ ymax = FE_centerY + y_range/2
+
+ xsteps = x_steps
+ ysteps = y_steps
+
+ BML_FE_sizeX.update()
+ BML_FE_sizeY.update()
+ BML_FE_centerX.update()
+ BML_FE_centerY.update()
+
+# 3 Perform scan
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ ascan([BML_energy, BML_FE_centerX, BML_FE_centerY], sensors, [emin, xmin, ymin,], [emax, xmax, ymax], [esteps, xsteps, ysteps], latency=0.1, zigzag=False)
+
+# 5 Put back to initial settings
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
+
+
+# # script_path = os.path.abspath(__file__)
+#
+# if filename is None:
+# filename = os.path.basename(script_path)
+#
+# dest = os.path.join(output_dir, filename)
+#
+# # Ordner erzeugen, falls nicht existiert
+# if not os.path.exists(output_dir):
+# os.makedirs(output_dir)
+#
+# shutil.copy(script_path, dest)
diff --git a/script/beamline_alignment/09_CMU_scans.py b/script/beamline_alignment/09_CMU_scans.py
new file mode 100644
index 0000000..3fd0d19
--- /dev/null
+++ b/script/beamline_alignment/09_CMU_scans.py
@@ -0,0 +1,176 @@
+def scan_CMU_zRy():
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_ROTY, sensors, -0.06, 0.00, 30, 0.5)
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_TRX, sensors, -3.8, 3.8, 20, 0.5)
+
+# 1 Determine initial state
+#
+# Keithley:
+#
+ Keithley_11_range_string ='X11MA-KEI11:RANGE'
+ detector_range_ini = caget('X11MA-KEI11:RANGE')
+ range_number_ini = range_to_number(detector_range_ini)
+# print(range_number_ini)
+#
+# CMU:
+#
+ BML_CMU_TRZ.update()
+ BML_CMU_ROY.update()
+
+ TRZ_pos_ini = BML_CMU_TRZ.read()
+ ROY_pos_ini = BML_CMU_ROY.read()
+
+# 2 Set Keithley range for scan
+#
+ detector_range = select_Keithley_11_range()
+ range_number = range_to_number(detector_range)
+ caput(Keithley_11_range_string, range_number) # 6 --> 200 nA
+
+# 3 Set motor speed for scan
+
+# BML_FMU_TRX.setSpeed(0.2)
+# BML_FMU_ROTY.setSpeed(0.2)
+
+# 4 Set scan parameters
+
+ sensors = [Keithley_2_raw, CADC2, BML_CMU_z_RBV, BML_CMU_Ry_RBV]
+
+ centerTRZ = 1.0
+ centerROY = -0.14
+
+ TRZ_range = 3.0
+ ROY_range = 0.2
+
+ TRZ_steps = 0.2
+ ROY_steps = 0.02
+
+ xmin = centerTRZ - TRZ_range/2
+ xmax = centerTRZ + TRZ_range/2
+
+ ymin = centerROY - ROY_range/2
+ ymax = centerROY + ROY_range/2
+
+ xsteps = TRZ_steps
+ ysteps = ROY_steps
+
+# 5 Perform scan
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ BML_CMU_TRZ.move(xmin)
+ BML_CMU_ROY.move(ymin)
+
+# ascan([BML_CMU_TRZ, BML_CMU_ROY], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=1.0, zigzag=False)
+
+
+ try:
+ ascan([BML_CMU_TRZ, BML_CMU_ROY], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=1.0, zigzag=False)
+ print "Scan finished"
+
+ except:
+ index = 1
+ status = "Exception:" #, sys.exc_info()[2]
+
+# params = bml_current_settings_for_functions()
+# save_dataset("metadata", params)
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+# 5 Put back to initial settings
+
+ caput(Keithley_11_range_string, range_number_ini)
+# BML_FMU_TRX.setSpeed(0.1)
+# BML_FMU_ROTY.setSpeed(0.1)
+ BML_CMU_TRZ.move(TRZ_pos_ini)
+ BML_CMU_ROY.moveAsync(ROY_pos_ini)
+
+ BML_FMU_TRX.update()
+ BML_FMU_ROTY.update()
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
+def scan_CMU_RxRy():
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_ROTY, sensors, -0.06, 0.00, 30, 0.5)
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_TRX, sensors, -3.8, 3.8, 20, 0.5)
+
+# 1 Determine initial state
+#
+# Keithley:
+#
+ Keithley_11_range_string ='X11MA-KEI11:RANGE'
+ detector_range_ini = caget('X11MA-KEI11:RANGE')
+ range_number_ini = range_to_number(detector_range_ini)
+# print(range_number_ini)
+#
+# CMU:
+#
+ TRZ_pos_ini = BML_CMU_ROX.read()
+ ROY_pos_ini = BML_CMU_ROY.read()
+
+# 2 Set Keithley range for scan
+#
+ detector_range = select_Keithley_11_range()
+ range_number = range_to_number(detector_range)
+ caput(Keithley_11_range_string, range_number) # 6 --> 200 nA
+
+# 3 Set motor speed for scan
+
+# BML_FMU_TRX.setSpeed(0.2)
+# BML_FMU_ROTY.setSpeed(0.2)
+
+# 4 Set scan parameters
+
+ sensors = [Keithley_2_raw, CADC2, BML_CMU_Rx_RBV, BML_CMU_Ry_RBV]
+
+ centerROX = -1.00
+ centerROY = -0.43
+
+ ROX_range = 2.0
+ ROY_range = 0.10
+
+ ROX_steps = 0.05
+ ROY_steps = 0.005
+
+ xmin = centerROX - ROX_range/2
+ xmax = centerROX + ROX_range/2
+
+ ymin = centerROY - ROY_range/2
+ ymax = centerROY + ROY_range/2
+
+ xsteps = ROX_steps
+ ysteps = ROY_steps
+
+# 5 Perform scan
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ BML_CMU_ROX.move(xmin)
+ BML_CMU_ROY.move(ymin)
+
+ ascan([BML_CMU_ROX, BML_CMU_ROY], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=1.0, zigzag=False)
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+# 5 Put back to initial settings
+
+ caput(Keithley_11_range_string, range_number_ini)
+# BML_FMU_TRX.setSpeed(0.1)
+# BML_FMU_ROTY.setSpeed(0.1)
+ BML_CMU_ROX.move(ROX_pos_ini)
+ BML_CMU_ROY.moveAsync(ROY_pos_ini)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
diff --git a/script/beamline_alignment/10_FMU_scans.py b/script/beamline_alignment/10_FMU_scans.py
new file mode 100644
index 0000000..781434c
--- /dev/null
+++ b/script/beamline_alignment/10_FMU_scans.py
@@ -0,0 +1,111 @@
+def move_FMU_y_relative(step):
+
+ BML_FMU_TRYD.moveRelAsync(step)
+ BML_FMU_TRYUR.moveRelAsync(step)
+ BML_FMU_TRYUW.moveRelAsync(step)
+
+def move_FMU_x_relative(step):
+
+ BML_FMU_TRX.moveRelAsync(step)
+
+
+def move_FMU_Ry_relative(step):
+
+ BML_FMU_YAW.moveRelAsync(step)
+
+
+def scan_FMU_TRX_ROTY():
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_ROTY, sensors, -0.06, 0.00, 30, 0.5)
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_TRX, sensors, -3.8, 3.8, 20, 0.5)
+
+# 1 Determine initial state
+#
+# Keithley:
+#
+ Keithley_11_range_string ='X11MA-KEI11:RANGE'
+ detector_range_ini = caget('X11MA-KEI11:RANGE')
+ range_number_ini = range_to_number(detector_range_ini)
+# print(range_number_ini)
+#
+# FMU:
+#
+ BML_FMU_TRX.update()
+ BML_FMU_ROTY.update()
+#
+# TRX_speed_ini = BML_FMU_TRX.getSpeed()
+# ROTY_speed_ini = BML_FMU_ROTY.getSpeed()
+ TRX_pos_ini = BML_FMU_TRX.read()
+ ROTY_pos_ini = BML_FMU_ROTY.read()
+
+# 2 Set Keithley range for scan
+#
+ detector_range = select_Keithley_11_range()
+# print(detector_range)
+ range_number = range_to_number(detector_range)
+# print(range_number)
+ caput(Keithley_11_range_string, range_number) # 6 --> 200 nA
+
+# 3 Set motor speed for scan
+
+# BML_FMU_TRX.setSpeed(0.2)
+# BML_FMU_ROTY.setSpeed(0.2)
+
+# 4 Set scan parameters
+
+ sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+
+ centerTRX = 1.0
+ centerROTY = -0.10
+ TRX_range = 6.0
+ ROTY_range = 0.2 # 0.1 mm corresponds to 0.25 mrad!
+
+ TRX_steps = 0.3
+ ROTY_steps = 0.01
+
+ xmin = centerTRX - TRX_range/2
+ xmax = centerTRX + TRX_range/2
+
+ ymin = centerROTY - ROTY_range/2
+ ymax = centerROTY + ROTY_range/2
+
+ xsteps = TRX_steps
+ ysteps = ROTY_steps
+
+# 5 Perform scan
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ BML_FMU_TRX.move(xmin)
+ BML_FMU_ROTY.move(ymin)
+
+
+ try:
+ ascan([BML_FMU_TRX, BML_FMU_ROTY], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=0.1, zigzag=False)
+ print "Scan finished"
+
+ except:
+ index = 1
+ status = "Exception:" #, sys.exc_info()[2]
+
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+# 5 Put back to initial settings
+
+ caput(Keithley_11_range_string, range_number_ini)
+# BML_FMU_TRX.setSpeed(0.1)
+# BML_FMU_ROTY.setSpeed(0.1)
+ BML_FMU_TRX.move(TRX_pos_ini)
+ BML_FMU_ROTY.moveAsync(ROTY_pos_ini)
+
+ BML_FMU_TRX.update()
+ BML_FMU_ROTY.update()
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
\ No newline at end of file
diff --git a/script/beamline_alignment/11_RMU1_scans.py b/script/beamline_alignment/11_RMU1_scans.py
new file mode 100644
index 0000000..65fda80
--- /dev/null
+++ b/script/beamline_alignment/11_RMU1_scans.py
@@ -0,0 +1,234 @@
+def move_RMU1_y_relative(step):
+
+ BML_RMU1_TRYU.moveRelAsync(step)
+ BML_RMU1_TRYDR.moveRelAsync(step)
+ BML_RMU1_TRYDW.moveRelAsync(step)
+
+def scan_RMU1_TRX_ROTY():
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_ROTY, sensors, -0.06, 0.00, 30, 0.5)
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_TRX, sensors, -3.8, 3.8, 20, 0.5)
+
+# 1 Determine initial state
+#
+# Keithley:
+#
+# Keithley_11_range_string ='X11MA-KEI11:RANGE'
+# detector_range_ini = caget('X11MA-KEI11:RANGE')
+# range_number_ini = range_to_number(detector_range_ini)
+# print(range_number_ini)
+#
+# RMU 1:
+#
+
+
+ BML_RMU1_TRX.update()
+ BML_RMU1_ROTY.update()
+# TRX_speed_ini = BML_FMU_TRX.getSpeed()
+# ROTY_speed_ini = BML_FMU_ROTY.getSpeed()
+ TRX_pos_ini = BML_RMU1_TRX.read()
+ ROTY_pos_ini = BML_RMU1_ROTY.read()
+
+# 2 Set Keithley range for scan
+#
+# detector_range = select_Keithley_11_range()
+## print(detector_range)
+# range_number = range_to_number(detector_range)
+## print(range_number)
+# caput(Keithley_11_range_string, range_number) # 6 --> 200 nA
+
+# 3 Set motor speed for scan
+
+ BML_RMU1_TRX.setSpeed(0.1)
+ BML_RMU1_ROTY.setSpeed(0.1)
+
+## 4 Set scan parameters
+# axis.setPolling(200)
+# axis_data = AxisData()
+# axis_roi = AxisROIIntensity()
+
+ sensors = [Keithley_3_raw, CADC2, CADC2, CADC2, PEEM_IMON]
+# sensors = [Keithley_3_raw, CADC2, BML_RMU1_X, BML_RMU1_YAW, PEEM_IMON]
+# sensors = [Keithley_3_raw, PEEM_PRESSURE_MAIN, BML_RMU1_X, BML_RMU1_YAW, PEEM_IMON, axis_roi, axis_data]
+
+ centerTRX = -5.0
+ centerROTY = -5.6
+#
+ TRX_range = 2.0
+ ROTY_range = 1.0
+#
+# TRX_range = 1.0
+# ROTY_range = 1.45
+
+ TRX_steps = 0.1
+ ROTY_steps = 0.05
+
+ xmin = centerTRX - TRX_range/2
+ xmax = centerTRX + TRX_range/2
+
+ ymin = centerROTY - ROTY_range/2
+ ymax = centerROTY + ROTY_range/2
+
+ xsteps = TRX_steps
+ ysteps = ROTY_steps
+
+# 5 Perform scan
+#
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ BML_RMU1_TRX.move(xmin)
+ BML_RMU1_ROTY.move(ymin)
+
+ try:
+ ascan([BML_RMU1_TRX, BML_RMU1_ROTY], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=0.1, zigzag=False)
+ print "Scan finished"
+
+ except:
+ index = 1
+ status = "Exception:" #, sys.exc_info()[2]
+
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+
+# 5 Put back to initial settings
+
+# caput(Keithley_11_range_string, range_number_ini)
+
+ sleep(2.0)
+
+
+ BML_RMU1_TRX.setSpeed(0.1)
+ BML_RMU1_ROTY.setSpeed(0.1)
+
+ BML_RMU1_TRX.move(TRX_pos_ini)
+ BML_RMU1_ROTY.move(ROTY_pos_ini)
+
+
+ BML_RMU1_TRX.update()
+ BML_RMU1_ROTY.update()
+
+# axis.setPolling(-200)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
+def scan_RMU1_xYaw():
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_ROTY, sensors, -0.06, 0.00, 30, 0.5)
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_TRX, sensors, -3.8, 3.8, 20, 0.5)
+
+# 1 Determine initial state
+#
+# Keithley:
+#
+# Keithley_11_range_string ='X11MA-KEI11:RANGE'
+# detector_range_ini = caget('X11MA-KEI11:RANGE')
+# range_number_ini = range_to_number(detector_range_ini)
+# print(range_number_ini)
+#
+# RMU 1:
+#
+
+
+ BML_RMU1_X.update()
+ BML_RMU1_YAW.update()
+# TRX_speed_ini = BML_FMU_TRX.getSpeed()
+# ROTY_speed_ini = BML_FMU_ROTY.getSpeed()
+ X_pos_ini = BML_RMU1_X.read()
+ YAW_pos_ini = BML_RMU1_YAW.read()
+
+# 2 Set Keithley range for scan
+#
+# detector_range = select_Keithley_11_range()
+## print(detector_range)
+# range_number = range_to_number(detector_range)
+## print(range_number)
+# caput(Keithley_11_range_string, range_number) # 6 --> 200 nA
+
+# 3 Set motor speed for scan
+
+ BML_RMU1_X.setSpeed(0.1)
+ BML_RMU1_YAW.setSpeed(0.1)
+
+## 4 Set scan parameters
+# axis.setPolling(200)
+# axis_data = AxisData()
+# axis_roi = AxisROIIntensity()
+
+ sensors = [Keithley_3_raw, CADC2, CADC2, CADC2, PEEM_IMON]
+# sensors = [Keithley_3_raw, CADC2, BML_RMU1_X, BML_RMU1_YAW, PEEM_IMON]
+# sensors = [Keithley_3_raw, PEEM_PRESSURE_MAIN, BML_RMU1_X, BML_RMU1_YAW, PEEM_IMON, axis_roi, axis_data]
+
+ centerX = -3.0
+ centerYAW = -33.3
+#
+ X_range = 4.0
+ YAW_range = 6.0
+#
+# TRX_range = 1.0
+# ROTY_range = 1.45
+
+ X_steps = 0.1
+ YAW_steps = 0.05
+
+ xmin = centerX - X_range/2
+ xmax = centerX + X_range/2
+
+ ymin = centerYAW - YAW_range/2
+ ymax = centerYAW + YAW_range/2
+
+ xsteps = X_steps
+ ysteps = YAW_steps
+
+# 5 Perform scan
+#
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ BML_RMU1_X.move(xmin)
+ BML_RMU1_YAW.move(ymin)
+
+ try:
+ ascan([BML_RMU1_X, BML_RMU1_YAW], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=0.1, zigzag=False)
+ print "Scan finished"
+
+ except:
+ index = 1
+ status = "Exception:" #, sys.exc_info()[2]
+
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+
+# 5 Put back to initial settings
+
+# caput(Keithley_11_range_string, range_number_ini)
+
+ sleep(2.0)
+
+
+ BML_RMU1_X.setSpeed(0.1)
+ BML_RMU1_YAW.setSpeed(0.1)
+
+ BML_RMU1_X.move(X_pos_ini)
+ BML_RMU1_YAW.move(YAW_pos_ini)
+
+
+ BML_RMU1_X.update()
+ BML_RMU1_YAW.update()
+
+# axis.setPolling(-200)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
+
diff --git a/script/beamline_alignment/12_camera_configuration.py b/script/beamline_alignment/12_camera_configuration.py
new file mode 100644
index 0000000..ad02d35
--- /dev/null
+++ b/script/beamline_alignment/12_camera_configuration.py
@@ -0,0 +1,31 @@
+# d=axis.data
+# d.toGrayscale()
+# m=axis.data.toGrayscale().matrix
+# plot(axis.data.toGrayscale().matrix)
+# axis.data.width
+# d.getRoi(Rectangle(100,100,300,200))
+# plot(d.getRoi(Rectangle(100,100,300,200)).matrix)
+
+
+# Full gray scale image
+
+class AxisData(ReadableMatrix):
+ def read(self):
+ return axis.data.toGrayscale().matrix
+
+ def getWidth(self):
+ return axis.data.width
+
+ def getHeight(self):
+ return axis.data.height
+
+
+#axis_data = AxisData()
+#tscan(axis_data, 10, 1.0, save=False)
+
+# Evaluate intensity of ROI
+
+
+class AxisROIIntensity(Readable):
+ def read(self):
+ return axis.data.getRoi(Rectangle(100,100,300,200)).integrate()
\ No newline at end of file
diff --git a/script/beamline_alignment/13_PEEM_girder_scans.py b/script/beamline_alignment/13_PEEM_girder_scans.py
new file mode 100644
index 0000000..81a6add
--- /dev/null
+++ b/script/beamline_alignment/13_PEEM_girder_scans.py
@@ -0,0 +1,112 @@
+def scan_PEEM_GIRDER_xYaw():
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_ROTY, sensors, -0.06, 0.00, 30, 0.5)
+
+# sensors = [Keithley_2_raw, CADC2, BML_FMU_X, BML_FMU_YAW]
+# r1 = lscan(BML_FMU_TRX, sensors, -3.8, 3.8, 20, 0.5)
+
+# 1 Determine initial state
+#
+# Keithley:
+#
+# Keithley_11_range_string ='X11MA-KEI11:RANGE'
+# detector_range_ini = caget('X11MA-KEI11:RANGE')
+# range_number_ini = range_to_number(detector_range_ini)
+# print(range_number_ini)
+#
+# RMU 1:
+#
+
+
+ PEEM_GIRDER_x.update()
+ PEEM_GIRDER_yaw.update()
+# TRX_speed_ini = BML_FMU_TRX.getSpeed()
+# ROTY_speed_ini = BML_FMU_ROTY.getSpeed()
+ x_pos_ini = PEEM_GIRDER_x.read()
+ yaw_pos_ini = PEEM_GIRDER_yaw.read()
+
+# 2 Set Keithley range for scan
+#
+# detector_range = select_Keithley_11_range()
+## print(detector_range)
+# range_number = range_to_number(detector_range)
+## print(range_number)
+# caput(Keithley_11_range_string, range_number) # 6 --> 200 nA
+
+# 3 Set motor speed for scan
+#
+# BML_RMU1_TRX.setSpeed(0.18)
+# BML_RMU1_ROTY.setSpeed(0.18)
+
+## 4 Set scan parameters
+# axis.setPolling(200)
+# axis_data = AxisData()
+# axis_roi = AxisROIIntensity()
+
+ sensors = [Keithley_3_raw, PEEM_GIRDER_x, PEEM_GIRDER_yaw]
+# sensors = [Keithley_3_raw, PEEM_PRESSURE_MAIN, BML_RMU1_X, BML_RMU1_YAW, PEEM_IMON, axis_roi, axis_data]
+
+ center_x = 0.0
+ center_yaw = 0.0
+#
+ x_range = 3.0
+ yaw_range = 3.0
+#
+# TRX_range = 1.0
+# ROTY_range = 1.45
+
+ x_steps = 0.1
+ yaw_steps = 0.1
+
+ xmin = center_x - x_range/2
+ xmax = center_x + x_range/2
+
+ ymin = center_yaw - yaw_range/2
+ ymax = center_yaw + yaw_range/2
+
+ xsteps = x_steps
+ ysteps = yaw_steps
+
+# 5 Perform scan
+#
+ started = time.strftime("%H:%M:%S", time.localtime())
+
+ PEEM_GIRDER_x.move(xmin)
+ PEEM_GIRDER_yaw.move(ymin)
+
+ try:
+ ascan([PEEM_GIRDER_x, PEEM_GIRDER_yaw], sensors, [xmin, ymin], [xmax, ymax], [xsteps, ysteps], latency=0.1, zigzag=False)
+ print "Scan finished"
+
+ except:
+ index = 1
+ status = "Exception:" #, sys.exc_info()[2]
+
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+
+# 5 Put back to initial settings
+
+# caput(Keithley_11_range_string, range_number_ini)
+
+ sleep(2.0)
+
+#
+# BML_RMU1_TRX.setSpeed(0.1)
+# BML_RMU1_ROTY.setSpeed(0.1)
+
+ PEEM_GIRDER_x.move(x_pos_ini)
+ PEEM_GIRDER_yaw.move(yaw_pos_ini)
+
+
+ PEEM_GIRDER_x.update()
+ PEEM_GIRDER_yaw.update()
+
+# axis.setPolling(-200)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
diff --git a/script/beamline_alignment/14_RMU_Monitor_setup.py b/script/beamline_alignment/14_RMU_Monitor_setup.py
new file mode 100644
index 0000000..7d2a4bb
--- /dev/null
+++ b/script/beamline_alignment/14_RMU_Monitor_setup.py
@@ -0,0 +1,7 @@
+# Out at 0.0
+# Screen at 5.6
+# Membrane at 25.3 mm
+# Photodiode at 45.6
+
+# Holes in patterned membrane at -24.00 mm
+# Exit slit tranlation range -30 ... 60 mm
\ No newline at end of file
diff --git a/script/beamline_alignment/15_Energy_scan.py b/script/beamline_alignment/15_Energy_scan.py
new file mode 100644
index 0000000..54639d5
--- /dev/null
+++ b/script/beamline_alignment/15_Energy_scan.py
@@ -0,0 +1,34 @@
+#class PseudoPositioner(Writable):
+# def write(self,pos):
+# sleep(3.0)
+# print "Step = " + str(pos)
+# caput
+#
+#positioner=PseudoPositioner()
+#
+
+def scan_energy(scan_energy_values, sensors):
+
+
+# 1 Set scan parameters
+
+ emin = scan_energy_values[0]
+ emax = scan_energy_values[1]
+ esteps = scan_energy_values[2]
+ latency = scan_energy_values[3]
+
+ for s in scan_energy_values:
+ print(s)
+ for sen in sensors:
+ print(sen)
+
+ started = time.strftime("%H:%M:%S", time.localtime())
+ lscan(BML_energy_set, sensors, emin, emax, esteps, latency)
+ #This is working: lscan (BML_energy, SR_current, 780.0, 800.0, 1.0)
+
+ json_path = get_exec_pars().path
+ bml_save_scan_settings_json(json_path)
+
+ stopped = time.strftime("%H:%M:%S", time.localtime())
+ print("started: " + started)
+ print("stopped: " + stopped)
\ No newline at end of file
diff --git a/script/beamline_alignment/16_Long_scripts.py b/script/beamline_alignment/16_Long_scripts.py
new file mode 100644
index 0000000..bce1501
--- /dev/null
+++ b/script/beamline_alignment/16_Long_scripts.py
@@ -0,0 +1,165 @@
+# def scan_2DFE_energy():
+# def scan_harmonic_energy_pol():
+
+
+def scan_2DFE_energy():
+ # 1 Define detector and scan parameters
+
+ sensors = [Keithley_2_raw.getAlias(), CADC2.getAlias(), SR_current.getAlias(), BML_energy_RBV.getAlias()]
+ Keithley_channel = Keithley_2_raw.getChannelName()
+ Keithley_range = "2 uA"
+ #Keithley range: "AUTO", "20 mA", "2 mA", "200 uA", "20 uA", "2 uA", "200 nA", "20 nA", "2 nA", "200 pA", "20 pA"
+
+ emin = 450.0
+ emax = 470.0
+ esteps = 5.0
+
+ #FE_centerX = -0.75
+ #FE_centerY = 1.25
+ FE_centerX = 0.0
+ FE_centerY = 0.0
+
+ FE_size_x = 0.1
+ FE_size_y = 0.1
+
+ x_range = 4.0
+ y_range = 4.0
+
+ x_steps = 0.1
+ y_steps = 0.1
+
+
+ # Set detector and slit parameters for scan>
+
+ range_number = range_to_number(Keithley_range)
+ Keithley_range_cmd = Keithley_channel.replace('READOUT', 'RANGE')
+ caput(Keithley_range_cmd, range_number) # 6 --> 200 nA
+
+ BML_FE_sizeX.setSpeed(1.0)
+ BML_FE_sizeY.setSpeed(1.0)
+ BML_FE_centerX.setSpeed(1.0)
+ BML_FE_centerY.setSpeed(1.0)
+ BML_FE_sizeX.write(FE_size_x)
+ BML_FE_sizeY.write(FE_size_y)
+
+ Scan_params = [emin, emax, esteps, FE_centerX, FE_centerY, FE_size_x, FE_size_y, x_range, y_range, x_steps, y_steps]
+
+ # 3 Perform scans
+
+ scan_3D_FE_slits(Scan_params, sensors)
+
+
+ # 4 Restore FE motor speed
+
+ BML_FE_sizeX.setSpeed(0.1)
+ BML_FE_sizeY.setSpeed(0.1)
+ BML_FE_centerX.setSpeed(0.1)
+ BML_FE_centerY.setSpeed(0.1)
+
+ # FE_centerX_ini = BML_FE_centerX.read()
+ # FE_centerY_ini = BML_FE_centerY.read()
+ # FE_sizeX_ini = BML_FE_sizeX.read()
+ # FE_sizeY_ini = BML_FE_sizeY.read()
+
+
+ # BML_FE_sizeX.move(FE_sizeX)
+ # BML_FE_sizeY.move(FE_sizeY)
+
+ # BML_FE_centerX.move(xmin)
+ # BML_FE_centerY.move(ymin)
+
+ # sleep(1.0)
+
+ # ID2_mode
+
+ # BML_energy_set
+
+ # BML_FE_sizeX.update()
+ # BML_FE_sizeY.update()
+ # BML_FE_centerX.update()
+ # BML_FE_centerY.update()
+ #
+ # BML_FE_sizeX.move(FE_sizeX_ini)
+ # BML_FE_sizeY.move(FE_sizeY_ini)
+ # BML_FE_centerX.move(FE_centerX_ini)
+ # BML_FE_centerY.move(FE_centerY_ini)
+ #
+ # BML_FE_sizeX.setSpeed(0.1)
+ # BML_FE_sizeY.setSpeed(0.1)
+ # BML_FE_centerX.setSpeed(0.1)
+ # BML_FE_centerY.setSpeed(0.1)
+
+def scan_2DFE_energy_pol():
+
+ polarizations = [1,2,3,4,5,6,7]
+
+ for p in polarizations:
+ print(p)
+ caput("X11MA-UIND2:MODE", p)
+ sleep(60)
+ ID_state = caget("X11MA-UIND2:MODE")
+ print(ID_state)
+ ID_energy = caget("X11MA-UIND2:ENERGY-RBV")
+ print(ID_energy)
+ scan_2DFE_energy()
+
+ BML_FE_sizeX.write(0.0)
+ BML_FE_sizeY.write(0.0)
+
+
+def scan_harmonic_energy_pol():
+
+# 0 Off
+# 1 Linear H
+# 2 Linear V+
+# 3 Linear V-
+# 4 Circular+
+# 5 Circular-
+# 6 +45 deg
+# 7 -45 deg
+
+ sensors = [Keithley_1_raw.getAlias(), CADC1.getAlias(), SR_current.getAlias(), BML_energy_RBV.getAlias()]
+ polarizations = [1,2,3,4,5,6]
+# polarizations = ["Linear H", "Linear V+", "Linear V-","Circular+", "Circular-", "+45 deg", "-45 deg"]
+ Keithley_channel = Keithley_2_raw.getChannelName()
+ Keithley_range = "AUTO"
+ #Keithley range: "AUTO", "20 mA", "2 mA", "200 uA", "20 uA", "2 uA", "200 nA", "20 nA", "2 nA", "200 pA", "20 pA"
+
+ emin = 500.0
+ emax = 900.0
+ esteps = 0.1
+ latency = 1.0
+
+ FE_centerX = 0.0
+ FE_centerY = 0.0
+ FE_size_x = 4.0
+ FE_size_y = 4.0
+
+ energy_slit = 200.0
+
+# # Set detector and slit parameters for scan>
+# range_number = range_to_number(Keithley_range)
+# Keithley_range_cmd = Keithley_channel.replace('READOUT', 'RANGE')
+# caput(Keithley_range_cmd, range_number) # 6 --> 200 nA
+#
+# BML_FE_sizeX.write(FE_size_x)
+# BML_FE_sizeY.write(FE_size_y)
+#
+# exit_slit.move(energy_slit)
+
+ scan_energy_values = [emin, emax, esteps,latency]
+
+ for p in polarizations:
+ print(p)
+ caput("X11MA-UIND2:MODE", p)
+ BML_energy_set.write(emin)
+ # ID2_mode.move("Linear H")
+ sleep(300)
+ ID_state = caget("X11MA-UIND2:MODE")
+ print(ID_state)
+ ID_energy = caget("X11MA-UIND2:ENERGY-RBV")
+ print(ID_energy)
+ scan_energy(scan_energy_values, sensors)
+
+ BML_FE_sizeX.write(0.0)
+ BML_FE_sizeY.write(0.0)
diff --git a/script/beamline_alignment/17_axis_camera_scans.py b/script/beamline_alignment/17_axis_camera_scans.py
new file mode 100644
index 0000000..b403781
--- /dev/null
+++ b/script/beamline_alignment/17_axis_camera_scans.py
@@ -0,0 +1,9 @@
+
+
+def after_read(record, scan):
+ filename = get_exec_pars().path + "/img_" + str(record.index) + ".tiff"
+ axis.update()
+ axis.saveSnapshot(filename, "tiff")
+
+lscan(BML_DIAG_POSITION, CADC2, 3.3, 6.2, 0.05, after_read=after_read)
+
diff --git a/script/beamline_alignment/AU_cam_scans.py b/script/beamline_alignment/AU_cam_scans.py
deleted file mode 100644
index e69de29..0000000
diff --git a/script/beamline_alignment/AU_scan.py b/script/beamline_alignment/AU_scan.py
deleted file mode 100755
index b9bdbf7..0000000
--- a/script/beamline_alignment/AU_scan.py
+++ /dev/null
@@ -1,14 +0,0 @@
-add_device(Positioner("AU_CX", "X11MA-OP2-AHcenter", "X11MA-OP2-AHt2.D"), True)
-add_device(Positioner("AU_CY", "X11MA-OP2-AVcenter", "X11MA-OP2-AVt2.D"), True)
-AU_CX.monitored=True
-AU_CY.monitored=True
-
-sensors = [Keithley_2_raw]
-
-ascan([AU_CX, AU_CY], sensors, [-0.5, -0.5], [0.5, 0.5], [0.1, 0.1], latency=0.5, zigzag=False)
-
-#add_device(Positioner("AU_CX", "X11MA-OP2-AHcenter", "X11MA-FE-SL1:CENTERX.RBV"), True)
-#add_device(Positioner("AU_CY", "X11MA-OP2-AVcenter", "X11MA-FE-SL1:CENTERY.RBV"), True)
-#AU_CX.monitored=True
-#AU_CY.monitored=True
-#
diff --git a/script/beamline_alignment/BML_save_parameters.py b/script/beamline_alignment/BML_save_parameters.py
deleted file mode 100644
index 8370f5d..0000000
--- a/script/beamline_alignment/BML_save_parameters.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# VERSION = "1.0"
-# AUTHOR = "A. Kleibert"
-# LAST_MODIFIED = "2025-11-08"
-
-# Read ring current:
-SR_current = caget("AGEBD-PARAMS:CURRENT")
-SR_life_time = caget("AGEBD-PARAMS:LIFETIME")
-SR_orbit-X-RMS = caget("ARSGE-CECL-FOFB1:B-ERR-X-RMS-UM")
-SR_orbit-Y-RMS = caget("ARSGE-CECL-FOFB1:B-ERR-Y-RMS-UM")
-
-# Read bumps:
-BML_bump_X = caget("X11MA-ORBITBUMP:OFFSET-X")
-BML_bump_XP = caget("X11MA-ORBITBUMP:OFFSET-XP")
-BML_bump_Y = caget("X11MA-ORBITBUMP:OFFSET-Y")
-BML_bump_YP = caget("X11MA-ORBITBUMP:OFFSET-YP")
-
-MAS_bump_X = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-X")
-MAS_bump_XP = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-XP")
-MAS_bump_Y = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-Y")
-MAS_bump_YP = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-YP")
-
-TOT_bump_X = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-X-TOTAL")
-TOT_bump_XP = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-XP-TOTAL")
-TOT_bump_Y = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-Y-TOTAL")
-TOT_bump_YP = caget("AGEBD-ORBITBUMP:X11MA-OFFSET-YP-TOTAL")
-
-# Read ID gap and mode:
-ID2_energy= caget("X11MA-UIND2:ENERGY-RBV")
-ID2_mode = caget("X11MA-UIND2:MODE")
-ID2_gap = caget("X11MA-UIND2:GAP-RBV")
-ID2_offset = caget("X11MA-UIND2:ENERGY-OFFS")
-# 0 Off
-# 1 Linear H
-# 2 Linear V+
-# 3 Linear V-
-# 4 Circular+
-# 5 Circular-
-# 6 +45 deg
-# 7 -45 deg
-
-# Read XBPM1 parameters:
-XBPM1_X_motor = caget("X11MA-FE-XBPM1:TRX.RBV")
-XBPM1_Y_motor = caget("X11MA-FE-XBPM1:TRY.RBV")
-
-# Read FE slit size and position:
-# Virtual axes:
-FE_centerX = caget("X11MA-FE-SL1:CENTERX.RBV")
-FE_centerY = caget("X11MA-FE-SL1:CENTERY.RBV")
-FE_sizeX = caget("X11MA-FE-SL1:SIZEX.RBV")
-FE_sizeY = caget("X11MA-FE-SL1:SIZEY.RBV")
-# Physical motors:
-FE_TRXR = caget("X11MA-FE-SL1:TRXR.RBV")
-FE_TRXW = caget("X11MA-FE-SL1:TRXW.RBV")
-FE_TRYB = caget("X11MA-FE-SL1:TRYB.RBV")
-FE_TRYT = caget("X11MA-FE-SL1:TRYT.RBV")
-
-# Read CMU parameters:
-CMU_X = caget("X11MA-OP-CM:ox")
-CMU_Y = caget("X11MA-OP-CM:oy")
-CMU_Z = caget("X11MA-OP-CM:oz")
-CMU_Rx = caget("X11MA-OP-CM:oRx")
-CMU_Ry = caget("X11MA-OP-CM:oRy")
-CMU_Rz = caget("X11MA-OP-CM:oRz")
-CMU_baffle = caget("X11MA-OP2-CM:TRB.RBV")
-
-# Read XBPM2 parameters:
-XBPM2_X_motor = caget("X11MA-OP2-BP1:TRX.RBV")
-XBPM2_Y_motor = caget("X11MA-OP2-BP1:TRY.RBV")
-
-# Read AU slit parameters:
-# Virtual axes:
-AU_centerV = caget("X11MA-OP2-AVcenter")
-AU_centerH = caget("X11MA-OP2-AHcenter")
-AU_sizeV = caget("X11MA-OP2-AVsize")
-AU_sizeH = caget("X11MA-OP2-AHsize")
-# Physical motors:
-AU_TRZ1 = caget("X11MA-OP2-AU:TRZ1.RBV")
-AU_TRZ4 = caget("X11MA-OP2-AU:TRZ4.RBV")
-AU_TRY1 = caget("X11MA-OP2-AU:TRY1.RBV")
-AU_TRY4 = caget("X11MA-OP2-AU:TRY4.RBV")
-
-# Read mono parameters:
-# Grating and diffration order:
-Mono_grating_select = caget("X11MA-PGM:grating")
-Mono_grating_change = caget("X11MA-PGM-GRCH:GRATING")
-# 0 G1 300
-# 1 G2 1200
-# 2 G3 600
-Mono_diff_order = caget("X11MA-PGM:difforder0")
-# 0 1
-# 1 2
-# 2 3
-# Energy, cff, phi:
-Mono_energy = caget("X11MA-PGM:rbkenergy")
-Mono_cff = caget("X11MA-PGM:rbkcff")
-Mono_phi = caget("X11MA-PGM:rbkenergy")
-# Angles and offsets:
-Mono_theta = caget("X11MA-PGM:rbktheta")
-Mono_theta_off1A = caget("X11MA-PGM:THETAOFF1.A")
-Mono_theta_off1B = caget("X11MA-PGM:THETAOFF1.B")
-Mono_theta_off1C = caget("X11MA-PGM:THETAOFF1.C")
-Mono_theta_off2A = caget("X11MA-PGM:THETAOFF2.A")
-Mono_theta_off2B = caget("X11MA-PGM:THETAOFF2.B")
-Mono_theta_off2C = caget("X11MA-PGM:THETAOFF2.C")
-Mono_beta = caget("X11MA-PGM:rbkbeta")
-Mono_beta_off1A = caget("X11MA-PGM:BETAOFF1.A")
-Mono_beta_off1B = caget("X11MA-PGM:BETAOFF1.B")
-Mono_beta_off1C = caget("X11MA-PGM:BETAOFF1.C")
-Mono_beta_off2A = caget("X11MA-PGM:BETAOFF2.A")
-Mono_beta_off2B = caget("X11MA-PGM:BETAOFF2.B")
-Mono_beta_off2C = caget("X11MA-PGM:BETAOFF2.C")
-# Mirror and grating position:
-Mono_mirror_origin = caget("X11MA:m3.RBV")
-Mono_grating_origin = caget("X11MA:m4.RBV")
-
-# Read FMU aperture jaw:
-FMU_TRYT = caget("X11MA-OP-FM:TRYT.RBV")
-FMU_TRYB = caget("X11MA-OP-FM:TRYB.RBV")
-
-# Read FMU position and motors:
-# Virtual axes:
-FMU_X = caget("X11MA-OP-FM:X.RBV")
-FMU_Y = caget("X11MA-OP-FM:Y.RBV")
-FMU_PITCH = caget("X11MA-OP-FM:PITCH.RBV")
-FMU_ROLL = caget("X11MA-OP-FM:ROLL.RBV")
-FMU_YAW = caget("X11MA-OP-FM:YAW.RBV")
-# Physical motors:
-FMU_TRYD = caget("X11MA-OP-FM:TRYD.RBV")
-FMU_TRYUR = caget("X11MA-OP-FM:TRYUR.RBV")
-FMU_TRYUW = caget("X11MA-OP-FM:TRYUW.RBV")
-FMU_TRX = caget("X11MA-OP-FM:TRX.RBV")
-FMU_ROTY = caget("X11MA-OP-FM:ROTY.RBV")
-
-# Fast shutter positions:
-#FMU_TRYD = caget("X11MA-OP-FM:TRYD.RBV")
-#FMU_TRYUR = caget("X11MA-OP-FM:TRYUR.RBV")
-
-# Exit slit
-# Monitor and membrane positions:
-#FMU_TRYD = caget("X11MA-OP-FM:TRYD.RBV")
-#FMU_TRYUR = caget("X11MA-OP-FM:TRYUR.RBV")
-ESLIT_width = caget("X11MA-OP2-SL:TRY.RBV")
-ESLIT_position = caget("X11MA-OP2-SL:TRX.RBV")
-
-# Diagnostics unit
-DIAG_position = caget("X11MA-OP-DI:HO3.RBV")
-DIAG_select = caget("X11MA:DIAG-SET")
-# 0 Diag. Out
-# 1 YAG
-# 2 Photodiode
-
-# Refocussing mirror unit 1
-# Virtual axes:
-RMU1_X = caget("X11MA-OP-RM1:X.RBV")
-RMU1_Y = caget("X11MA-OP-RM1:Y.RBV")
-RMU1_PITCH = caget("X11MA-OP-RM1:PITCH.RBV")
-RMU1_ROLL = caget("X11MA-OP-RM1:ROLL.RBV")
-RMU1_YAW = caget("X11MA-OP-RM1:YAW.RBV")
-# Physical motors:
-RMU1_TRYD = caget("X11MA-OP-RM1:TRYD.RBV")
-RMU1_TRYUR = caget("X11MA-OP-RM1:TRYUR.RBV")
-RMU1_TRYUW = caget("X11MA-OP-RM1:TRYUW.RBV")
-RMU1_TRX = caget("X11MA-OP-RM1:TRX.RBV")
-RMU1_ROTY = caget("X11MA-OP-RM1:ROTY.RBV")
-
-# PEEM Girder
-# Virtual axes:
-PEEM_girder_X = caget("X11MA-HG:X1")
-PEEM_girder_Y = caget("X11MA-HG:Y1")
-PEEM_girder_Z = caget("X11MA-HG:Z1")
-PEEM_girder_PITCH = caget("X11MA-HG:PITCH1")
-PEEM_girder_ROLL = caget("X11MA-HG:YAW1")
-PEEM_girder_YAW = caget("X11MA-HG:ROLL1")
-# Physical motors:
-PEEM_girder_M1 = caget("X11MA-HG:M1.RBV")
-PEEM_girder_M2 = caget("X11MA-HG:M2.RBV")
-PEEM_girder_M3 = caget("X11MA-HG:M3.RBV")
-PEEM_girder_M4 = caget("X11MA-HG:M4.RBV")
-PEEM_girder_M5 = caget("X11MA-HG:M5.RBV")
-PEEM_girder_M6 = caget("X11MA-HG:M6.RBV")
-
-# Ptycho double slit
-# Virtual axes:
-PDS_centerX = caget("X11MA-OP-SL:CENTERX.RBV")
-PDS_centerY = caget("X11MA-OP-SL:CENTERY.RBV")
-PDS_sizeX = caget("X11MA-OP-SL:SIZEX.RBV")
-PDS_sizeY = caget("X11MA-OP-SL:SIZEY.RBV")
-# Physical motors:
-PDS_TRXR = caget("X11MA-OP-SL:TRXR.RBV")
-PDS_TRXW = caget("X11MA-OP-SL:TRXW.RBV")
-PDS_TRYB = caget("X11MA-OP-SL:TRYB.RBV")
-PDS_TRYT = caget("X11MA-OP-SL:TRYT.RBV")
-
-# Refocussing mirror unit 2
-RMU2_X = caget("X11MA-OP-RM2:ox")
-RMU2_Y = caget("X11MA-OP-RM2:oy")
-RMU2_Z = caget("X11MA-OP-RM2:oz")
-RMU2_Rx = caget("X11MA-OP-RM2:oRx")
-RMU2_Ry = caget("X11MA-OP-RM2:oRy")
-RMU2_Rz = caget("X11MA-OP-RM2:oRz")
-
-##get_string
- # get_string(msg, default = None, alternatives = None, password = False)
-# Reads a string from UI Args: msg(str): display message.
-# default(str, optional): value displayed when window is shown.
-# alternatives(list of str, optional): if provided presents a combo
-# box instead of an editing field.
-# password(boolean, optional): if True hides entered characters.
-# Returns: String entered of null if canceled
-
-# save_dataset(path, data, type = d, unsigned = False, features = None)
-# Save data into a dataset within the current persistence context.
-# Args: path(str): Path to dataset relative to the current persistence context root.
-# type(str, optional): array type - 'd'=double (default), 'b'=byte, 'h'=short, 'i'=int,
-# 'l'=long, 'f'=float, 'c'=char, 's'=String, 'z'=bool, 'o'=Object
-# data (array or list): data to be saved
-# unsigned(boolean, optional): create a dataset of unsigned type.
-# features(dictionary, optional): See create_dataset.
-# Returns: Dictionary
diff --git a/script/beamline_alignment/Beamline_configuration.py b/script/beamline_alignment/Beamline_configuration.py
deleted file mode 100644
index a89eae5..0000000
--- a/script/beamline_alignment/Beamline_configuration.py
+++ /dev/null
@@ -1,305 +0,0 @@
-import os
-import json
-#
-#RED = "\033[91m"
-#RESET = "\033[0m"
-
-
-# see also Python Projekte/Strings in Datei speichern
-
-BEAMLINE_PARAMETERS_FILE = "/home/gac-x11ma/pshell/home/script/beamline_alignment/bml_align_params.json"
-
-def save_parameters():
- msg = "Save as ..."
- # User inputs the file path
- path = get_string(msg, default = "/home/gac-x11ma/pshell/home/script/beamline_alignment/0012.json", alternatives = None, password = False)
-
- # 1 Check if the user cancelled
- if path is None:
- print("Aborted by user.")
- return # ✅ exit the function immediately
-
- # 2 Get the parent folder of the file
- folder = os.path.dirname(path)
-# print(folder)
-
- # 3 ️⃣Check if the folder existst
- if not os.path.isdir(folder):
- print ("Aborted. Folder: " + folder + " does not exist.")
- return # ✅ exit the function cleanly
-
- # 4 Mapping from component + parameter to individual read string (Dictionary) Each component contains its parameters, with the corresponding read string and optional tolerance
-
- with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
- machine_parameters = json.load(f)
-
- parameters = {}
- nan_occurred = False
-
- # 5️⃣ Read each parameter from the machine
- for comp, param_dict in machine_parameters.items():
- print("\nComponent: " + comp)
- parameters[comp] = {}
- for p, info in param_dict.items():
- cmd = info["read_cmd"]
- #print(cmd)
- tol = info["tolerance"]
- #print(tol)
- try:
- value = caget(cmd)
- if isinstance(value, str):
- display_value = value
- else:
- #value = string(value) c ensure float
- display_value = str(value)
- print(comp + "_" + p + " = " + display_value)
-# print(value)
- except:
-# print("Problem")
-# value = float('nan')
- nan_occurred = True
- print(comp + p + " = NaN")
- parameters[comp][p] = {"value": value, "tolerance": tol}
-
-# # 6 Save parameters to JSON file
- try:
- with open(path, "w") as f:
- json.dump(parameters, f, indent=4, allow_nan=True)
- print("Parameters successfully saved in: " + path)
- except:
- print("Error while saving file.")
-
- # Warn if NaN occurred
- if nan_occurred:
- print("There were NaN-Values")
-
-def select_components(selected_components=None):
-
- #Allows the user (or another function) to select one
- #or more components either interactively or
- #by providing a list. It validates the selection against
- #the available components in the JSON file.
-
-
- msg = "Select components: "
-
- # Load machine parameters
- try:
- with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
- machine_parameters = json.load(f)
- except:
- print("Error loading machine_parameters.json")
- return None
-
- # Extract component names
- all_components = list(machine_parameters.keys())
-# print("Available components:")
-# for comp in all_components:
-# print("- " + comp)
-
- # --- determine components to display ---
- if selected_components is None:
-
- # user didn't specify -> use all from JSON
- presented_to_select = all_components[:]
- presented_to_select.append("all")
-
- selected = get_string(msg, default = None, alternatives = presented_to_select, password = False)
- #print(selected)
- if selected is None:
- print("Selection aborted by user.")
- return None
- elif selected == "all":
- # Display components
- print("Selected components:")
- for comp in all_components:
- print("- " + comp)
- return all_components
-
- else:
- selected_components = [selected] if not isinstance(selected, list) else selected
- print("Selected components:")
- for comp in selected_components:
- print("- " + comp)
- return selected_components
-
-
- elif selected_components == "all":
-
- # Display components
- print("Selected components:")
- for comp in all_components:
- print("- " + comp)
- return all_components
-
- else:
- # ensure it is a list
- if not isinstance(selected_components, list):
- print("Error: selected_components must be a list of the form \"[\"Diag\", \"CMU\", ...]\" or \"all\".")
- return
- # validate each component
- invalid = [c for c in selected_components if c not in all_components]
- if invalid:
- print("Error: Invalid component(s):")
- for comp in invalid:
- print("- " + comp)
-
- print("Valid components are:")
- for comp in all_components:
- print("- " + comp)
-
- return None
- else:
- print("Selected components:")
- for comp in selected_components:
- print("- " + comp)
- return selected_components
-
-
-def display_parameters(selected_components=None):
-
-
- # Displays parameters for selected components.
- # - Uses select_components() to choose components.
- # - Prints each parameter with its value.
- # - If a parameter value is missing or cannot be read, prints NaN.
-
-
- # 1️⃣ Get the selected components (interactive or via argument)
- selection = select_components(selected_components)
- if selection is None:
- return # user cancelled or invalid input
-
- # 2️⃣ Load the machine parameters JSON
- try:
- with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
- machine_parameters = json.load(f)
- except:
- print("Error loading machine_parameters.json")
- return
-
- # 3️⃣ Loop through components and display their parameters
- for comp in selection:
- print("\nComponent: " + comp)
- params = machine_parameters.get(comp, {})
- if not params:
- print(" No parameters found.")
- continue
-
- for key, param_info in params.items():
-
- # param_info enthält z.B. den read_cmd
- read_cmd = param_info.get("read_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
-
- try:
- display_value = caget(read_cmd)
- print(read_cmd + " = " + str(display_value))
- except:
- display_value = "NaN"
- # print(" " + key + ": " + display_value)
-
-def restore_parameters(selected_components=None):
-# """
-# Restore parameter values from a previously saved JSON file.
-# The user selects which components to restore, and only parameters
-# marked as "restorable": true in machine_parameters.json will be written back.
-# """
-
- msg = "Open *.json configuration file ..."
-
- # User inputs the file path
-
- # --- Step 1: Select file ---
- restore_file = get_string(msg, default = "/home/gac-x11ma/pshell/home/script/beamline_alignment/0012.json", alternatives = None, password = False)
- if restore_file is None:
- print("Restore aborted: no file specified.")
- return
-
- try:
- with open(restore_file, "r") as f:
- saved_data = json.load(f)
- except:
- print("Error loading restore file:", restore_file)
- return
-
- # --- Step 2: Load machine parameters ---
- try:
- with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
- machine_parameters = json.load(f)
- except:
- print("Error loading machine_parameters.json")
- return
-
- # --- Step 3: Select components ---
- selection = select_components(selected_components)
-
- if selection is None:
- return # user cancelled or invalid input
-
- # --- Step 4:️⃣ Load the machine parameters JSON
- try:
- with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
- machine_parameters = json.load(f)
- except:
- print("Error loading machine_parameters.json")
- return
-
- # --- Step 5: Restore loop ---
-
- for comp in selection:
- print("\nComponent: " + comp)
- params = machine_parameters.get(comp, {})
- if not params:
- print(" No parameters found.")
- continue
-
- saved_params = saved_data.get(comp, {})
- if not saved_params:
- print(" No saved values for this component.")
- continue
-
- for key, param_info in params.items():
-
- if not param_info.get("restorable", False):
- continue
-
- # --- get saved value ---
- saved_entry = saved_params.get(key, None)
- if saved_entry is not None and 'value' in saved_entry:
- saved_value = saved_entry['value']
- else:
- saved_value = "NaN"
-
- # param_info enthält z.B. den read_cmd
- read_cmd = param_info.get("read_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
- write_cmd = param_info.get("write_cmd") # JSON muss für jeden Parameter den entsprechenden Befehl enthalten
- tolerance = param_info.get("tolerance")
-
- try:
- display_value = caget(read_cmd)
- # print(read_cmd + " = " + str(display_value) + ", saved value = " + str(saved_value))
- # difference = float(display_value) - float(saved_value)
- # --- compute difference if possible ---
- if saved_value != "NaN" and display_value != "NaN":
- try:
- difference = abs(float(display_value) - float(saved_value))
- except:
- difference = "NaN"
- else:
- difference = "NaN"
- print(read_cmd + " = " + str(display_value) + ", diff = " + str(round(difference, 5)) + ", tolerance = " + str(round(tolerance, 5)))
- if float(difference) > float(tolerance):
- print("Set " + read_cmd + " to " + str(round(saved_value, 5)))
- write_cmd_new = "\"" + write_cmd + "\""
- #print(write_cmd_new)
- caput(write_cmd, float(saved_value))
- else:
- print("OK.")
- except:
- display_value = "NaN"
- # print(" " + key + ": " + display_value)
-
-
-
-# print("Component:", comp)
-# run('beamline_init/with_x-rays/functions/SlitCalib.py')
\ No newline at end of file
diff --git a/script/beamline_alignment/Development/AU_scan.py b/script/beamline_alignment/Development/AU_scan.py
new file mode 100755
index 0000000..5bc4e3f
--- /dev/null
+++ b/script/beamline_alignment/Development/AU_scan.py
@@ -0,0 +1,13 @@
+#add_device(Positioner("AU_CX", "X11MA-OP2-AHcenter", "X11MA-OP2-AHt2.D"), True)
+#add_device(Positioner("AU_CY", "X11MA-OP2-AVcenter", "X11MA-OP2-AVt2.D"), True)
+#AU_CX.monitored=True
+#AU_CY.monitored=True
+#
+#sensors = [Keithley_2_raw]
+#
+#ascan([AU_CX, AU_CY], sensors, [-0.5, -0.5], [0.5, 0.5], [0.1, 0.1], latency=0.5, zigzag=False)
+
+close_FE_slits()
+
+BML_FE_sizeX.move(0.5)
+BML_FE_sizeY.move(0.5)
\ No newline at end of file
diff --git a/script/beamline_alignment/Development/BML_save_parameters.py b/script/beamline_alignment/Development/BML_save_parameters.py
new file mode 100755
index 0000000..e323e36
--- /dev/null
+++ b/script/beamline_alignment/Development/BML_save_parameters.py
@@ -0,0 +1,100 @@
+#Read beamline values
+
+#Read bumps:
+#X = 0 um
+#X prime = 0 urad
+#Y = 0 um
+#Y prime = 0 urad
+#
+#Machine bumps:
+#X = 10 um
+#X prime = -10 urad
+#Y = -28 um
+#Y prime = 45 urad
+#
+#Total bumps:
+#X = 10 um
+#X prime = -10 urad
+#Y = -28 um
+#Y prime = 45 urad
+
+#Read ID gap and mode:
+ID_gap = caget("X11MA-UIND2:GAP-RBV")
+ID_mode = caget("X11MA-UIND2:MODE")
+# 0 Off
+# 1 Linear H
+# 2 Linear V+
+# 3 Linear V-
+# 4 Circular+
+# 5 Circular-
+# 6 +45 deg
+# 7 -45 deg
+
+#Read FE slit size and position:
+FE_centerX = caget("X11MA-FE-SL1:CENTERX.RBV")
+FE_centerY = caget("X11MA-FE-SL1:CENTERY.RBV")
+FE_sizeX = caget("X11MA-FE-SL1:SIZEX.RBV")
+FE_sizeY = caget("X11MA-FE-SL1:SIZEY.RBV")
+
+#Read CMU parameters:
+CMU_X = caget("X11MA-OP-CM:ox")
+CMU_Y = caget("X11MA-OP-CM:oy")
+CMU_Z = caget("X11MA-OP-CM:oz")
+CMU_Rx = caget("X11MA-OP-CM:oRx")
+CMU_Ry = caget("X11MA-OP-CM:oRy")
+CMU_Rz = caget("X11MA-OP-CM:oRz")
+CMU_baffle = caget("X11MA-OP2-CM:TRB.RBV")
+
+#Read AU slit parameters:
+AU_centerV = caget("X11MA-OP2-AVcenter")
+AU_centerH = caget("X11MA-OP2-AHcenter")
+AU_sizeV = caget("X11MA-OP2-AVsize")
+AU_sizeH = caget("X11MA-OP2-AHsize")
+
+#Read XBPM parameters:
+BP1_Y_motor = caget("X11MA-OP2-BP1:TRY.RBV")
+BP1_X_motor = caget("X11MA-OP2-BP1:TRX.RBV")
+
+#Read Mono parameters:
+Mono_Grating_Select = caget("X11MA-PGM:grating")
+Mono_Grating_Change = caget("X11MA-PGM-GRCH:GRATING")
+# 0 G1 300
+# 1 G2 1200
+# 2 G3 600
+Mono_Diff_Order = caget("X11MA-PGM:difforder0")
+# 0 1
+# 1 2
+# 2 3
+Mono_Energy = caget("X11MA-PGM:rbkenergy")
+Mono_cff = caget("X11MA-PGM:rbkcff")
+Mono_theta = caget("X11MA-PGM:rbktheta")
+Mono_theta_off1A = caget("X11MA-PGM:THETAOFF1.A")
+Mono_theta_off1B = caget("X11MA-PGM:THETAOFF1.B")
+Mono_theta_off1C = caget("X11MA-PGM:THETAOFF1.C")
+Mono_theta_off2A = caget("X11MA-PGM:THETAOFF2.A")
+Mono_theta_off2B = caget("X11MA-PGM:THETAOFF2.B")
+Mono_theta_off2C = caget("X11MA-PGM:THETAOFF2.C")
+Mono_beta = caget("X11MA-PGM:rbkbeta")
+Mono_beta_off1A = caget("X11MA-PGM:BETAOFF1.A")
+Mono_beta_off1B = caget("X11MA-PGM:BETAOFF1.B")
+Mono_beta_off1C = caget("X11MA-PGM:BETAOFF1.C")
+Mono_beta_off2A = caget("X11MA-PGM:BETAOFF2.A")
+Mono_beta_off2B = caget("X11MA-PGM:BETAOFF2.B")
+Mono_beta_off2C = caget("X11MA-PGM:BETAOFF2.C")
+
+
+Mono_cff = caget("X11MA-PGM:rbkcff")
+
+X11MA-PGM:grating
+Energy = 827.000 eV
+Cff = 1.7
+Offsets see screenshot
+
+FMU:
+X = -3.6501 mm
+Y = -3.2786 mm
+Z = -0.2798 mm
+Pitch = -0.9498 mrad
+Roll = 0.1098 mrad
+Yaw = 3.200 mrad
+
diff --git a/script/beamline_alignment/Development/FE_scan.py b/script/beamline_alignment/Development/FE_scan.py
new file mode 100755
index 0000000..d1ebc25
--- /dev/null
+++ b/script/beamline_alignment/Development/FE_scan.py
@@ -0,0 +1,77 @@
+#add_device(Positioner("FE_CX", "X11MA-FE-SL1:CENTERX", "X11MA-FE-SL1:CENTERX.RBV"), True)
+#add_device(Positioner("FE_CY", "X11MA-FE-SL1:CENTERY", "X11MA-FE-SL1:CENTERY.RBV"), True)
+#FE_CX.monitored=True
+#FE_CY.monitored=True
+
+cy=FE_CY.read()
+cx=FE_CX.read()
+
+DX=0.5
+DY=0.5
+STEPS=0.05
+
+xmin=cx-DX/2
+xmax=cx+DX/2
+
+ymin=cy-DY/2
+ymax=cy+DY/2
+
+#sensors = [CADC2, FE_CX, FE_CY, FE_CX_RBV, FE_CY_RBV]
+
+
+detectors=(CADC2, FE_CX_RBV, FE_CY_RBV)
+
+
+FE_CX.move(xmin)
+FE_CX.move(xmax)
+FE_CX.move(xmin)
+FE_CX.move(xmax)
+FE_CX.move(xmin)
+FE_CX.move(xmax)
+FE_CX.move(xmin)
+FE_CX.move(xmax)
+FE_CX.move(xmin)
+FE_CX.move(xmax)
+
+
+# moves to 30.0 blocking the code here until 30.0 is reached.
+# FE_CX.moveAsync(xmax)
+# moveAsync -> command starts the movement without blocking the code
+# The code would finish, if no other command follows.
+
+#res = tscan(detectors, 200, 0.1)
+
+
+#sensors = [Keithley_2_raw, CADC2, FE_CX, FE_CX_RBV, FE_CY, FE_CY_RBV]
+#detector = Keithley_2_raw
+
+#ascan([FE_CX, FE_CY], sensors, [X_min, Y_min], [X_max, Y_max], [X_step, Y_step], latency=0.5, zigzag=True)
+#ascan([FE_CX, FE_CY], sensors, [-1.0, 0.3], [0.0, 1.3], [0.1, 0.1], latency=0.5, zigzag=True)
+#ascan([FE_CX, FE_CY], sensors, [xmin, ymin], [xmax, ymax], [STEPS, STEPS], latency=0.25, zigzag=True)
+
+FE_CX.moveAsync(-0.849586500000001)
+FE_CY.moveAsync(1.4759635000000015)
+
+
+# Scan speed tests:
+#*****************
+#ascan([FE_CX, FE_CY], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.5, zigzag=False) Motor velocity = 0.5, 4 min 40 sec
+#ascan([FE_CX, FE_CY], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.5, zigzag=False) Motor velocity = 1.0, 4 min 35 sec
+#ascan([FE_CX, FE_CY], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.5, zigzag=True) Motor velocity = 1.0, 3 min 35 sec
+#scan([FE_CX, FE_CY], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.5, zigzag=True) Motor velocity = 5.0, 3 min 32 sec
+#ascan([FE_CX, FE_CY], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.25, zigzag=True) Motor velocity = 5.0, 2 min 53 sec
+#-> for latency below 0.25, motor errors occur
+
+# Test motor speed (on the motor panels):
+#TRXR Velocity 0.5 9 secs # Default setting for all motors (TRXR, TRYB, TRXW, TRYT)
+#TRXR Velocity 1.0 1 secs
+#TRXR Velocity 5.0 1 secs
+
+
+#caput X11MA-FE-SL1:TRXW.VELO 5.0
+
+#result=lscan(exit_slit, detector, 20.0, -30.0, steps=1.0, relative=False, latency=2.5)
+
+#result=tscan((exit_slit.readback,Keithley_2_raw), 100, 0.1)
+
+#lscan(energy, sensors, 1100, 1900, 5.0, latency=0.5)
\ No newline at end of file
diff --git a/script/beamline_alignment/Development/FE_scan_test_fast_AK.py b/script/beamline_alignment/Development/FE_scan_test_fast_AK.py
new file mode 100755
index 0000000..52dc615
--- /dev/null
+++ b/script/beamline_alignment/Development/FE_scan_test_fast_AK.py
@@ -0,0 +1,42 @@
+#add_device(Positioner("FE_TRXW", "X11MA-FE-SL1:TRXW", "X11MA-FE-SL1:TRXW.RBV"), True)
+#FE_TRXW.monitored=True
+
+detectors=(exit_slit.readback, CADC2)
+
+exit_slit.move(20.0)
+# moves to 20.0 blocking the code here until 20.0 is reached.
+exit_slit.moveAsync(-20.0)
+# moveAsync -> command starts the movement without blocking the code
+# The code would finish, if no other command follows.
+
+res = None
+# need just to be known
+
+#Monitr scan example
+def after_read(record, scan): # see definition of tscan under Built-in Function in Help
+ global res
+ if abs(record[exit_slit.readback] - (-20.0)) < 1.0:
+ scan.abort() # No documentation available, call Alexandre
+ res = scan.result
+
+#mscan(exit_slit.readback, detectors, points = -1, timeout = None, async = True, take_initial = True, after_read=after_read)
+
+#Time scan example
+try:
+ res = tscan(detectors, 10000, 0.01, after_read=after_read)
+except ScanAbortedException:
+ pass # just to properly get out here / no operation
+
+plot(res[CADC2], xdata=res[exit_slit.readback])
+
+FE_TRXW.move(0.5)
+FE_TRXW.move(0.0)
+FE_TRXW.move(0.5)
+FE_TRXW.move(0.0)
+FE_TRXW.move(0.5)
+FE_TRXW.move(0.0)
+FE_TRXW.move(0.5)
+FE_TRXW.move(0.0)
+FE_TRXW.move(0.5)
+FE_TRXW.move(0.0)
+
diff --git a/script/beamline_alignment/Development/Help_functions_first_light.py b/script/beamline_alignment/Development/Help_functions_first_light.py
new file mode 100755
index 0000000..bb45db5
--- /dev/null
+++ b/script/beamline_alignment/Development/Help_functions_first_light.py
@@ -0,0 +1,15 @@
+# mytools.py
+from beamline_configuration import *
+
+from collections import OrderedDict
+import os
+import json
+
+from javax.swing import JFileChooser
+from javax.swing.filechooser import FileNameExtensionFilter
+from java.io import File
+
+BEAMLINE_PARAMETERS_FILE = "/sls/X11MA/data/X11MA/pshell/home/script/beamline_alignment/bml_align_params.json"
+DATA_FILE = "/sls/X11MA/data/X11MA/pshell/home/data/2025_11/20251113/Monocam_AU_131.json"
+DATA_DIR = "/sls/X11MA/data/X11MA/scans/2511"
+#DATA_FILE = "/sls/X11MA/data/X11MA/scans/2511/0081.json"
\ No newline at end of file
diff --git a/script/beamline_alignment/Development/Test_AXIS_cam.py b/script/beamline_alignment/Development/Test_AXIS_cam.py
new file mode 100755
index 0000000..19ddf70
--- /dev/null
+++ b/script/beamline_alignment/Development/Test_AXIS_cam.py
@@ -0,0 +1,45 @@
+import os
+
+#path, name_only = save_data_and_config(default_dir=DATA_DIR, default_name=None, save_dialog=True)
+
+bml_save_current_settings()
+output_file = os.path.join(os.path.dirname(path), "Monocam_AU_"+name_only + ".jpg")
+
+#cmd = ["curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o ", output_file]
+cmd = "curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o " + output_file
+
+os.system(cmd)
+
+#from javax.swing import JFileChooser
+#from javax.swing.filechooser import FileNameExtensionFilter
+#from java.io import File
+#
+#frame = JFrame()
+#frame.setAlwaysOnTop(True) # Dialog erscheint im Vordergrund
+#
+#chooser = JFileChooser()
+#
+#default_dir = "/sls/X11MA/data/X11MA/scans/2511" # <-- deinen Pfad hier eintragen
+#chooser.setCurrentDirectory(File(default_dir))
+#
+## Nur *.json anzeigen
+#json_filter = FileNameExtensionFilter("JSON Dateien (*.json)", ["json"])
+#chooser.setFileFilter(json_filter)
+## Dialog anzeigen
+#result = chooser.showSaveDialog(frame)
+#
+#if result == JFileChooser.APPROVE_OPTION:
+# filename = chooser.getSelectedFile().getAbsolutePath()
+# print("Speichere Datei unter:", filename)
+#else:
+# print("Speichern abgebrochen.")
+
+# os.system("curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o /sls/X11MA/data/X11MA/scratch/kleibert/Rz_0000_test.jpg")
+
+
+
+#add_device(Positioner("FE_TRXW", "X11MA-FE-SL1:TRXW", "X11MA-FE-SL1:TRXW.RBV"), True)
+#FE_TRXW.monitored=True
+#http://129.129.121.54/axis-cgi/mjpg/video.cgi?id=0 true
+#http://root:monocam-4@129.129.121.54/axis-cgi/mjpg/video.cgi?id=0 true
+#os.system("curl http://root:monocam-4@129.129.121.54/axis-cgi/jpg/image.cgi -o /sls/X11MA/data/X11MA/scratch/kleibert/Rz_0000_test.jpg")
\ No newline at end of file
diff --git a/script/beamline_alignment/Development/test_cscan.py b/script/beamline_alignment/Development/test_cscan.py
new file mode 100755
index 0000000..29dc25d
--- /dev/null
+++ b/script/beamline_alignment/Development/test_cscan.py
@@ -0,0 +1,18 @@
+###################################################################################################
+# Demonstrate the use of Continuous Scan Scan: a Linear Scan with continuous motor move and
+# sampling on the fly.
+###################################################################################################
+
+
+m1.move(0.0)
+#
+##A single motor at current speed
+#r1 = cscan(m1, (ai1,ai2), -2, 3 , steps=10, relative=True)
+#
+##A single motor in a given time
+#r2 = cscan(m1, (ai1,ai2), -2.0, 3.0, steps=100 ,time = 4.0, relative=True)
+#
+##Multiple motors in a given time
+#r3 = cscan((m1, m2), (ai1,ai2), (-2.0, -3), (3.0, 5.0), steps=100,time = 4.0, relative=True)
+
+r4 = cscan([m1], [create_averager(ai1, 1, 0.05)], [-5.0], [5.0], [0.1], latency=0.0, time=5.0, relative=False, passes=1, zigzag=False, keep=False, name='Unknown')
\ No newline at end of file
diff --git a/script/beamline_alignment/Development/test_custom_plot.py b/script/beamline_alignment/Development/test_custom_plot.py
new file mode 100755
index 0000000..30c29e7
--- /dev/null
+++ b/script/beamline_alignment/Development/test_custom_plot.py
@@ -0,0 +1,56 @@
+data_1d = [10.0, 20.0, 30.0, 40.0, 50.0]
+data_2d = [ data_1d, data_1d, data_1d, data_1d, data_1d]
+
+data_x = [5.5, 2.0, 3.7, 4.2, 1.0]
+data_y = [1.0, 1.2, 6.6, 3.0, 1.0]
+
+#2d-plot with optional xdata and ydata
+plot(data_2d, title = "2d", xdata = data_x, ydata = data_y)
+
+#from org.jfree.chart import ChartFactory, ChartPanel
+#from org.jfree.data.xy import XYSeries, XYSeriesCollection
+#from javax.swing import JFrame
+#
+## Beispiel-Daten
+#x_values = [1, 2, 3, 4, 5]
+#y_values = [5, 7, 6, 8, 4]
+#
+## XY-Datenserie erstellen
+#series = XYSeries("Messdaten")
+#for x, y in zip(x_values, y_values):
+# series.add(x, y)
+#
+#dataset = XYSeriesCollection()
+#dataset.addSeries(series)
+#
+## Scatter-Plot erzeugen
+#chart = ChartFactory.createScatterPlot(
+# "Scatter Plot Beispiel",
+# "X-Achse",
+# "Y-Achse",
+# dataset
+#)
+#
+## --- GLEICHE SKALIERUNG FÜR X UND Y ---
+#plot = chart.getXYPlot()
+#x_axis = plot.getDomainAxis()
+#y_axis = plot.getRangeAxis()
+#
+#x_min, x_max = min(x_values), max(x_values)
+#y_min, y_max = min(y_values), max(y_values)
+#
+#range_x = x_max - x_min
+#range_y = y_max - y_min
+#max_range = max(range_x, range_y)
+#
+#x_mid = (x_min + x_max) / 2.0
+#y_mid = (y_min + y_max) / 2.0
+#
+#x_axis.setRange(x_mid - max_range/2.0, x_mid + max_range/2.0)
+#y_axis.setRange(y_mid - max_range/2.0, y_mid + max_range/2.0)
+#
+## Fenster anzeigen
+#frame = JFrame("Plot")
+#frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
+#frame.setSize(800, 600)
+#frame.add(ChartPanel(chart))
diff --git a/script/beamline_alignment/Development/test_listener.py b/script/beamline_alignment/Development/test_listener.py
new file mode 100755
index 0000000..2038a31
--- /dev/null
+++ b/script/beamline_alignment/Development/test_listener.py
@@ -0,0 +1,49 @@
+###################################################################################################
+# Create a device listener to interrupt the scan
+###################################################################################################
+
+import java.lang.InterruptedException
+
+#Create a listener to the sensor, verifying the readback values.
+class ListenerAI (DeviceListener):
+ def onValueChanged(self, device, value, former):
+ if value > 1.00:
+ print "Value over limit-> aborting"
+ abort()
+listenerAI = ListenerAI()
+ai1.addListener(listenerAI)
+#Create a listener to the sensor, verifying the readback values.
+class ListenerPressure (DeviceListener):
+ def onValueChanged(self, device, value, former):
+ if value > -1.400:
+ print "Value over limit-> aborting"
+ abort()
+listenerPressure = ListenerPressure()
+BML_FE_CX_RBV.addListener(listenerPressure)
+
+
+
+#Create a listener to the positioner checking the setpoint before each command is sent.
+class ListenerAO (DeviceListener):
+ def onStateChanged(self, device, state, former):
+ pass
+ def onValueChanged(self, device, value, former):
+ print "Moved to: " + str(value)
+ def onValueChanging(self, device, value, former):
+ if value > 0.2:
+ #Vetoing the change will abort the scan
+ raise Exception("Forbidden move to " + str(value))
+ print "Moving to: " + str(value) + " ... " ,
+listenerAO = ListenerAO()
+ao1.addListener(listenerAO)
+
+try:
+ cscan(m1, BML_FE_CX_RBV, [-5.0], [5.0], [0.1], latency=0.0, time=5.0, relative=False, passes=1, zigzag=False, keep=False, name='Unknown')
+ # cscan([m1], [create_averager(ai1, 1, 0.05)], [-5.0], [5.0], [0.1], latency=0.0, time=5.0, relative=False, passes=1, zigzag=False, keep=False, name='Unknown')
+ # lscan(ao1, (ai1), 0, 40, 200, 0.01)
+ #a= lscan((ao1,positioner),(ai2,wf1,averager,clock),(0,0),(40,20),20,0.1)
+except java.lang.InterruptedException:
+ print "Aborted"
+finally:
+ ai1.removeListener(listenerAI)
+ ao1.removeListener(listenerAO)
diff --git a/script/beamline_alignment/FE_scan.py b/script/beamline_alignment/FE_scan.py
deleted file mode 100644
index 00a8532..0000000
--- a/script/beamline_alignment/FE_scan.py
+++ /dev/null
@@ -1,13 +0,0 @@
-add_device(Positioner("FE_CX", "X11MA-FE-SL1:CENTERX", "X11MA-FE-SL1:CENTERX.RBV"), True)
-add_device(Positioner("FE_CY", "X11MA-FE-SL1:CENTERY", "X11MA-FE-SL1:CENTERY.RBV"), True)
-FE_CX.monitored=True
-FE_CY.monitored=True
-
-sensors = [Keithley_2_raw]
-
-
-#ascan([FE_CX, FE_CY], sensors, [X_min, Y_min], [X_max, Y_max], [X_step, Y_step], latency=0.5, zigzag=True)
-#ascan([FE_CX, FE_CY], sensors, [-1.0, 0.3], [0.0, 1.3], [0.1, 0.1], latency=0.5, zigzag=True)
-ascan([FE_CX, FE_CY], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.5, zigzag=False)
-
-#lscan(energy, sensors, 1100, 1900, 5.0, latency=0.5)
\ No newline at end of file
diff --git a/script/beamline_alignment/Write_Data.py b/script/beamline_alignment/Write_Data.py
deleted file mode 100644
index 6f64b1f..0000000
--- a/script/beamline_alignment/Write_Data.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#import locale
-# System-Standardkodierung anzeigen
-#print(locale.getpreferredencoding(False))
-
-# Beispiel: Datei in einem bestimmten Ordner speichern
-# Pfad zur Datei (z. B. auf Windows)
-
-from pathlib import Path
-
-msg = "Save as ..."
-path = get_string(msg, default = "/home/gac-x11ma/pshell/home/script/beamline_alignment/0012.txt", alternatives = None, password = False)
-index = 0
-status = 0
-
-try:
- zeilen = ['Das ist die erste Zeile.', 'Hier kommt die zweite Zeile.', 'Und das ist die dritte Zeile.']
-
- with open(path, "w") as file1:
- for zeile in zeilen:
- file1.write(zeile + "\n")
- print ("Datei wurde erfolgreich in " + path + " geschrieben.")
-
-except:
- index = 1
- status = "Exception:" #, sys.exc_info()[2]
- print ("Aborted by user.")
-
- # return index, status
-
-
diff --git a/script/beamline_alignment/beamline_functions.py b/script/beamline_alignment/beamline_functions.py
deleted file mode 100755
index 3211ea1..0000000
--- a/script/beamline_alignment/beamline_functions.py
+++ /dev/null
@@ -1,54 +0,0 @@
-def close_FE_slits():
-
-
- BML_FE_sizeX.setSpeed(0.4)
- BML_FE_sizeY.setSpeed(0.4)
-
- BML_FE_sizeX.moveAsync(-0.5)
- BML_FE_sizeY.move(-0.5)
-
- BML_FE_sizeX.setSpeed(0.1)
- BML_FE_sizeY.setSpeed(0.1)
-
-def open_AU_slits():
-
- BML_AU_TRYB.moveAsync(-5.0)
- BML_AU_TRYT.moveAsync(5.0)
- BML_AU_TRXW.moveAsync(-5.0)
- BML_AU_TRXR.moveAsync(5.0)
-
-
-
-# BML_FE_sizeX.moveAsync(0.5)
-# BML_FE_sizeY.moveAsync(0.5)
- # retries = 1
-# status = 0
-#
-## for i in range(retries):
-## try:
-## BML_FE_sizeX.move(-0.5)
-# print "Set speed BML_FE_sizeX to 0.0"
-# except:
-# print "Error: "
-# status = sys.exc_info()[2]
-# return status
-# for i in range(retries):
-# try:
-# stop_eiger() #Set mode single
-# eiger.setNumImages(1)# Is it relevant?]
-# caputq("X11MA-ES1-SD1:cam1:NumImages",1);
-# set_eiger_number_of_frames(1)
-# caget("X11MA-ES1-SD1:cam1:NumFrames_RBV") and compares before writing (therefore does nothing)
-# if exposure:
-# set_exposure_time(exposure, check)
-# apply_averaging_detector(is_averaging_detector())
-# caput("X11MA-ES1-SD1:Proc1:EnableFilter", False)
-# caput("X11MA-ES1-SD1:Proc1:NumFilter", 1)
-# caput("X11MA-ES1-SD1:cam1:NumCycles", 1)
-# break
-# except:
-# if i==(retries-1):
-# raise
-# else:
-# print "Error initializing Eiger, retrying: " + str(sys.exc_info()[1])
-
diff --git a/script/beamline_alignment/bml_align_params.json b/script/beamline_alignment/bml_align_params.json
old mode 100644
new mode 100755
index d67bf14..5fe99b8
--- a/script/beamline_alignment/bml_align_params.json
+++ b/script/beamline_alignment/bml_align_params.json
@@ -23,7 +23,15 @@
"ID2_energy": {"read_cmd": "X11MA-UIND2:ENERGY-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
"ID2_mode": {"read_cmd": "X11MA-UIND2:MODE", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
"ID2_gap": {"read_cmd": "X11MA-UIND2:GAP-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
- "ID2_offset": {"read_cmd": "X11MA-UIND2:ENERGY-OFFS", "write_cmd": "None", "tolerance": 0.0001, "restorable": false}
+ "ID2_offset": {"read_cmd": "X11MA-UIND2:ENERGY-OFFS", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_TO_RAD": {"read_cmd": "X11MA-UIND2:TO-RAD-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_BO_RAD": {"read_cmd": "X11MA-UIND2:BO-RAD-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_TI_RAD": {"read_cmd": "X11MA-UIND2:TI-RAD-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_BI_RAD": {"read_cmd": "X11MA-UIND2:BI-RAD-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_TO_SHIFT": {"read_cmd": "X11MA-UIND2:TO-SHIFT-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_BO_SHIFT": {"read_cmd": "X11MA-UIND2:BO-SHIFT-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_TI_SHIFT": {"read_cmd": "X11MA-UIND2:TI-SHIFT-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
+ "ID2_BI_SHIFT": {"read_cmd": "X11MA-UIND2:BI-SHIFT-RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false}
},
"XBPM1": {
"XBPM1_X_motor": {"read_cmd": "X11MA-FE-XBPM1:TRX.RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false},
@@ -40,12 +48,17 @@
"FE_TRYT": {"read_cmd": "X11MA-FE-SL1:TRYT.RBV", "write_cmd": "X11MA-FE-SL1:TRYT", "tolerance": 0.001, "restorable": true}
},
"CMU": {
- "CMU_X": {"read_cmd": "X11MA-OP-CM:ox", "write_cmd": "X11MA-OP-CM:x", "tolerance": 0.0001, "restorable": false},
- "CMU_Y": {"read_cmd": "X11MA-OP-CM:oy", "write_cmd": "X11MA-OP-CM:y", "tolerance": 0.0001, "restorable": true},
- "CMU_Z": {"read_cmd": "X11MA-OP-CM:oz", "write_cmd": "X11MA-OP-CM:z", "tolerance": 0.0001, "restorable": true},
- "CMU_Rx": {"read_cmd": "X11MA-OP-CM:oRx", "write_cmd": "X11MA-OP-CM:Rx", "tolerance": 0.0001, "restorable": true},
- "CMU_Ry": {"read_cmd": "X11MA-OP-CM:oRy", "write_cmd": "X11MA-OP-CM:Ry", "tolerance": 0.0001, "restorable": true},
- "CMU_Rz": {"read_cmd": "X11MA-OP-CM:oRz", "write_cmd": "X11MA-OP-CM:Rz", "tolerance": 0.0001, "restorable": true},
+ "CMU_TRY": {"read_cmd": "X11MA-OP2-CM:TRY", "write_cmd": "X11MA-OP2-CM:TRY", "tolerance": 0.0001, "restorable": true},
+ "CMU_TRZ": {"read_cmd": "X11MA-OP2-CM:TRZ", "write_cmd": "X11MA-OP2-CM:TRZ", "tolerance": 0.0001, "restorable": true},
+ "CMU_ROX": {"read_cmd": "X11MA-OP2-CM:ROX", "write_cmd": "X11MA-OP2-CM:ROX", "tolerance": 0.0001, "restorable": true},
+ "CMU_ROY": {"read_cmd": "X11MA-OP2-CM:ROY", "write_cmd": "X11MA-OP2-CM:ROY", "tolerance": 0.0001, "restorable": true},
+ "CMU_ROZ": {"read_cmd": "X11MA-OP2-CM:ROZ", "write_cmd": "X11MA-OP2-CM:ROZ", "tolerance": 0.0001, "restorable": true},
+ "CMU_x_RBV": {"read_cmd": "X11MA-OP-CM:ox", "write_cmd": "X11MA-OP-CM:ox", "tolerance": 0.0001, "restorable": false},
+ "CMU_y_RBV": {"read_cmd": "X11MA-OP-CM:oy", "write_cmd": "X11MA-OP-CM:oy", "tolerance": 0.0001, "restorable": false},
+ "CMU_z_RBV": {"read_cmd": "X11MA-OP-CM:oz", "write_cmd": "X11MA-OP-CM:oz", "tolerance": 0.0001, "restorable": false},
+ "CMU_Rx_RBV": {"read_cmd": "X11MA-OP-CM:oRx", "write_cmd": "X11MA-OP-CM:Rx", "tolerance": 0.0001, "restorable": false},
+ "CMU_Ry_RBV": {"read_cmd": "X11MA-OP-CM:oRy", "write_cmd": "X11MA-OP-CM:Ry", "tolerance": 0.0001, "restorable": false},
+ "CMU_Rz_RBV": {"read_cmd": "X11MA-OP-CM:oRz", "write_cmd": "X11MA-OP-CM:Rz", "tolerance": 0.0001, "restorable": false},
"CMU_baffle": {"read_cmd": "X11MA-OP2-CM:TRB.RBV", "write_cmd": "None", "tolerance": 0.0001, "restorable": false}
},
"XBPM2": {
@@ -59,14 +72,21 @@
"AU_sizeH": {"read_cmd": "X11MA-OP2-AHsize", "write_cmd": "X11MA-OP2-AHsize", "tolerance": 0.001, "restorable": false},
"AU_TRXR": {"read_cmd": "X11MA-OP2-AU:TRZ1.RBV", "write_cmd": "X11MA-OP2-AU:TRZ1", "tolerance": 0.001, "restorable": false},
"AU_TRXW": {"read_cmd": "X11MA-OP2-AU:TRZ4.RBV", "write_cmd": "X11MA-OP2-AU:TRZ4", "tolerance": 0.001, "restorable": false},
- "AU_TRYB": {"read_cmd": "X11MA-OP2-AU:TRY1.RBV", "write_cmd": "X11MA-OP2-AU:TRY1", "tolerance": 0.001, "restorable": false},
- "AU_TRYT": {"read_cmd": "X11MA-OP2-AU:TRY4.RBV", "write_cmd": "X11MA-OP2-AU:TRY4", "tolerance": 0.001, "restorable": false}
+ "AU_TRYT": {"read_cmd": "X11MA-OP2-AU:TRY1.RBV", "write_cmd": "X11MA-OP2-AU:TRY1", "tolerance": 0.001, "restorable": false},
+ "AU_TRYB": {"read_cmd": "X11MA-OP2-AU:TRY4.RBV", "write_cmd": "X11MA-OP2-AU:TRY4", "tolerance": 0.001, "restorable": false}
},
"Mono": {
"Mono_energy": {"read_cmd": "X11MA-PGM:rbkenergy", "write_cmd": "X11MA-PGM:energy", "tolerance": 0.001, "restorable": false},
"Mono_cff_A": {"read_cmd": "X11MA-PGM:rbkcff", "write_cmd": "X11MA-PGM:cff.A", "tolerance": 0.01, "restorable": false},
"Mono_cff_B": {"read_cmd": "X11MA-PGM:rbkcff", "write_cmd": "X11MA-PGM:cff.B", "tolerance": 0.01, "restorable": false},
"Mono_cff_C": {"read_cmd": "X11MA-PGM:rbkcff", "write_cmd": "X11MA-PGM:cff.C", "tolerance": 0.01, "restorable": false},
+ "Mono_beta": {"read_cmd": "X11MA-PGM:rbkbeta", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
+ "Mono_beta_off1A": {"read_cmd": "X11MA-PGM:BETAOFF1.A", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
+ "Mono_beta_off1B": {"read_cmd": "X11MA-PGM:BETAOFF1.B", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
+ "Mono_beta_off1C": {"read_cmd": "X11MA-PGM:BETAOFF1.C", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
+ "Mono_beta_off2A": {"read_cmd": "X11MA-PGM:BETAOFF2.A", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
+ "Mono_beta_off2B": {"read_cmd": "X11MA-PGM:BETAOFF2.B", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
+ "Mono_beta_off2C": {"read_cmd": "X11MA-PGM:BETAOFF2.C", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
"Mono_theta": {"read_cmd": "X11MA-PGM:rbktheta", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
"Mono_theta_off1A": {"read_cmd": "X11MA-PGM:THETAOFF1.A", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
"Mono_theta_off1B": {"read_cmd": "X11MA-PGM:THETAOFF1.B", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
@@ -74,12 +94,13 @@
"Mono_theta_off2A": {"read_cmd": "X11MA-PGM:THETAOFF2.A", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
"Mono_theta_off2B": {"read_cmd": "X11MA-PGM:THETAOFF2.B", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
"Mono_theta_off2C": {"read_cmd": "X11MA-PGM:THETAOFF2.C", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
+
"Mono_mirror_origin": {"read_cmd": "X11MA:m3.RBV", "write_cmd": "None", "tolerance": 0.001, "restorable": false},
"Mono_grating_origin": {"read_cmd": "X11MA:m4.RBV", "write_cmd": "None", "tolerance": 0.001, "restorable": false}
},
"FMU_aperture": {
- "top": {"read_cmd": "X11MA-OP-FM:TRYT.RBV", "write_cmd": "None", "tolerance": 1.0, "restorable": false},
- "bottom": {"read_cmd": "X11MA-OP-FM:TRYB.RBV", "write_cmd": "None", "tolerance": 1.0, "restorable": false}
+ "FMU_aperture_top": {"read_cmd": "X11MA-OP-FM:TRYT.RBV", "write_cmd": "None", "tolerance": 1.0, "restorable": false},
+ "FMU_aperture_bottom": {"read_cmd": "X11MA-OP-FM:TRYB.RBV", "write_cmd": "None", "tolerance": 1.0, "restorable": false}
},
"FMU": {
"FMU_X": {"read_cmd": "X11MA-OP-FM:X.RBV", "write_cmd": "X11MA-OP-FM:X", "tolerance": 0.001, "restorable": false},
@@ -94,12 +115,12 @@
"FMU_ROTY": {"read_cmd": "X11MA-OP-FM:ROTY.RBV", "write_cmd": "X11MA-OP-FM:ROTY", "tolerance": 0.001, "restorable": true}
},
"ESLIT": {
- "width": {"read_cmd": "X11MA-OP2-SL:TRY.RBV", "write_cmd": "None", "tolerance": 1.0, "restorable": false},
- "position": {"read_cmd": "X11MA-OP2-SL:TRX.RBV", "write_cmd": "None", "tolerance": 0.1, "restorable": false}
+ "ESLIT_width": {"read_cmd": "X11MA-OP2-SL:TRY.RBV", "write_cmd": "None", "tolerance": 1.0, "restorable": false},
+ "ESLIT_position": {"read_cmd": "X11MA-OP2-SL:TRX.RBV", "write_cmd": "None", "tolerance": 0.1, "restorable": false}
},
- "Diag": {
- "position": {"read_cmd": "X11MA-OP-DI:HO3.RBV", "tolerance": 0.1, "restorable": false},
- "select": {"read_cmd": "X11MA:DIAG-SET", "tolerance": 0.0, "restorable": false}
+ "DIAG": {
+ "DIAG_position": {"read_cmd": "X11MA-OP-DI:HO3.RBV", "tolerance": 0.1, "restorable": false},
+ "DIAG_select": {"read_cmd": "X11MA:DIAG-SET", "tolerance": 0.0, "restorable": false}
},
"RMU1": {
"RMU1_X": {"read_cmd": "X11MA-OP-RM1:X.RBV", "write_cmd": "X11MA-OP-RM1:X", "tolerance": 0.001, "restorable": false},
@@ -107,9 +128,9 @@
"RMU1_PITCH": {"read_cmd": "X11MA-OP-RM1:PITCH.RBV", "write_cmd": "X11MA-OP-RM1:PITCH", "tolerance": 0.001, "restorable": false},
"RMU1_ROLL": {"read_cmd": "X11MA-OP-RM1:ROLL.RBV", "write_cmd": "X11MA-OP-RM1:ROLL", "tolerance": 0.001, "restorable": false},
"RMU1_YAW": {"read_cmd": "X11MA-OP-RM1:YAW.RBV", "write_cmd": "X11MA-OP-RM1:YAW", "tolerance": 0.001, "restorable": false},
- "RMU1_TRYD": {"read_cmd": "X11MA-OP-RM1:TRYD.RBV", "write_cmd": "X11MA-OP-RM1:TRYD", "tolerance": 0.001, "restorable": true},
- "RMU1_TRYUR": {"read_cmd": "X11MA-OP-RM1:TRYUR.RBV", "write_cmd": "X11MA-OP-RM1:TRYUR", "tolerance": 0.001, "restorable": true},
- "RMU1_TRYUW": {"read_cmd": "X11MA-OP-RM1:TRYUW.RBV", "write_cmd": "X11MA-OP-RM1:TRYUW", "tolerance": 0.001, "restorable": true},
+ "RMU1_TRYU": {"read_cmd": "X11MA-OP-RM1:TRYU.RBV", "write_cmd": "X11MA-OP-RM1:TRYU", "tolerance": 0.001, "restorable": true},
+ "RMU1_TRYDW": {"read_cmd": "X11MA-OP-RM1:TRYDW.RBV", "write_cmd": "X11MA-OP-RM1:TRYDW", "tolerance": 0.001, "restorable": true},
+ "RMU1_TRYDR": {"read_cmd": "X11MA-OP-RM1:TRYDR.RBV", "write_cmd": "X11MA-OP-RM1:TRYDR", "tolerance": 0.001, "restorable": true},
"RMU1_TRX": {"read_cmd": "X11MA-OP-RM1:TRX.RBV", "write_cmd": "X11MA-OP-RM1:TRX", "tolerance": 0.001, "restorable": true},
"RMU1_ROTY": {"read_cmd": "X11MA-OP-RM1:ROTY.RBV", "write_cmd": "X11MA-OP-RM1:ROTY", "tolerance": 0.001, "restorable": true}
},
@@ -128,21 +149,21 @@
"PEEM_girder_M6": {"read_cmd": "X11MA-HG:M6.RBV", "write_cmd": "X11MA-HG:M6", "tolerance": 0.001, "restorable": true}
},
"Ptycho_slits": {
- "PDS_centerX": {"read_cmd": "X11MA-OP-SL:CENTERX.RBV", "write_cmd": "X11MA-OP-SL:CENTERX", "tolerance": 0.001, "restorable": false},
- "PDS_centerY": {"read_cmd": "X11MA-OP-SL:CENTERY.RBV", "write_cmd": "X11MA-OP-SL:CENTERY", "tolerance": 0.001, "restorable": false},
- "PDS_sizeX": {"read_cmd": "X11MA-OP-SL:SIZEX.RBV", "write_cmd": "X11MA-OP-SL:SIZEX", "tolerance": 0.001, "restorable": false},
- "PDS_sizeY": {"read_cmd": "X11MA-OP-SL:SIZEY.RBV", "write_cmd": "XX11MA-OP-SL:SIZEY", "tolerance": 0.001, "restorable": false},
- "PDS_TRXR": {"read_cmd": "X11MA-OP-SL:TRXR.RBV", "write_cmd": "X11MA-OP-SL:TRXR", "tolerance": 0.001, "restorable": true},
- "PDS_TRXW": {"read_cmd": "X11MA-OP-SL:TRXW.RBV", "write_cmd": "X11MA-OP-SL:TRXW", "tolerance": 0.001, "restorable": true},
- "PDS_TRYB": {"read_cmd": "X11MA-OP-SL:TRYB.RBV", "write_cmd": "X11MA-OP-SLTRYB", "tolerance": 0.001, "restorable": true},
- "PDS_TRYT": {"read_cmd": "X11MA-OP-SL:TRYT.RBV", "write_cmd": "X11MA-OP-SL:TRYT", "tolerance": 0.001, "restorable": true}
+ "Ptycho_slits_centerX": {"read_cmd": "X11MA-OP-SL:CENTERX.RBV", "write_cmd": "X11MA-OP-SL:CENTERX", "tolerance": 0.001, "restorable": false},
+ "Ptycho_slits_centerY": {"read_cmd": "X11MA-OP-SL:CENTERY.RBV", "write_cmd": "X11MA-OP-SL:CENTERY", "tolerance": 0.001, "restorable": false},
+ "Ptycho_slits_sizeX": {"read_cmd": "X11MA-OP-SL:SIZEX.RBV", "write_cmd": "X11MA-OP-SL:SIZEX", "tolerance": 0.001, "restorable": false},
+ "Ptycho_slits_sizeY": {"read_cmd": "X11MA-OP-SL:SIZEY.RBV", "write_cmd": "XX11MA-OP-SL:SIZEY", "tolerance": 0.001, "restorable": false},
+ "Ptycho_slits_TRXR": {"read_cmd": "X11MA-OP-SL:TRXR.RBV", "write_cmd": "X11MA-OP-SL:TRXR", "tolerance": 0.001, "restorable": true},
+ "Ptycho_slits_TRXW": {"read_cmd": "X11MA-OP-SL:TRXW.RBV", "write_cmd": "X11MA-OP-SL:TRXW", "tolerance": 0.001, "restorable": true},
+ "Ptycho_slits_TRYB": {"read_cmd": "X11MA-OP-SL:TRYB.RBV", "write_cmd": "X11MA-OP-SLTRYB", "tolerance": 0.001, "restorable": true},
+ "Ptycho_slits_TRYT": {"read_cmd": "X11MA-OP-SL:TRYT.RBV", "write_cmd": "X11MA-OP-SL:TRYT", "tolerance": 0.001, "restorable": true}
},
"RMU2": {
- "RMU_X": {"read_cmd": "X11MA-OP-RM2:ox", "write_cmd": "X11MA-OP-RM2:x", "tolerance": 0.0001, "restorable": false},
- "RMU_Y": {"read_cmd": "X11MA-OP-RM2:oy", "write_cmd": "X11MA-OP-RM2:y", "tolerance": 0.0001, "restorable": true},
- "RMU_Z": {"read_cmd": "X11MA-OP-RM2:oz", "write_cmd": "X11MA-OP-RM2:z", "tolerance": 0.0001, "restorable": true},
- "RMU_Rx": {"read_cmd": "X11MA-OP-RM2:oRx", "write_cmd": "X11MA-OP-RM2:Rx", "tolerance": 0.0001, "restorable": true},
- "RMU_Ry": {"read_cmd": "X11MA-OP-RM2:oRy", "write_cmd": "X11MA-OP-RM2:Ry", "tolerance": 0.0001, "restorable": true},
- "RMU_Rz": {"read_cmd": "X11MA-OP-RM2:oRz", "write_cmd": "X11MA-OP-RM2:Rz", "tolerance": 0.0001, "restorable": true}
+ "RMU2_X": {"read_cmd": "X11MA-OP-RM2:ox", "write_cmd": "X11MA-OP-RM2:x", "tolerance": 0.0001, "restorable": false},
+ "RMU2_Y": {"read_cmd": "X11MA-OP-RM2:oy", "write_cmd": "X11MA-OP-RM2:y", "tolerance": 0.0001, "restorable": true},
+ "RMU2_Z": {"read_cmd": "X11MA-OP-RM2:oz", "write_cmd": "X11MA-OP-RM2:z", "tolerance": 0.0001, "restorable": true},
+ "RMU2_Rx": {"read_cmd": "X11MA-OP-RM2:oRx", "write_cmd": "X11MA-OP-RM2:Rx", "tolerance": 0.0001, "restorable": true},
+ "RMU2_Ry": {"read_cmd": "X11MA-OP-RM2:oRy", "write_cmd": "X11MA-OP-RM2:Ry", "tolerance": 0.0001, "restorable": true},
+ "RMU2_Rz": {"read_cmd": "X11MA-OP-RM2:oRz", "write_cmd": "X11MA-OP-RM2:Rz", "tolerance": 0.0001, "restorable": true}
}
}
diff --git a/script/beamline_alignment/test_XBPM1_scan.py b/script/beamline_alignment/test_XBPM1_scan.py
new file mode 100644
index 0000000..b825763
--- /dev/null
+++ b/script/beamline_alignment/test_XBPM1_scan.py
@@ -0,0 +1,42 @@
+xbpm1_cx = 0.0
+xbpm1_cy = 0.0
+# Read initial speed
+# xbpm1_ini_x_speed = BML_XBPM_A_TRX.getSpeed()
+# xbpm1_ini_y_speed = BML_XBPM_A_TRY.getSpeed()
+#
+# BML_XBPM_A_TRX.setSpeed(0.8)
+# BML_XBPM_A_TRY.setSpeed(0.8)
+#
+# BML_XBPM_A_TRX.move(xbpm1_cx)
+# BML_XBPM_A_TRY.move(xbpm1_cy)
+
+x_range = 1.8
+y_range = 1.8
+x_steps = 0.1
+y_steps = 0.1
+
+xmin = xbpm1_cx - x_range/2
+xmax = xbpm1_cx + x_range/2
+
+ymin = xbpm1_cy - y_range/2
+ymax = xbpm1_cy + y_range/2
+#
+# BML_XBPM_A_TRX.setSpeed(3.0)
+# BML_XBPM_A_TRY.setSpeed(3.0)
+
+BML_XBPM_A_TRX.move(xmin)
+BML_XBPM_A_TRY.move(ymin)
+
+sensors = [BML_XBPM_A_CUR_1, BML_XBPM_A_CUR_2, BML_XBPM_A_CUR_3, BML_XBPM_A_CUR_4]
+#detector = Keithley_2_raw
+
+result = ascan([BML_XBPM_A_TRX, BML_XBPM_A_TRY], sensors, [xmin, ymin], [xmax, ymax], [x_steps, y_steps], latency=0.2, zigzag=False)
+#ascan([FE_CX, FE_CY], sensors, [-1.0, 0.3], [0.0, 1.3], [0.1, 0.1], latency=0.5, zigzag=True)
+#ascan([FE_CX, FE_CY], sensors, [xmin, ymin], [xmax, ymax], [STEPS, STEPS], latency=0.25, zigzag=True)
+
+json_path = get_exec_pars().path
+bml_save_scan_settings_json(json_path)
+
+BML_XBPM_A_TRX.move(xbpm1_cx)
+BML_XBPM_A_TRY.move(xbpm1_cy)
+
\ No newline at end of file
diff --git a/script/beamline_alignment/test_axis.py b/script/beamline_alignment/test_axis.py
new file mode 100644
index 0000000..ad02d35
--- /dev/null
+++ b/script/beamline_alignment/test_axis.py
@@ -0,0 +1,31 @@
+# d=axis.data
+# d.toGrayscale()
+# m=axis.data.toGrayscale().matrix
+# plot(axis.data.toGrayscale().matrix)
+# axis.data.width
+# d.getRoi(Rectangle(100,100,300,200))
+# plot(d.getRoi(Rectangle(100,100,300,200)).matrix)
+
+
+# Full gray scale image
+
+class AxisData(ReadableMatrix):
+ def read(self):
+ return axis.data.toGrayscale().matrix
+
+ def getWidth(self):
+ return axis.data.width
+
+ def getHeight(self):
+ return axis.data.height
+
+
+#axis_data = AxisData()
+#tscan(axis_data, 10, 1.0, save=False)
+
+# Evaluate intensity of ROI
+
+
+class AxisROIIntensity(Readable):
+ def read(self):
+ return axis.data.getRoi(Rectangle(100,100,300,200)).integrate()
\ No newline at end of file
diff --git a/script/beamline_alignment/test_parameters.json b/script/beamline_alignment/test_parameters.json
deleted file mode 100644
index 0133a64..0000000
--- a/script/beamline_alignment/test_parameters.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "A": {
- "1": {
- "value": 12.5,
- "tolerance": 0.5
- },
- "2": {
- "value": 7.8,
- "tolerance": 0.2
- }
- },
- "B": {
- "1": {
- "value": 3.4,
- "tolerance": 0.1
- }
- }
-}
\ No newline at end of file
diff --git a/script/beamline_init/init/InitAU.py b/script/beamline_init/init/InitAU.py
old mode 100644
new mode 100755
diff --git a/script/beamline_init/init/InitCMU.py b/script/beamline_init/init/InitCMU.py
old mode 100644
new mode 100755
diff --git a/script/beamline_init/init/InitExitSlit.py b/script/beamline_init/init/InitExitSlit.py
old mode 100644
new mode 100755
diff --git a/script/beamline_init/init/InitFE.py b/script/beamline_init/init/InitFE.py
old mode 100644
new mode 100755
diff --git a/script/beamline_init/test.sh b/script/beamline_init/test.sh
old mode 100644
new mode 100755
diff --git a/script/beamline_init/with_x-rays/04a_2D_FE_ID2_fast.py b/script/beamline_init/with_x-rays/01_FE_slits/01_Archive/02_2DFE_scan_fast.py
old mode 100644
new mode 100755
similarity index 100%
rename from script/beamline_init/with_x-rays/04a_2D_FE_ID2_fast.py
rename to script/beamline_init/with_x-rays/01_FE_slits/01_Archive/02_2DFE_scan_fast.py
diff --git a/script/beamline_init/with_x-rays/01_FE_slits/01_Archive/02_2DFE_scan_fast_test_speed.py b/script/beamline_init/with_x-rays/01_FE_slits/01_Archive/02_2DFE_scan_fast_test_speed.py
new file mode 100755
index 0000000..b525826
--- /dev/null
+++ b/script/beamline_init/with_x-rays/01_FE_slits/01_Archive/02_2DFE_scan_fast_test_speed.py
@@ -0,0 +1,27 @@
+import sys
+
+#seting parameters
+sensor = KEI11
+if sensor == KEI10:
+ detector= Keithley_1_raw
+elif sensor == KEI11:
+ detector= Keithley_2_raw
+else:
+ print "Select a proper detector: KEI10 or KEI11."
+ sys.exit()
+
+#Hill Climbing Search
+fe_slit_V_ctr.move(0.13);
+fe_slit_H_ctr.move(1.48);
+r = hsearch([fe_slit_V_ctr, fe_slit_H_ctr], detector,[-0.5,-0.5], [1.0,2.0], [0.1, 0.1], [0.02, 0.02], 1, relative = False, maximum=True, latency = 1.0, title = "Hill Climbing")
+print "--------------- Hill Climbing Search -----------------"
+print r
+print r.print()
+print len(r.getRecords())
+
+#strategy = "Normal" # or "Boundary" or "FullNeighborhood"
+#r = bsearch([fe_slit_V_ctr, fe_slit_H_ctr], Keithley_1_raw, [-0.5,-0.5], [1.0,1.0], [0.1, 0.1], maximum=True, strategy = strategy, latency = 0.01, title = "Binary Search")
+#print "--------------- Binary Search -----------------"
+#print r
+#print r.print()
+#print len(r.getRecords())
\ No newline at end of file
diff --git a/script/beamline_init/with_x-rays/01_FE_slits/01_FE_offsets.py b/script/beamline_init/with_x-rays/01_FE_slits/01_FE_offsets.py
new file mode 100755
index 0000000..3dd19da
--- /dev/null
+++ b/script/beamline_init/with_x-rays/01_FE_slits/01_FE_offsets.py
@@ -0,0 +1,27 @@
+import sys
+
+#seting parameters
+sensor = KEI11
+if sensor == KEI10:
+ detector= keithley_1a
+ detector_range='X11MA-KEI10:RANGE'
+elif sensor == KEI11:
+ detector= keithley_2a
+ detector_range='X11MA-KEI11:RANGE'
+else:
+ print "Select a proper detector: KEI10 or KEI11."
+ sys.exit()
+
+caput(detector_range, 6) # 6 --> 200 nA
+BML_FE_SizeX.move(1.0)
+BML_FE_SizeY.move(1.0)
+
+#scan SizeH
+run('beamline_init/with_x-rays/functions/SlitCalib.py',{"Slit":BML_FE_SizeX, "Slit_offset":BML_FE_SizeX_offs, "detector":detector, "start":1.0, "end":-0.5, "step_size":0.03, "final_pos":1.0})
+time.sleep(1)
+#scan SizeV
+#SlitCalib(Slit=BML_FE_SizeY, Slit_offset=BML_FE_SizeY_offs, detector = keithley_1a, start=1.0, end=-0.5, step_size=0.03, final_pos=1.0)
+
+#resetting parameters
+caput ('X11MA-FE-DSAPER', 0) # 0--> closed
+caput(detector_range, 0) # 0--> AUTO
\ No newline at end of file
diff --git a/script/beamline_init/with_x-rays/04_2D_FE_ID2_scan.py b/script/beamline_init/with_x-rays/01_FE_slits/02_2DFE_scan.py
old mode 100644
new mode 100755
similarity index 100%
rename from script/beamline_init/with_x-rays/04_2D_FE_ID2_scan.py
rename to script/beamline_init/with_x-rays/01_FE_slits/02_2DFE_scan.py
diff --git a/script/beamline_init/with_x-rays/01_FE_slits/tests.py b/script/beamline_init/with_x-rays/01_FE_slits/tests.py
new file mode 100755
index 0000000..27d4a33
--- /dev/null
+++ b/script/beamline_init/with_x-rays/01_FE_slits/tests.py
@@ -0,0 +1,22 @@
+add_device(Positioner("FE_CX", "X11MA-FE-SL1:CENTERX", "X11MA-FE-SL1:CENTERX.RBV"), True)
+add_device(Positioner("FE_CY", "X11MA-FE-SL1:CENTERY", "X11MA-FE-SL1:CENTERY.RBV"), True)
+FE_CX.monitored=True
+FE_CY.monitored=True
+
+cy=FE_CY_RBV.read()
+cx=FE_CX_RBV.read()
+
+DX=0.5
+DY=0.5
+STEPS=0.05
+
+xmin=cx-DX/2
+xmax=cx+DX/2
+
+ymin=cy-DY/2
+ymax=cy+DY/2
+
+FE_CX.move(cx)
+FE_CY.move(cy)
+
+#sensors = [Keithley_2_raw, X11MA-ES1:CADC2, X11MA-FE-SL1:CENTERX, X11MA-FE-SL1:CENTERX.RBV, X11MA-FE-SL1:CENTERY, X11MA-FE-SL1:CENTERY.RBV]
diff --git a/script/beamline_init/with_x-rays/02_Eslit_offset.py b/script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset.py
old mode 100644
new mode 100755
similarity index 100%
rename from script/beamline_init/with_x-rays/02_Eslit_offset.py
rename to script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset.py
diff --git a/script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset_AK.py b/script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset_AK.py
new file mode 100755
index 0000000..57f8484
--- /dev/null
+++ b/script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset_AK.py
@@ -0,0 +1,30 @@
+import sys
+
+#seting parameters
+sensors = [Keithley_2_raw]
+#if sensor == 'KEI10':
+# detector= keithley_1a
+# detector_range='X11MA-KEI10:RANGE'
+#elif sensor == 'KEI11':
+# detector= keithley_2a
+# detector_range='X11MA-KEI11:RANGE'
+#else:
+# print "Select a proper detector: KEI10 or KEI11."
+# sys.exit()
+# caput(detector_range, 4) # 6 --> 200 nA
+
+detector = Keithley_2_raw
+
+exit_slit.move(30.0)
+speed = exit_slit.getSpeed() # default value = 200.0
+min_speed=exit_slit.getMinSpeed()
+exit_slit.setSpeed(min_speed)
+
+#scan Energy Slit
+time.sleep(1)
+run('beamline_init/with_x-rays/functions/SlitCalib.py',{"Slit":exit_slit, "Slit_offset":exit_slit_offset, "detector":detector, "start":30.0, "end":-20.0, "step_size":1.0, "final_pos":20.0})
+time.sleep(1)
+
+#resetting parameters
+#caput(detector_range, 0) # 0--> AUTO
+exit_slit.setSpeed(speed)
diff --git a/script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset_fast_AK.py b/script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset_fast_AK.py
new file mode 100755
index 0000000..ab667f7
--- /dev/null
+++ b/script/beamline_init/with_x-rays/04_exit_slit/02_Eslit_offset_fast_AK.py
@@ -0,0 +1,65 @@
+# Get raw position and size of energy slit
+# Get position of Diagn. Unit
+# Get Beamline settings (Mirrors, FE, undulator)
+# Get FE size
+# Check beamline status (Valves, Fast Shutter (remember state), Ring current, Monitors (remember status) in the beam etc.) possibly abort and send message
+# Move to Photodiode position
+# Set FE size
+# Measure intensity at +40 using Keithley raw
+# Set Keithley range
+# Read current motor settings
+# Set motor for scan and/or make one test scan to determine
+# Adjust setting for simple scan
+# Perform scan and fit, set new offset
+# Make note about difference between old and new?
+# Restore initial motor settings
+# Move Diag. Out
+# Put slit to original raw position, but show new size. - Check how this could work.
+
+initial_speed = caget("X11MA-OP2-SL:TRY.VELO")
+
+detectors=(exit_slit.readback, CADC2)
+
+
+exit_slit.move(30.0)
+# moves to 30.0 blocking the code here until 30.0 is reached.
+exit_slit.moveAsync(-20.0)
+# moveAsync -> command starts the movement without blocking the code
+# The code would finish, if no other command follows.
+
+res = tscan(detectors, 200, 0.01)
+
+# More complex version, where no knowledge about the speed of the motor is needed.
+#res = None
+## need just to be known
+#
+##Monitor scan example
+#def after_read(record, scan): # see definition of tscan under Built-in Function in Help
+# global res
+# if abs(record[exit_slit.readback] - (-20.0)) < 1.0:
+# scan.abort() # No documentation available, call Alexandre
+# res = scan.result
+#
+##mscan(exit_slit.readback, detectors, points = -1, timeout = None, async = True, take_initial = True, after_read=after_read)
+#
+##Time scan example
+#try:
+# res = tscan(detectors, 10000, 0.01, after_read=after_read)
+#except ScanAbortedException:
+# pass # just to properly get out here / no operation
+
+plot(res[CADC2], xdata=res[exit_slit.readback])
+
+# Homework:
+# 1. Make the same scan without Abort-function
+# 2. Check how to increase the resolution of the RBV of the exit slit.
+
+# Remember the following commands:
+# exit_slit.setSpeed(50)
+# exit_slit.read()
+# help(ascan)
+# Right mouse click and run in Tutorials
+# :history - lists the recent commands in the console
+# fit - Gaussian fit
+# help(fit) - help on fit
+# memory()
\ No newline at end of file
diff --git a/script/beamline_init/with_x-rays/04_exit_slit/functions/SlitCalib.py b/script/beamline_init/with_x-rays/04_exit_slit/functions/SlitCalib.py
new file mode 100755
index 0000000..03e9467
--- /dev/null
+++ b/script/beamline_init/with_x-rays/04_exit_slit/functions/SlitCalib.py
@@ -0,0 +1,68 @@
+###################################################################################################
+# Function fitting and peak search with mathutils.py
+###################################################################################################
+
+from mathutils import fit_polynomial # Python library
+from mathutils import PolynomialFunction # Python library
+# Input parameters (example)
+#Slit = exit_slit
+#Slit_offset = exit_slit_offset
+#detector = keithley_1a
+#start = 30.0
+#end = -20.0
+#step_size = 1.0
+#final_pos = 20.0
+
+# Execute the scan
+result=cscan(Slit, detector, start, end, float(step_size))
+
+readable_ = result[detector]
+positions_ = result[Slit]
+
+print readable_
+print positions_
+
+#readable=[]
+#positions=[]
+#
+## execute the fit
+#fit_threshold=readable_[0]*0.05
+#
+##filter the positions with analog values above the threshold
+#for i in range(8,len(positions_),1):
+# if(readable_[i] done. OK!"
+ set_return("OK")
+ else:
+ print "init-AU: ==> not done. NOT OK!"
+ set_return("Not OK")
+
+except:
+ set_return("Error")
+
+
diff --git a/script/beamline_init_old/init/InitCMU.py b/script/beamline_init_old/init/InitCMU.py
new file mode 100644
index 0000000..9c9ec04
--- /dev/null
+++ b/script/beamline_init_old/init/InitCMU.py
@@ -0,0 +1,122 @@
+import subprocess
+import time
+import traceback
+
+running = False
+counts = {}
+
+def countHS(motor):
+ global counts
+ try:
+ time.sleep(1.0)
+ counts[motor]=0
+ def on_change(value):
+ global counts
+ print "HomeSW changed on" , motor, "to", value
+ if int(value) == 1:
+ counts[motor]=counts[motor]+1
+
+ with Channel(motor+".ATHM", callback=on_change, monitored=True, name="test") as ch:
+ if int(ch.read()) == 1:
+ counts[motor]=1
+ while(running==True):
+ time.sleep(0.1)
+ print "Home Switch motor "+motor +" reached "+ str(counts[motor]) + " times\n"
+ return counts[motor]
+ except:
+ print "Exception counting "+str(motor)
+ traceback.print_exc()
+ raise
+
+def init():
+ try:
+ global running
+ running = True
+
+ print "startint CMU initilization"
+ x = caget('X11MA-OP-CM:ox')
+ y = caget('X11MA-OP-CM:oy')
+ z = caget('X11MA-OP-CM:oz')
+ Rx= caget('X11MA-OP-CM:oRx')
+ Ry= caget('X11MA-OP-CM:oRy')
+ Rz= caget('X11MA-OP-CM:oRz')
+ baf=caget('X11MA-OP2-CM:TRB.RBV')
+
+ print "Old motor positions: x = " +str(x)+ \
+ ", y = " +str(y)+ \
+ ", z = " +str(z)+ \
+ ", Rx = " +str(Rx)+ \
+ ", Ry = " +str(Ry)+ \
+ ", Rz = " +str(Rz)+ \
+ ", baffle = " +str(baf)
+
+ subprocess.call("X_X11MA_init-CMU.sh", shell=True)
+ print "Positions after initialisation: x = " +str(caget('X11MA-OP-CM:ox'))+ \
+ ", y = " +str(caget('X11MA-OP-CM:oy'))+ \
+ ", z = " +str(caget('X11MA-OP-CM:oz'))+ \
+ ", Rx = " +str(caget('X11MA-OP-CM:oRx'))+ \
+ ", Ry = " +str(caget('X11MA-OP-CM:oRy'))+ \
+ ", Rz = " +str(caget('X11MA-OP-CM:oRz'))+ \
+ ", baffle = " +str(caget('X11MA-OP2-CM:TRB.RBV'))
+
+ print "Restoring old motor positions"
+ caput('X11MA-OP-CM:y',y)
+ caput('X11MA-OP-CM:z',z)
+ caput('X11MA-OP-CM:Rx',Rx)
+ caput('X11MA-OP-CM:Ry',Ry)
+ caput('X11MA-OP-CM:Rz',Rz)
+
+#check restored positions after restore
+ print "Restored positions: x = " +str(caget('X11MA-OP-CM:ox'))+ \
+ ", y = " +str(caget('X11MA-OP-CM:oy'))+ \
+ ", z = " +str(caget('X11MA-OP-CM:oz'))+ \
+ ", Rx = " +str(caget('X11MA-OP-CM:oRx'))+ \
+ ", Ry = " +str(caget('X11MA-OP-CM:oRy'))+ \
+ ", Rz = " +str(caget('X11MA-OP-CM:oRz'))+ \
+ ", baffle = " +str(caget('X11MA-OP2-CM:TRB.RBV'))
+ if(abs(caget('X11MA-OP-CM:ox')-x)>0.001):
+ print "X position not ok"
+ elif(abs(caget('X11MA-OP-CM:oy')-y)>0.001):
+ print "Y position not ok"
+ elif(abs(caget('X11MA-OP-CM:oz')-z)>0.001):
+ print "Z position not ok"
+ elif(abs(caget('X11MA-OP-CM:oRx')-Rx)>0.001):
+ print "Rx position not ok"
+ elif(abs(caget('X11MA-OP-CM:oRy')-Ry)>0.001):
+ print "Ry position not ok"
+ elif(abs(caget('X11MA-OP-CM:oRz')-Rz)>0.001):
+ print "Rz position not ok"
+ elif(abs(caget('X11MA-OP2-CM:TRB.RBV')-baf)>0.001):
+ print "baffle position not ok"
+ else:
+ print "All positions OK"
+
+ running = False
+ return 0
+ except:
+ print "Exception in init"
+ traceback.print_exc()
+ raise
+
+#Fork and join
+futures = fork(init,(countHS,("X11MA-OP2-CM:TRY",)), \
+ (countHS,("X11MA-OP2-CM:TRZ",)), \
+ (countHS,("X11MA-OP2-CM:ROX",)), \
+ (countHS,("X11MA-OP2-CM:ROY",)), \
+ (countHS,("X11MA-OP2-CM:ROZ",)), \
+ (countHS,("X11MA-OP2-CM:TRB",)) )
+ret = join(futures)
+
+#check home switch status after init
+homesw=True
+for i in range(1,5):
+ if(ret[i]!=1):
+ homesw=False
+print "Home switch status for all motors: %s" %("OK" if homesw == True else "Not OK")
+
+#final status report
+if(homesw==True and ret[0]==0):
+ print "init-CMU: ==> done. OK!"
+else:
+ print "init-CMU: ==> not done. NOT OK!"
+
diff --git a/script/beamline_init_old/init/InitExitSlit.py b/script/beamline_init_old/init/InitExitSlit.py
new file mode 100644
index 0000000..1cefcac
--- /dev/null
+++ b/script/beamline_init_old/init/InitExitSlit.py
@@ -0,0 +1,9 @@
+run("xrays_default")
+
+time.sleep(3)
+
+caput("X11MA-OP-SL:GO.PROC",1)
+time.sleep(30)
+exit_slit.write(20.0)
+
+print "Init Exit Slit OK."
\ No newline at end of file
diff --git a/script/beamline_init_old/init/InitFE.py b/script/beamline_init_old/init/InitFE.py
new file mode 100644
index 0000000..f63ebfd
--- /dev/null
+++ b/script/beamline_init_old/init/InitFE.py
@@ -0,0 +1,123 @@
+import time
+import traceback
+
+running = False
+counts = {}
+encoder_raw = {}
+
+
+def crossZero(encoder):
+ global counts
+ global encoder_raw
+ try:
+ time.sleep(1.0)
+ counts[encoder]=0
+ if caget(encoder+".RVAL") > 0:
+ encoder_raw[encoder]=1
+ elif caget(encoder+".RVAL") < 0:
+ encoder_raw[encoder]=-1
+ def on_change(value):
+ global counts
+ global encoder_raw
+ if (encoder_raw[encoder]==1 and value < 0):
+ counts[encoder]=counts[encoder]+1
+ encoder_raw[encoder]=-1
+ print "Zero on" , encoder, "crossed"
+ elif(encoder_raw[encoder]==-1 and value > 0):
+ counts[encoder]=counts[encoder]+1
+ encoder_raw[encoder]=1
+ print "Zero on" , encoder, "crossed"
+
+ #if int(value) == 0:
+ # print "Raw vlaue on" , encoder, "crossed", value
+ # counts[encoder]=counts[encoder]+1
+
+ with Channel(encoder+".RVAL", callback=on_change, monitored=True, name="test") as ch:
+ while(running==True):
+ time.sleep(0.1)
+ print "Encoder "+encoder +" crossed 0 "+ str(counts[encoder]) + " times"
+ return counts[encoder]
+ except:
+ print "Exception counting "+str(encoder)
+ traceback.print_exc()
+ raise
+
+def init():
+ try:
+ global running
+ running = True
+
+ print "startint FE slit initilization"
+ cenV = caget('X11MA-FE-SV:center')
+ cenH = caget('X11MA-FE-SH:center')
+ offV = caget('X11MA-FE-DSVER.A')
+ offH = caget('X11MA-FE-DSHOR.A')
+
+ print "Old motor positions: centerV = " +str(cenV)+ \
+ ", centerH = " +str(cenH)+ \
+ ", offset V = " +str(offV)+ \
+ ", offset H = " +str(offH)
+
+ print "Initializing UP motor."
+ caput('X11MA-FE-DSUP:II.PROC',1)
+ time.sleep(1.0)
+ cawait('X11MA-FE-SV1:TR1.DMOV', 1)
+ print "Initializing DOWN motor."
+ caput('X11MA-FE-DSDW:II.PROC',1)
+ time.sleep(1.0)
+ cawait('X11MA-FE-SV1:TR2.DMOV', 1)
+ print "Initializing RING motor."
+ caput('X11MA-FE-DSRI:II.PROC',1)
+ time.sleep(1.0)
+ cawait('X11MA-FE-SH1:TR1.DMOV', 1)
+ print "Initializing WALL motor."
+ caput('X11MA-FE-DSWA:II.PROC',1)
+ time.sleep(1.0)
+ cawait('X11MA-FE-SH1:TR2.DMOV', 1)
+
+ print "Setting offH and offV to 0."
+ caput('X11MA-FE-DSVER.A',0)
+ caput('X11MA-FE-DSHOR.A',0)
+
+ print "Checking encoder offset values."
+ if(abs(caget('X11MA-FE-SV1:EC1Off')+42683)>10):
+ print "Up position not ok"
+ elif(abs(caget('X11MA-FE-SV1:EC2Off')+41362)>10):
+ print "Down position not ok"
+ elif(abs(caget('X11MA-FE-SH1:EC1Off')+40782)>10):
+ print "Ring position not ok"
+ elif(abs(caget('X11MA-FE-SH1:EC2Off')+39548)>10):
+ print "Wall position not ok"
+ else:
+ print "All positions OK"
+
+ print "restoring Center and off values"
+ caput('X11MA-FE-SV:center',cenV)
+ caput('X11MA-FE-SH:center',cenH)
+ caput('X11MA-FE-DSVER.A',offV)
+ caput('X11MA-FE-DSHOR.A',offH)
+
+ running = False
+ return 0
+ except:
+ print "Exception in init"
+ traceback.print_exc()
+ raise
+
+#Fork and join
+futures = fork(init,(crossZero,("X11MA-FE-SV1:EC1",)), \
+ (crossZero,("X11MA-FE-SV1:EC2",)), \
+ (crossZero,("X11MA-FE-SH1:EC1",)), \
+ (crossZero,("X11MA-FE-SH1:EC2",)) )
+ret = join(futures)
+
+#check zero crossing status after init
+zerocr=True
+for i in range(1,4):
+ if(ret[i] != 2):
+ zerocr=False
+#final status report
+print "Zero crossing status for all motors: %s" %("OK" if zerocr == True else "Not OK")
+print "init FE-slits: ==> done. %s" % ("OK" if zerocr == True else "Not OK")
+
+
diff --git a/script/beamline_init_old/test.sh b/script/beamline_init_old/test.sh
new file mode 100644
index 0000000..fa783a3
--- /dev/null
+++ b/script/beamline_init_old/test.sh
@@ -0,0 +1,3 @@
+ls
+whoami
+echo "init-CMU: ==> done"
diff --git a/script/beamline_init/with_x-rays/01_FE_offsets.py b/script/beamline_init_old/with_x-rays/01_FE_offsets.py
similarity index 100%
rename from script/beamline_init/with_x-rays/01_FE_offsets.py
rename to script/beamline_init_old/with_x-rays/01_FE_offsets.py
diff --git a/script/beamline_init_old/with_x-rays/02_Eslit_offset.py b/script/beamline_init_old/with_x-rays/02_Eslit_offset.py
new file mode 100644
index 0000000..c929569
--- /dev/null
+++ b/script/beamline_init_old/with_x-rays/02_Eslit_offset.py
@@ -0,0 +1,28 @@
+import sys
+
+#seting parameters
+sensor = 'KEI11'
+if sensor == 'KEI10':
+ detector= keithley_1a
+ detector_range='X11MA-KEI10:RANGE'
+elif sensor == 'KEI11':
+ detector= keithley_2a
+ detector_range='X11MA-KEI11:RANGE'
+else:
+ print "Select a proper detector: KEI10 or KEI11."
+ sys.exit()
+
+caput(detector_range, 4) # 6 --> 200 nA
+exit_slit.move(30.0)
+speed = exit_slit.getSpeed()
+min_speed=exit_slit.getMinSpeed()
+exit_slit.setSpeed(min_speed)
+
+#scan Energy Slit
+time.sleep(1)
+run('beamline_init/with_x-rays/functions/SlitCalib.py',{"Slit":exit_slit, "Slit_offset":exit_slit_offset, "detector":detector, "start":30, "end":-20.0, "step_size":1.0, "final_pos":20.0})
+time.sleep(1)
+
+#resetting parameters
+caput(detector_range, 0) # 0--> AUTO
+exit_slit.setSpeed(speed)
diff --git a/script/beamline_init_old/with_x-rays/04_2D_FE_ID2_scan.py b/script/beamline_init_old/with_x-rays/04_2D_FE_ID2_scan.py
new file mode 100644
index 0000000..e30635f
--- /dev/null
+++ b/script/beamline_init_old/with_x-rays/04_2D_FE_ID2_scan.py
@@ -0,0 +1,19 @@
+START = -0.5
+END =1.0
+STEPS = 10
+
+class Line(ReadableArray):
+ def read(self):
+ r1 = cscan(fe_slit_V_ctr, (Keithley_1_raw), START, END , steps=STEPS, save=False, hidden=True)
+ return r1[Keithley_1_raw]
+
+ def getSize(self):
+ return STEPS+1
+
+ def getCalibration(self):
+ return ArrayCalibration((end-start)/STEPS,-0.5)
+
+line=Line()
+set_device_alias(line, "FE scan")
+
+lscan(fe_slit_H_ctr, line, -0.5, 1.0, 0.1, latency=1.0)
diff --git a/script/beamline_init_old/with_x-rays/04a_2D_FE_ID2_fast.py b/script/beamline_init_old/with_x-rays/04a_2D_FE_ID2_fast.py
new file mode 100644
index 0000000..b525826
--- /dev/null
+++ b/script/beamline_init_old/with_x-rays/04a_2D_FE_ID2_fast.py
@@ -0,0 +1,27 @@
+import sys
+
+#seting parameters
+sensor = KEI11
+if sensor == KEI10:
+ detector= Keithley_1_raw
+elif sensor == KEI11:
+ detector= Keithley_2_raw
+else:
+ print "Select a proper detector: KEI10 or KEI11."
+ sys.exit()
+
+#Hill Climbing Search
+fe_slit_V_ctr.move(0.13);
+fe_slit_H_ctr.move(1.48);
+r = hsearch([fe_slit_V_ctr, fe_slit_H_ctr], detector,[-0.5,-0.5], [1.0,2.0], [0.1, 0.1], [0.02, 0.02], 1, relative = False, maximum=True, latency = 1.0, title = "Hill Climbing")
+print "--------------- Hill Climbing Search -----------------"
+print r
+print r.print()
+print len(r.getRecords())
+
+#strategy = "Normal" # or "Boundary" or "FullNeighborhood"
+#r = bsearch([fe_slit_V_ctr, fe_slit_H_ctr], Keithley_1_raw, [-0.5,-0.5], [1.0,1.0], [0.1, 0.1], maximum=True, strategy = strategy, latency = 0.01, title = "Binary Search")
+#print "--------------- Binary Search -----------------"
+#print r
+#print r.print()
+#print len(r.getRecords())
\ No newline at end of file
diff --git a/script/beamline_init/with_x-rays/functions/SlitCalib.py b/script/beamline_init_old/with_x-rays/functions/SlitCalib.py
similarity index 100%
rename from script/beamline_init/with_x-rays/functions/SlitCalib.py
rename to script/beamline_init_old/with_x-rays/functions/SlitCalib.py
diff --git a/script/devices/diag.py b/script/devices/diag.py
index e213996..3105356 100644
--- a/script/devices/diag.py
+++ b/script/devices/diag.py
@@ -8,7 +8,9 @@ diag_channels_names = { \
#"cff value": "X11MA-PGM:rbkcff", \
"diffraction order": "X11MA-PGM:difforder0", \
#"exit slit size":"X11MA-OP2-SL:TRY.VAL", \
- "front end size":"X11MA-FE-DSAPER", \
+ #"front end size":"X11MA-FE-DSAPER", \
+ "front end size x":"X11MA-FE-SL1:SIZEX", \ #CHECK
+ "front end size y":"X11MA-FE-SL1:SIZEY", \ #CHECK
"status fast shutter":"X11MA-VME-ES1:FAST-SHTR", \
"girder x": "X11MA-HG:X1", \
"girder y": "X11MA-HG:Y1", \
@@ -23,12 +25,12 @@ diag_channels_names = { \
"CMU oRy": "X11MA-OP-CM:oRy", \
"CMU oRz": "X11MA-OP-CM:oRz", \
"CMU TRB": "X11MA-OP2-CM:TRB.RBV", \
- "RMU ox": "X11MA-OP-RMU:ox", \
- "RMU oy": "X11MA-OP-RMU:oy", \
- "RMU oz": "X11MA-OP-RMU:oz", \
- "RMU oRx": "X11MA-OP-RMU:oRx", \
- "RMU oRy": "X11MA-OP-RMU:oRy", \
- "RMU oRz": "X11MA-OP-RMU:oRz", \
+ "RMU ox": "X11MA-OP-RM2:ox", \
+ "RMU oy": "X11MA-OP-RM2:oy", \
+ "RMU oz": "X11MA-OP-RM2:oz", \
+ "RMU oRx": "X11MA-OP-RM2:oRx", \
+ "RMU oRy": "X11MA-OP-RM2:oRy", \
+ "RMU oRz": "X11MA-OP-RM2:oRz", \
#"mode": "X11PHS-E:OPT", \
#"id1 mode": "X11MA-ID1:MODE", \
#"id1 offset": "X11MA-ID1:ENERGY-OFFS", \
@@ -42,7 +44,7 @@ diag_channels_names = { \
#"id2 harmonic": "X11MA-ID2:HARMONIC", \
#"id2 gap": "X11MA-ID2-GAP:READ", \
#"id2 shift": "X11MA-ID2-SHIFT:READ", \
- "keithley 10 IO": "X11Keithley1-read", \
+ "keithley 10 IO": "X11MA-KEI10:READ", \ #X11Keithley1-read", CHECK!
#"ring current": "ARIDI-PCT:CURRENT", \
#"PEEM high voltage": "X11MA-ES1-PEEM:UMON", \
"PEEM leakage current": "X11MA-ES1-PEEM:IMON", \
@@ -53,15 +55,15 @@ diag_channels_names = { \
#"SW E-field value voltage": "X11MA-PC-SW:E-Field-V", \
#"SW E-field value current": "X11MA-PC-SW:E-Field-I", \
#"SW Resistence value resistence": "X11MA-PC-SW:Resistance", \
- "Cooling He flow meas": "X11MA-PC-BRONKHORST:PEEM-GET-MEASURE", \
- "Cooling He flow set": "X11MA-PC-BRONKHORST:PEEM-SET-SETPOINT", \
+ "Cooling He flow meas": "X11MA-CPCL-BRONKHORST:PEEM-GET-MEASURE", \
+ "Cooling He flow set": "X11MA-CPCL-BRONKHORST:PEEM-SET-SETPOINT", \
"Cooling Needle Valve": "X11MA-ES1-AO4:V", \
"FMU Ry": "X11MA-OP2-FM:TRY1.RBV", \
"FMU TrZ": "X11MA-OP2-FM:TRY4.RBV", \
}
eiger_diag_channels_names = { \
- "high voltage": "X11MA-ES1-SD1:cam1:HighVoltage_RBV", \
+ "high voltage": "X11MA-ES1-EIGER:cam1:HighVoltage_RBV", \
}
diag_channels = {}
@@ -84,24 +86,24 @@ for k in eiger_diag_channels_names.keys():
diag_devices = {
- "photon energy": energy_rbk, \
+ "photon energy": BML_energy_RBV, \
"grating number": Grating, \
"cff value": cff, \
"exit slit size": ES, \
- "mode": energy_opt, \
- "id1 mode": id1_mode, \
- "id1 offset": id1_offset, \
- "id1 alpha": id1_alpha, \
- "id1 harmonic": id1_harmonic, \
- "id1 gap": id1_gap, \
- "id1 shift": id1_shift, \
- "id2 mode": id2_mode, \
- "id2 offset": id2_offset, \
- "id2 alpha": id2_alpha, \
- "id2 harmonic": id2_harmonic, \
- "id2 gap": id2_gap, \
- "id2 shift": id2_shift, \
- "ring current": machine_cur, \
+ "mode": BML_energy_mode, \
+ #"id1 mode": id1_mode, \
+ #"id1 offset": id1_offset, \
+ #"id1 alpha": id1_alpha, \
+ #"id1 harmonic": id1_harmonic, \
+ #"id1 gap": id1_gap, \
+ #"id1 shift": id1_shift, \
+ #"id2 mode": id2_mode, \
+ #"id2 offset": id2_offset, \
+ #"id2 alpha": id2_alpha, \
+ #"id2 harmonic": id2_harmonic, \
+ #"id2 gap": id2_gap, \
+ #"id2 shift": id2_shift, \
+ "ring current": SR_current, \
"PEEM high voltage": microscope.high_voltage, \
"Tilt vertical": tilt_vertical, \
"Tilt horizontal": tilt_horizontal, \
diff --git a/script/devices/eiger.py b/script/devices/eiger.py
index 5446487..2da28ac 100644
--- a/script/devices/eiger.py
+++ b/script/devices/eiger.py
@@ -13,7 +13,7 @@ CONTINOUS_MODE_MIN_TIME = 4000
###############################################################################
# ROI Integration
###############################################################################
-
+EIGER_PREFIX = "X11MA-ES1-EIGER"
def start_eiger_ioc():
subprocess.call("/work/sls/bin/X_X11MA_EigerStart.sh")
@@ -242,7 +242,7 @@ def trigger_eiger(wait=True):
#eiger.waitNewImage(20000 + int(eiger.exposure * 1000))
def get_eiger_exposure_readback():
- return caget("X11MA-ES1-SD1:cam1:AcquireTime_RBV",'f')
+ return caget(EIGER_PREFIX + ":cam1:AcquireTime_RBV",'f')
def set_exposure_time(value, check = True, retries=5):
if value == eiger.getExposure():
@@ -269,7 +269,7 @@ def set_exposure_time(value, check = True, retries=5):
eiger.start()
def get_eiger_number_of_frames():
- return caget("X11MA-ES1-SD1:cam1:NumFrames_RBV",'i')
+ return caget(EIGER_PREFIX + ":cam1:NumFrames_RBV",'i')
def set_eiger_number_of_frames(value, check = True):
if value == get_eiger_number_of_frames():
@@ -278,7 +278,7 @@ def set_eiger_number_of_frames(value, check = True):
if started:
stop_eiger()
- caput("X11MA-ES1-SD1:cam1:NumFrames",value)
+ caput(EIGER_PREFIX + ":cam1:NumFrames",value)
if check:
readback = get_eiger_number_of_frames()
if value != readback:
@@ -358,14 +358,13 @@ eiger_averaging_number_of_samples=None
def apply_averaging_detector(value):
global eiger_averaging_number_of_samples
if value:
- caput("X11MA-ES1-SD1:Proc1:EnableCallbacks", True)
- caput("X11MA-ES1-SD1:Proc1:EnableFilter", True)
- caput("X11MA-ES1-SD1:Proc1:AutoResetFilter", 1)
- caput("X11MA-ES1-SD1:Proc1:FilterCallbacks", 1)
+ caput(EIGER_PREFIX + ":Proc1:EnableCallbacks", True)
+ caput(EIGER_PREFIX + ":Proc1:EnableFilter", True)
+ caput(EIGER_PREFIX + ":Proc1:FilterCallbacks", 1)
else:
- caput("X11MA-ES1-SD1:Proc1:EnableFilter", False)
- caput("X11MA-ES1-SD1:Proc1:NumFilter", 1)
- caput("X11MA-ES1-SD1:cam1:NumCycles", 1)
+ caput(EIGER_PREFIX + ":Proc1:EnableFilter", False)
+ caput(EIGER_PREFIX + ":Proc1:NumFilter", 1)
+ caput(EIGER_PREFIX + ":cam1:NumCycles", 1)
eiger_averaging_number_of_samples = None
@@ -373,16 +372,16 @@ def average_eiger_frames(samples, roi=None, wait_next=False, sleep=0, outliers_t
global eiger_averaging_number_of_samples #, chrono_eiger
sample = int(samples)
if is_averaging_detector():
- if caget("X11MA-ES1-SD1:Proc1:EnableFilter")!="Enable":
+ if caget(EIGER_PREFIX + ":Proc1:EnableFilter")!="Enable":
raise Excetion("Cannot average frames in Eiger: filter is disabled")
#chrono_eiger.waitTimeout(1000)
- caput("X11MA-ES1-SD1:Proc1:NumFilter", samples)
- caput("X11MA-ES1-SD1:cam1:NumCycles", samples)
+ caput(EIGER_PREFIX + ":Proc1:NumFilter", samples)
+ caput(EIGER_PREFIX + ":cam1:NumCycles", samples)
if samples != eiger_averaging_number_of_samples:
log ("Changed Eiger averaging number of samples: " + str(samples))
# TODO: if increasing number of samples next read returns quicly, as if using previous sample number
eiger_averaging_number_of_samples = samples
- caput("X11MA-ES1-SD1:Proc1:ResetFilter", 1)
+ caput(EIGER_PREFIX + ":Proc1:ResetFilter", 1)
chrono_eiger=Chrono()
return grab_frame(image, roi, wait_next, outliers_threshold, outliers_mask, retries, timeout)
else:
diff --git a/script/imaging/shifts.py b/script/imaging/shifts.py
index 151911c..b33aee8 100644
--- a/script/imaging/shifts.py
+++ b/script/imaging/shifts.py
@@ -39,8 +39,8 @@ def load_corr_stack(title="Corr", show=False):
return load_stack(title, file_list, show)
def instantiate_dynamic_class(name):
- if get_plugin_manager().getDynamicClass(name) is None:
- get_plugin_manager().loadInitializePlugin(name + ".java")
+ if get_extensions().getDynamicClass(name) is None:
+ get_extensions().loadInitializePlugin(name + ".java")
return Context.getClassByName(name).newInstance()
diff --git a/script/local.py b/script/local.py
index 4bd9642..56be175 100644
--- a/script/local.py
+++ b/script/local.py
@@ -46,6 +46,10 @@ TBT_MAG = "X11MA-LSCI632:MFIELD"
keithley_1a.setForcedRead(False)
keithley_2a.setForcedRead(False)
keithley_3a.setForcedRead(False)
+#sc = ChannelSettlingCondition("X11MA-UIND2:DONE",1)
+sc = ChannelSettlingCondition("X11PHS:alldone",1)
+ID2_mode.setSettlingCondition(sc)
+BML_energy.setSettlingCondition(sc)
def get_next_fid(folder, prefix):
@@ -239,7 +243,7 @@ def convert_file_full(input_file_name, output_file_name, pol = None):
normtey=repr( float(CADC2)/float(CADC1))
normdiode=repr(float(CADC3)/float(CADC1))
CADC5=repr(0.0)
- mcurr=repr(machine_cur.read())
+ mcurr=repr(SR_current.read())
fieldx=repr(field.read())
fieldz=repr(0.0)
temp=repr(Temp.read())
@@ -406,10 +410,33 @@ def beamline_auto(value):
for dev in ["eiger", "id", "chopper", "LEEM2000", "diag"]:
try:
+ print "Importing device: ", dev
run("devices/" + dev)
except:
log(sys.exc_info()[1], False)
-
+
+
+###################################################################################################
+# Utilities
+###################################################################################################
+utility_scripts = [
+ "beamline_alignment/01_beamline_functions",
+ "beamline_alignment/02_beamline_configuration",
+ "beamline_alignment/03_AU_scan",
+ #"beamline_alignment/04_XBPM1_scans.py",
+ "beamline_alignment/05_XBPM2_scans.py",
+ "beamline_alignment/06_CMU_FMU_scans.py",
+ "beamline_alignment/08_FE_slit_scans.py",
+ ]
+
+for utility_script in utility_scripts:
+ try:
+ print "Importing utility: ", utility_script
+ run(utility_script)
+ except:
+ log(sys.exc_info()[1], False)
+
+
###################################################################################################
#Beamline and Machine status
diff --git a/script/templates/EigerAbsSpec.py b/script/templates/EigerAbsSpec.py
index 91d95a5..66129bd 100644
--- a/script/templates/EigerAbsSpec.py
+++ b/script/templates/EigerAbsSpec.py
@@ -2,13 +2,13 @@
if (get_exec_pars().source == CommandSource.ui) and (get_exec_pars().script == "EigerAbsSpec") :
ROI = {"Region1": [10,5,20, 10], "Region2": [20,15,20, 10]}
SAVE_SPECTRUM = True
- SAVE_IMAGES = True
+ SAVE_IMAGES = False
WITH_I0 = True
SWITCH_POL = False
EXPOSURE = 1.0
- AVERAGE = 2
- NUMBER_SCANS =1
- RANGES = [[500.0, 1000.0, 100.0]]
+ AVERAGE = 1
+ NUMBER_SCANS =1
+ RANGES = [[600.0, 605.0, 1.0]]
DRIFT_CORRECTION = True
print "Starting AbsSpec: ",SAVE_SPECTRUM, SAVE_IMAGES, WITH_I0, SWITCH_POL, EXPOSURE, AVERAGE, NUMBER_SCANS, RANGES
@@ -18,6 +18,7 @@ calculated_shifts={}
if SWITCH_POL:
init_pol_switch("Normal")
+
log("ROIs: " + str(ROI))
@@ -29,9 +30,9 @@ start = time.time()
init_eiger(exposure=EXPOSURE)
-#set_exec_pars(path="{data}/{year}_{month}/{date}/{seq}%03d_AbsortionSpectrum", format="csv", layout="table")
-set_exec_pars(name="AbsortionSpectrum", format="csv", layout="table")
-tag= "AbsortionSpectrum_{seq}%03d_{count}%02d"
+#set_exec_pars(name="AbsortionSpectrum", format="csv", layout="table")
+tag = None #AbsortionSpectrum_{seq}%03d_{count}%02d"
+set_exec_pars(name="AbsortionSpectrum")
rois = create_roi_devices(ROI)
@@ -48,13 +49,14 @@ frames=[]
class SyncEnergy(Writable):
def write(self,pos):
if not get_dry_run():
- put_energy(pos)
+ #put_energy(pos)
+ BML_energy.move(pos)
else:
print "Energy=" + str(pos)
sync_energy=SyncEnergy()
set_device_alias(sync_energy, "Energy") #Set display name
-sensors = rois + [machine_cur]
+sensors = rois + [SR_current]
if WITH_I0:
sensors = sensors + [Keithley_1_raw]
@@ -63,19 +65,20 @@ if WITH_I0:
av=None
def grab_image(position, scan):
global av
- av = average_eiger_frames(AVERAGE, roi=None, wait_next=True)
-
+ av = average_eiger_frames(AVERAGE, roi=None, wait_next=True)
if SAVE_IMAGES:
- #Scan_Nr = (scan.recordIndex-1)/NUMBER_SCANS
- #filename = get_exec_pars().path + "/" + ("%02d" % Scan_Nr) + "/s" + "{seq}%03d" + "_" + ("%03d.tif" % scan.recordIndex)
- filename = get_exec_pars().path + "/" + str(scan.currentPass) + "/s" + "{seq}%03d" + "_" + ("%03d.tif" % scan.recordIndex)
- filename = Setup.expandPath(filename)
- print filename
+ #filename = get_exec_pars().path + "/" + str(scan.currentPass) + "/s" + "{seq}%03d" + "_" + ("%03d.tif" % scan.recordIndex)
+ #filename = Setup.expandPath(filename)
+ #print filename
metadata = get_diags() if SAVE_DIAGS else {}
- save_as_tiff(av, filename, metadata=metadata)
+ #save_as_tiff(av, filename, metadata=metadata)
+ FormatTIFF.setMetadata(metadata)
+
if DRIFT_CORRECTION and (calc_roi is not None):
global ref_image
- filename = get_exec_pars().path + "/" + str(scan.currentPass) + "_corr/cs" + "{seq}%03d" + "_" + ("%03d.tif" % scan.recordIndex)
+ #filename = get_exec_pars().path + "/" + str(scan.currentPass) + "_corr/cs" + "{seq}%03d" + "_" + ("%03d.tif" % scan.recordIndex)
+ scan_name = get_data_manager().getScanPath(scan)
+ filename = get_exec_pars().path + "/" + scan_name + "_corr_" + ("%04d.tiff" % (scan.recordIndex-1))
filename = Setup.expandPath(filename)
if ref_image is None:
ref_image = av
@@ -93,7 +96,8 @@ class Average(ReadableMatrix):
return eiger.dataMatrix.getHeight()
averager=Average()
set_device_alias(averager, "Image") #Set display name
-sensors.append(averager) #sensors.append(eiger.getDataMatrix())
+if SAVE_IMAGES:
+ sensors.append(averager) #sensors.append(eiger.getDataMatrix())
#Initialize vartiables
if not get_dry_run() and str(get_setting("AUTO_SWITCH_VALVE")).lower() == "true":
@@ -135,10 +139,11 @@ def after_pass(pass_number, scan):
if SWITCH_POL:
if pass_number1:
for i in range(len(rois)):
rois[i].parent.monitored = False # Remove listeners on the image
diff --git a/script/templates/LEEM_tilt_scan.py b/script/templates/LEEM_tilt_scan.py
index d5f9a08..44d6537 100644
--- a/script/templates/LEEM_tilt_scan.py
+++ b/script/templates/LEEM_tilt_scan.py
@@ -13,8 +13,8 @@ INIT_TILT = True # True - tilt must be manually set to 0,0 before the scan
if INIT_TILT:
init_tilt()
-try:
- ascan ( [tilt_horizontal, tilt_vertical], machine_cur, \
+try:
+ ascan ( [tilt_horizontal, tilt_vertical], SR_current, \
[RANGE_H[0], RANGE_V[0]], [RANGE_H[1], RANGE_V[1]], [float(STEP_H), float(STEP_V)], \
latency=SETTLING_TIME, zigzag=True, save=True)
finally:
diff --git a/script/test/Diagnostics.py b/script/test/Diagnostics.py
index 3deea16..f514801 100644
--- a/script/test/Diagnostics.py
+++ b/script/test/Diagnostics.py
@@ -59,7 +59,7 @@ diag_devices = {
"id2 offset": id2_offset, \
"id2 alpha": id2_alpha, \
"id2 harmonic": id2_harmonic, \
- "ring current": machine_cur, \
+ "ring current": SR_current, \
"ai1 current": ai1, \
}
diff --git a/script/test/LEEM_example_scans.py b/script/test/LEEM_example_scans.py
index 977b018..85b6aa7 100644
--- a/script/test/LEEM_example_scans.py
+++ b/script/test/LEEM_example_scans.py
@@ -24,7 +24,7 @@ tilt_horizontal.initialize()
roi_intensity = LeemRoiIntensity(550,420, 150, 150)
set_device_alias(image2.intensity, "CameraIntensity")
set_device_alias(roi_intensity, "ROI_Intensity")
-sensors = [machine_cur, image2.intensity, roi_intensity]
+sensors = [SR_current, image2.intensity, roi_intensity]
def before_read(pos,scan):
image2.update()
diff --git a/script/test/SimuAbsSpec.py b/script/test/SimuAbsSpec.py
index 59caca8..7a4d1c5 100644
--- a/script/test/SimuAbsSpec.py
+++ b/script/test/SimuAbsSpec.py
@@ -49,7 +49,7 @@ class SyncEnergy(Writable):
sync_energy=SyncEnergy()
set_device_alias(sync_energy, "Energy") #Set display name
-sensors = rois + [machine_cur]
+sensors = rois + [SR_current]
if WITH_I0:
sensors = rois + [keithley_1a]
diff --git a/script/test/test_ascii.py b/script/test/test_ascii.py
new file mode 100644
index 0000000..f4e20e9
--- /dev/null
+++ b/script/test/test_ascii.py
@@ -0,0 +1,38 @@
+def bml_display_current_settings(selected_components=None):
+ # Displays parameters for selected components.
+ # - Uses select_components() to choose components.
+ # - Prints each parameter with its value.
+ # - If a parameter value is missing or cannot be read, prints NaN.
+
+ # 1 Get the selected component
+ selection = select_components(selected_components)
+ if selection is None:
+ return # user cancelled or invalid input
+
+ # 2 Load the machine poarametrers JSON
+ try:
+ with open(BEAMLINE_PARAMETERS_FILE, "r") as f:
+ machine_parameters = json.load(f, object_pairs_hook=OrderedDict)
+ except:
+ print("Error loading machine_parameters.json")
+ return
+
+ # 3 Loop through the components and display their parameters
+ for comp in selection:
+ print("\nComponent: " + comp)
+ params = machine_parameters.get(comp, {})
+ if not params:
+ print(" No parameters found.")
+ continue
+
+ for key, param_info in params.items():
+
+ # param_info enthalt z.B. den read_cmd
+ read_cmd = param_info.get("read_cmd") # JSON muss fur jeden Parameter den entsprechenden Befehl enthalten
+
+ try:
+ display_value = caget(read_cmd)
+ print(key + " = " + str(display_value))
+ except:
+ display_value = "NaN"
+ # print(" " + key + ": " + display_value)
diff --git a/script/test/test_sound.py b/script/test/test_sound.py
new file mode 100644
index 0000000..fafb1b2
--- /dev/null
+++ b/script/test/test_sound.py
@@ -0,0 +1,10 @@
+import traceback
+def play_sound(name):
+ try:
+ Audio.playFile(File(Setup.expandPath("{home}/sounds/" + name + ".wav")), False)
+ except:
+ #TODO: sound does not work when logged as e-account
+ if not Sys.getUserName().startswith("e"):
+ log("Error playing sound " + name + ": " + str(sys.exc_info()[1]), False)
+
+play_sound("success")
\ No newline at end of file
diff --git a/stripchart/PEEM-Pt100.scd b/stripchart/PEEM-Pt100.scd
index 631b539..fc92ef1 100644
--- a/stripchart/PEEM-Pt100.scd
+++ b/stripchart/PEEM-Pt100.scd
@@ -1,12 +1,12 @@
[
- [ [ true, "X11MA-PC-ET7000:SW-K", "Channel", 1, 1, "0,0,204", null ],
- [ true, "X11MA-PC-BRONKHORST:PEEM-GET-MEASURE", "Channel", 1, 2, "0,204,0", null ] ],
+ [ [ true, "X11MA-CPCL-ET7000:SW-K1", "Channel", 1, 1, "0,0,204", null ],
+ [ true, "X11MA-CPCL-BRONKHORST:PEEM-GET-MEASURE", "Channel", 1, 2, "0,204,0", null ] ],
[ [ "1", null, null, null, null, null, null, null ],
[ "2", null, null, null, null, null, null, null ],
[ "3", null, null, null, null, null, null, null ],
[ "4", null, null, null, null, null, null, null ],
[ "5", null, null, null, null, null, null, null ] ],
[ [ ] ],
- [ [ "", 1000, 100 ],
+ [ [ "", 1000, 100, -1 ],
[ "255,255,255", "0,0,0" ] ]
]
\ No newline at end of file