Updated Absorption Spectrum scan

This commit is contained in:
gac-x11ma
2025-12-17 09:49:26 +01:00
parent 8ecd1f36c6
commit 8278eb87d8
148 changed files with 4562 additions and 1070 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -149,12 +149,12 @@
<Component class="ch.psi.pshell.swing.RegisterPanel" name="panelHeFlowSet">
<Properties>
<Property name="decimals" type="int" value="3"/>
<Property name="name" type="java.lang.String" value="X11MA-PC-BRONKHORST:PEEM-SET-SETPOINT" noResource="true"/>
<Property name="name" type="java.lang.String" value="X11MA-CPCL-BRONKHORST:PEEM-SET-SETPOINT" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelHeFlowGet">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-PC-BRONKHORST:PEEM-GET-MEASURE" noResource="true"/>
<Property name="name" type="java.lang.String" value="X11MA-CPCL-BRONKHORST:PEEM-GET-MEASURE" noResource="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">

View File

@@ -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");

View File

@@ -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)
cscan(girder_x, SR_current, 0.16, 0.18, 0.01)

View File

@@ -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
}
}
}

View File

@@ -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

View File

@@ -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')

View File

@@ -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)
#

View File

@@ -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)
#

View File

@@ -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)

View File

@@ -0,0 +1,5 @@
def correlated_transverse_shift(step):
BML_CMU_Z.moveRelAsync(step)
BML_FMU_TRX.moveRelAsync(-step)

View File

@@ -0,0 +1 @@
findrecord X11MA | grep AcquirePeriod_RBV | grep cam1

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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
#

View File

@@ -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

View File

@@ -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')

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

Some files were not shown because too many files have changed in this diff Show More