a rough patchwork
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
# TODO: JF settings regarding raw conversion, compression, etc.
|
# TODO: JF settings regarding raw conversion, compression, etc.
|
||||||
detectors = [
|
detectors = [
|
||||||
"JF16T03V01",
|
# "JF16T03V01",
|
||||||
]
|
]
|
||||||
|
|
||||||
camera_channels = [
|
camera_channels = [
|
||||||
|
522
channels.py
522
channels.py
@ -1,522 +0,0 @@
|
|||||||
# Channels to save at Cristallina endstation
|
|
||||||
|
|
||||||
##########################################################################################################
|
|
||||||
##########################################################################################################
|
|
||||||
##########################################################################################################
|
|
||||||
# BS channels
|
|
||||||
|
|
||||||
# TODO: JF settings regarding raw conversion, compression, etc.
|
|
||||||
detectors = [
|
|
||||||
"JF16T03V01",
|
|
||||||
]
|
|
||||||
|
|
||||||
camera_channels = [
|
|
||||||
# "SARES30-CAMS156-PCO1:FPICTURE", # PCO edge camera for the wavefront analysis (from Alvra)
|
|
||||||
# "SARES30-CAMS156-SMX-OAV:FPICTURE", # SwissMX OAV camera picture
|
|
||||||
# "SARES30-CAMS156-XE:FPICTURE", # X-ray eye
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Machine gas intensity monitor
|
|
||||||
channels_gas_monitor = [
|
|
||||||
"SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-AVG",
|
|
||||||
# "SARFE10-PBPG050:SLOW-X",
|
|
||||||
# "SARFE10-PBPG050:SLOW-Y",
|
|
||||||
"SARFE10-PBIG050-EVR0:CALCI", # good for correlations with total beam intensity
|
|
||||||
"SARFE10-PBPG050:HAMP-INTENSITY-CAL",
|
|
||||||
]
|
|
||||||
|
|
||||||
######################
|
|
||||||
# PBPS053
|
|
||||||
channels_PBPS053 = [
|
|
||||||
"SARFE10-PBPS053:INTENSITY",
|
|
||||||
"SARFE10-PBPS053:XPOS",
|
|
||||||
"SARFE10-PBPS053:YPOS",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# PSSS059
|
|
||||||
channels_PSSS059=[
|
|
||||||
"SARFE10-PSSS059:FPICTURE",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_X",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_Y",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_CENTER",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_COM",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_FWHM",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_STD",
|
|
||||||
# "SARFE10-PSSS059:FIT_ERR",
|
|
||||||
"SARFE10-PSSS059:processing_parameters",
|
|
||||||
# "SARFE10-PSSS059:SPECTRUM_AVG_CENTER",
|
|
||||||
# "SARFE10-PSSS059:SPECTRUM_AVG_FWHM",
|
|
||||||
# "SARFE10-PSSS059:SPECTRUM_AVG_Y",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################################
|
|
||||||
# Beam position monitor PBPS113
|
|
||||||
channels_PBPS113 = [
|
|
||||||
"SAROP31-PBPS113:INTENSITY",
|
|
||||||
"SAROP31-PBPS113:INTENSITY_UJ",
|
|
||||||
"SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD0",
|
|
||||||
"SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD1",
|
|
||||||
"SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD2",
|
|
||||||
"SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD3",
|
|
||||||
# "SAROP31-PBPS113:Lnk9Ch0-PP_VAL_PD4",
|
|
||||||
"SAROP31-PBPS113:XPOS",
|
|
||||||
"SAROP31-PBPS113:YPOS",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Profile monitor PPRM113 (from _proc process)
|
|
||||||
channels_PPRM113 = [
|
|
||||||
"SAROP31-PPRM113:intensity",
|
|
||||||
"SAROP31-PPRM113:x_center_of_mass",
|
|
||||||
"SAROP31-PPRM113:x_fit_amplitude",
|
|
||||||
"SAROP31-PPRM113:x_fit_mean",
|
|
||||||
"SAROP31-PPRM113:x_fit_offset",
|
|
||||||
"SAROP31-PPRM113:x_fit_standard_deviation",
|
|
||||||
"SAROP31-PPRM113:x_fwhm",
|
|
||||||
"SAROP31-PPRM113:x_profile",
|
|
||||||
"SAROP31-PPRM113:x_rms",
|
|
||||||
"SAROP31-PPRM113:y_center_of_mass",
|
|
||||||
"SAROP31-PPRM113:y_fit_amplitude",
|
|
||||||
"SAROP31-PPRM113:y_fit_mean",
|
|
||||||
"SAROP31-PPRM113:y_fit_offset",
|
|
||||||
"SAROP31-PPRM113:y_fit_standard_deviation",
|
|
||||||
"SAROP31-PPRM113:y_fwhm",
|
|
||||||
"SAROP31-PPRM113:y_profile",
|
|
||||||
"SAROP31-PPRM113:y_rms",
|
|
||||||
# "SAROP31-PPRM113:FPICTURE", # full pictures for debugging purposes at the moment, from _ib process
|
|
||||||
]
|
|
||||||
|
|
||||||
###########################
|
|
||||||
# Beam position monitor PBPS149
|
|
||||||
channel_PBPS149 = [
|
|
||||||
"SAROP31-PBPS149:INTENSITY",
|
|
||||||
"SAROP31-PBPS149:INTENSITY_UJ",
|
|
||||||
"SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD0",
|
|
||||||
"SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD1",
|
|
||||||
"SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD2",
|
|
||||||
"SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD3",
|
|
||||||
# "SAROP31-PBPS149:Lnk9Ch0-PP_VAL_PD4",
|
|
||||||
"SAROP31-PBPS149:XPOS",
|
|
||||||
"SAROP31-PBPS149:YPOS",
|
|
||||||
]
|
|
||||||
|
|
||||||
#######################
|
|
||||||
# Profile monitor PPRM150 (from _proc process)
|
|
||||||
channels_PPRM150 = [
|
|
||||||
"SAROP31-PPRM150:intensity",
|
|
||||||
"SAROP31-PPRM150:x_center_of_mass",
|
|
||||||
"SAROP31-PPRM150:x_fit_amplitude",
|
|
||||||
"SAROP31-PPRM150:x_fit_mean",
|
|
||||||
"SAROP31-PPRM150:x_fit_offset",
|
|
||||||
"SAROP31-PPRM150:x_fit_standard_deviation",
|
|
||||||
"SAROP31-PPRM150:x_fwhm",
|
|
||||||
"SAROP31-PPRM150:x_profile",
|
|
||||||
"SAROP31-PPRM150:x_rms",
|
|
||||||
"SAROP31-PPRM150:y_center_of_mass",
|
|
||||||
"SAROP31-PPRM150:y_fit_amplitude",
|
|
||||||
"SAROP31-PPRM150:y_fit_mean",
|
|
||||||
"SAROP31-PPRM150:y_fit_offset",
|
|
||||||
"SAROP31-PPRM150:y_fit_standard_deviation",
|
|
||||||
"SAROP31-PPRM150:y_fwhm",
|
|
||||||
"SAROP31-PPRM150:y_profile",
|
|
||||||
"SAROP31-PPRM150:y_rms",
|
|
||||||
# "SAROP31-PPRM150:FPICTURE", # full pictures for debugging purposes at the moment, from _ib process
|
|
||||||
]
|
|
||||||
|
|
||||||
#######################
|
|
||||||
# Cristallina event reciever
|
|
||||||
channels_EVR = [
|
|
||||||
'SAR-CVME-TIFALL6:EvtSet',
|
|
||||||
]
|
|
||||||
|
|
||||||
#######################
|
|
||||||
# Digitizer
|
|
||||||
channels_digitizer =[
|
|
||||||
"SARES30-LTIM01-EVR0:DUMMY_PV1_NBS",
|
|
||||||
"SARES30-LTIM01-EVR0:DUMMY_PV2_NBS",
|
|
||||||
"SARES30-LTIM01-EVR0:DUMMY_PV3_NBS",
|
|
||||||
"SARES30-LTIM01-EVR0:DUMMY_PV4_NBS",
|
|
||||||
"SARES30-LSCP1-FNS:CH0:VAL_GET", # Signal-Background
|
|
||||||
"SARES30-LSCP1-CRISTA1:CH0:1", # Waveform signal
|
|
||||||
"SARES30-LSCP1-CRISTA1:CH2:1", # Waveform trigger
|
|
||||||
"SARES30-LTIM01-EVR0:CALCI", # Calculated intensity
|
|
||||||
]
|
|
||||||
|
|
||||||
#######################
|
|
||||||
# Other BS channels that we sometimes use
|
|
||||||
channels_other = [
|
|
||||||
]
|
|
||||||
|
|
||||||
bs_channels = (
|
|
||||||
camera_channels
|
|
||||||
+ channels_gas_monitor
|
|
||||||
+ channels_PBPS053
|
|
||||||
+ channels_PBPS053
|
|
||||||
+ channels_PSSS059
|
|
||||||
+ channels_PBPS113
|
|
||||||
+ channels_PPRM113
|
|
||||||
+ channel_PBPS149
|
|
||||||
+ channels_PPRM150
|
|
||||||
+ channels_EVR
|
|
||||||
# + channels_digitizer
|
|
||||||
# + channels_other
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################################################
|
|
||||||
##########################################################################################################
|
|
||||||
##########################################################################################################
|
|
||||||
# Epics PVS
|
|
||||||
|
|
||||||
# Compression, charge settings
|
|
||||||
#######################
|
|
||||||
# Machine
|
|
||||||
pvs_machine = [
|
|
||||||
"SARCL02-MBND100:P-READ", # Predicted bunch energy
|
|
||||||
"SARUN:FELPHOTENE.VAL", # Predicted photon energy from machine settings
|
|
||||||
"SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-AVG.VAL" # Average pulse energy from the gas detector
|
|
||||||
]
|
|
||||||
|
|
||||||
#######################
|
|
||||||
# Undulator gap
|
|
||||||
pvs_undulator =[
|
|
||||||
"SARUN03-UIND030:K_SET.VAL",
|
|
||||||
"SARUN04-UIND030:K_SET.VAL",
|
|
||||||
"SARUN05-UIND030:K_SET.VAL",
|
|
||||||
"SARUN06-UIND030:K_SET.VAL",
|
|
||||||
"SARUN07-UIND030:K_SET.VAL",
|
|
||||||
"SARUN08-UIND030:K_SET.VAL",
|
|
||||||
"SARUN09-UIND030:K_SET.VAL",
|
|
||||||
"SARUN10-UIND030:K_SET.VAL",
|
|
||||||
"SARUN11-UIND030:K_SET.VAL",
|
|
||||||
"SARUN12-UIND030:K_SET.VAL",
|
|
||||||
"SARUN13-UIND030:K_SET.VAL",
|
|
||||||
"SARUN14-UIND030:K_SET.VAL",
|
|
||||||
"SARUN15-UIND030:K_SET.VAL",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Machine gas intensity monitor
|
|
||||||
pvs_gas_monitor = [
|
|
||||||
"SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-US",
|
|
||||||
"SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-DS",
|
|
||||||
]
|
|
||||||
|
|
||||||
#####################
|
|
||||||
# Slits OAPU044
|
|
||||||
pvs_OAPU044=[
|
|
||||||
"SARFE10-OAPU044:MOTOR_X",
|
|
||||||
"SARFE10-OAPU044:MOTOR_Y",
|
|
||||||
"SARFE10-OAPU044:MOTOR_W",
|
|
||||||
"SARFE10-OAPU044:MOTOR_H",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Beam position monitor PBPS053
|
|
||||||
pvs_PBPS053 = [
|
|
||||||
"SARFE10-PBPS053:MOTOR_X1",
|
|
||||||
"SARFE10-PBPS053:MOTOR_X2",
|
|
||||||
"SARFE10-PBPS053:MOTOR_PROBE",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Upstream attenuator OATT053
|
|
||||||
pvs_OATT053=[
|
|
||||||
"SARFE10-OATT053:MOTOR_1",
|
|
||||||
"SARFE10-OATT053:MOTOR_1.RBV",
|
|
||||||
"SARFE10-OATT053:MOTOR_2",
|
|
||||||
"SARFE10-OATT053:MOTOR_2.RBV",
|
|
||||||
"SARFE10-OATT053:MOTOR_3",
|
|
||||||
"SARFE10-OATT053:MOTOR_3.RBV",
|
|
||||||
"SARFE10-OATT053:MOTOR_4",
|
|
||||||
"SARFE10-OATT053:MOTOR_4.RBV",
|
|
||||||
"SARFE10-OATT053:MOTOR_5",
|
|
||||||
"SARFE10-OATT053:MOTOR_5.RBV",
|
|
||||||
"SARFE10-OATT053:MOTOR_6",
|
|
||||||
"SARFE10-OATT053:MOTOR_6.RBV",
|
|
||||||
"SARFE10-OATT053:ENERGY",
|
|
||||||
"SARFE10-OATT053:TRANS_SP",
|
|
||||||
"SARFE10-OATT053:TRANS_RB",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Beam profile monitor PPRM053
|
|
||||||
pvs_PPRM053 = [
|
|
||||||
"SARFE10-PPRM053:MOTOR_PROBE.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Single shot spectrometer PSS059
|
|
||||||
pvs_PSSS059 = [
|
|
||||||
# "SARFE10-PSSS059:FPICTURE", # full pictures only when really needed
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_X",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_Y",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_CENTER",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_COM",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_FWHM",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_STD",
|
|
||||||
"SARFE10-PSSS059:FIT_ERR",
|
|
||||||
"SARFE10-PSSS059:processing_parameters",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_AVG_CENTER,"
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_AVG_FWHM",
|
|
||||||
"SARFE10-PSSS059:SPECTRUM_AVG_Y",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# First Cristallina horizontal offset mirror OOMH067
|
|
||||||
pvs_OOMH067 = [
|
|
||||||
"SAROP31-OOMH067:W_X.RBV",
|
|
||||||
"SAROP31-OOMH067:W_Y.RBV",
|
|
||||||
"SAROP31-OOMH067:W_RX.RBV",
|
|
||||||
"SAROP31-OOMH067:W_RY.RBV",
|
|
||||||
"SAROP31-OOMH067:W_RZ.RBV",
|
|
||||||
"SAROP31-OOMH067:BU.RBV",
|
|
||||||
"SAROP31-OOMH067:BD.RBV",
|
|
||||||
"SAROP31-OOMH067:VS1.RBV",
|
|
||||||
"SAROP31-OOMH067:VS2.RBV",
|
|
||||||
"SAROP31-OOMH067:VS3.RBV",
|
|
||||||
"SAROP31-OOMH067:TX.RBV",
|
|
||||||
"SAROP31-OOMH067:RY.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Beam screen between the first two horizontal mirrors PSCR068
|
|
||||||
pvs_PSCR068 = [
|
|
||||||
"SAROP31-PSCR068:MOTOR_PROBE.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Second Cristallina horizontal offset mirror OOMH084
|
|
||||||
pvs_OOMH084 = [
|
|
||||||
"SAROP31-OOMH084:W_X.RBV",
|
|
||||||
"SAROP31-OOMH084:W_Y.RBV",
|
|
||||||
"SAROP31-OOMH084:W_RX.RBV",
|
|
||||||
"SAROP31-OOMH084:W_RY.RBV",
|
|
||||||
"SAROP31-OOMH084:W_RZ.RBV",
|
|
||||||
"SAROP31-OOMH084:BU.RBV",
|
|
||||||
"SAROP31-OOMH084:BD.RBV",
|
|
||||||
"SAROP31-OOMH084:VS1.RBV",
|
|
||||||
"SAROP31-OOMH084:VS2.RBV",
|
|
||||||
"SAROP31-OOMH084:VS3.RBV",
|
|
||||||
"SAROP31-OOMH084:TX.RBV",
|
|
||||||
"SAROP31-OOMH084:RY.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Beam profile monitor PPRM085
|
|
||||||
pvs_PPRM085 = [
|
|
||||||
"SAROP31-PPRM085:MOTOR_PROBE.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Slits OAPU107
|
|
||||||
pvs_OAPU107 = [
|
|
||||||
"SAROP31-OAPU107:MOTOR_X.VAL",
|
|
||||||
"SAROP31-OAPU107:MOTOR_X.RBV",
|
|
||||||
"SAROP31-OAPU107:MOTOR_Y.VAL",
|
|
||||||
"SAROP31-OAPU107:MOTOR_Y.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
## Beam position and intensity monitor PBPS113
|
|
||||||
pvs_PBPS113 = [
|
|
||||||
"SAROP31-PBPS113:MOTOR_X1.RBV",
|
|
||||||
"SAROP31-PBPS113:MOTOR_Y1.RBV",
|
|
||||||
"SAROP31-PBPS113:MOTOR_PROBE.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Beam profile monitor PPRM113
|
|
||||||
pvs_PPRM113 = [
|
|
||||||
"SAROP31-PPRM113:MOTOR_PROBE.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Alignment laser mirror OLAS147
|
|
||||||
pvs_OLAS147 = [
|
|
||||||
"SAROP31-OLAS147:MOTOR_1.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Slits OAPU149
|
|
||||||
pvs_OAPU149 = [
|
|
||||||
"SAROP31-OAPU149:MOTOR_X.VAL",
|
|
||||||
"SAROP31-OAPU149:MOTOR_X.RBV",
|
|
||||||
"SAROP31-OAPU149:MOTOR_Y.VAL",
|
|
||||||
"SAROP31-OAPU149:MOTOR_Y.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Beam position and intensity monitor PBPS149
|
|
||||||
pvs_PBPS149 = [
|
|
||||||
"SAROP31-PBPS149:MOTOR_X1.RBV",
|
|
||||||
"SAROP31-PBPS149:MOTOR_Y1.RBV",
|
|
||||||
"SAROP31-PBPS149:MOTOR_PROBE.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
###################
|
|
||||||
# Beam profile monitor PPRM150
|
|
||||||
pvs_PPRM150 = [
|
|
||||||
"SAROP31-PPRM150:MOTOR_PROBE.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Attenuators OATA150
|
|
||||||
pvs_OATA150 = [
|
|
||||||
"SAROP31-OATA150:MOTOR_1.RBV",
|
|
||||||
"SAROP31-OATA150:MOTOR_2.RBV",
|
|
||||||
"SAROP31-OATA150:MOTOR_3.RBV",
|
|
||||||
"SAROP31-OATA150:MOTOR_4.RBV",
|
|
||||||
"SAROP31-OATA150:MOTOR_5.RBV",
|
|
||||||
"SAROP31-OATA150:MOTOR_6.RBV",
|
|
||||||
"SAROP31-OATA150:TRANS_SP",
|
|
||||||
"SAROP31-OATA150:TRANS_RB",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Pulse picker OPPI151
|
|
||||||
pvs_OPPI151 = [
|
|
||||||
"SAROP31-OPPI151:MOTOR_X.RBV",
|
|
||||||
"SAROP31-OPPI151:MOTOR_Y.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
## Horizontal offset mirror ODMV152
|
|
||||||
pvs_ODMV152 = [
|
|
||||||
"SAROP31-ODMV152:W_X.RBV",
|
|
||||||
"SAROP31-ODMV152:W_Y.RBV",
|
|
||||||
"SAROP31-ODMV152:W_RX.RBV",
|
|
||||||
"SAROP31-ODMV152:W_RZ.RBV",
|
|
||||||
"SAROP31-ODMV152:BU.RBV",
|
|
||||||
"SAROP31-ODMV152:BD.RBV",
|
|
||||||
"SAROP31-ODMV152:VS1.RBV",
|
|
||||||
"SAROP31-ODMV152:VS2.RBV",
|
|
||||||
"SAROP31-ODMV152:VS3.RBV",
|
|
||||||
"SAROP31-ODMV152:TX.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
#######################
|
|
||||||
# from _proc process
|
|
||||||
pvs_PPRM150 = [
|
|
||||||
"SAROP31-PPRM150:intensity",
|
|
||||||
"SAROP31-PPRM150:x_center_of_mass",
|
|
||||||
"SAROP31-PPRM150:x_fit_amplitude",
|
|
||||||
"SAROP31-PPRM150:x_fit_mean",
|
|
||||||
"SAROP31-PPRM150:x_fit_offset",
|
|
||||||
"SAROP31-PPRM150:x_fit_standard_deviation",
|
|
||||||
"SAROP31-PPRM150:x_fwhm",
|
|
||||||
"SAROP31-PPRM150:x_profile",
|
|
||||||
"SAROP31-PPRM150:x_rms",
|
|
||||||
"SAROP31-PPRM150:y_center_of_mass",
|
|
||||||
"SAROP31-PPRM150:y_fit_amplitude",
|
|
||||||
"SAROP31-PPRM150:y_fit_mean",
|
|
||||||
"SAROP31-PPRM150:y_fit_offset",
|
|
||||||
"SAROP31-PPRM150:y_fit_standard_deviation",
|
|
||||||
"SAROP31-PPRM150:y_fwhm",
|
|
||||||
"SAROP31-PPRM150:y_profile",
|
|
||||||
"SAROP31-PPRM150:y_rms",
|
|
||||||
# "SAROP31-PPRM150:FPICTURE", # full pictures for debugging purposes at the moment, from _ib process
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
###########################
|
|
||||||
# Vertical KB mirror OKBV153
|
|
||||||
pvs_OKBV153 = [
|
|
||||||
"SAROP31-OKBV153:W_X.RBV",
|
|
||||||
"SAROP31-OKBV153:W_Y.RBV",
|
|
||||||
"SAROP31-OKBV153:W_RX.RBV",
|
|
||||||
"SAROP31-OKBV153:W_RY.RBV",
|
|
||||||
"SAROP31-OKBV153:W_RZ.RBV",
|
|
||||||
"SAROP31-OKBV153:BU.RBV",
|
|
||||||
"SAROP31-OKBV153:BD.RBV",
|
|
||||||
"SAROP31-OKBV153:TY1.RBV",
|
|
||||||
"SAROP31-OKBV153:TY2.RBV",
|
|
||||||
"SAROP31-OKBV153:TY3.RBV",
|
|
||||||
"SAROP31-OKBV153:TX1.RBV",
|
|
||||||
"SAROP31-OKBV153:TX2.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Screen between the KB's PSCD153
|
|
||||||
# Not implemented yet
|
|
||||||
pvs_PSCD153 = [
|
|
||||||
# "SAROP31-PSCD153"
|
|
||||||
]
|
|
||||||
|
|
||||||
###########################
|
|
||||||
# Horizontal KB mirror OKBH154
|
|
||||||
pvs_OKBH154 = [
|
|
||||||
"SAROP31-OKBH154:W_X.RBV",
|
|
||||||
"SAROP31-OKBH154:W_Y.RBV",
|
|
||||||
"SAROP31-OKBH154:W_RX.RBV",
|
|
||||||
"SAROP31-OKBH154:W_RY.RBV",
|
|
||||||
"SAROP31-OKBH154:W_RZ.RBV",
|
|
||||||
"SAROP31-OKBH154:BU.RBV",
|
|
||||||
"SAROP31-OKBH154:BD.RBV",
|
|
||||||
"SAROP31-OKBH154:TY1.RBV",
|
|
||||||
"SAROP31-OKBH154:TY2.RBV",
|
|
||||||
"SAROP31-OKBH154:TY3.RBV",
|
|
||||||
"SAROP31-OKBH154:TX2.RBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Standa motors (mainly used with the X-ray eye)
|
|
||||||
pvs_standa = [
|
|
||||||
"SARES30MOBI1:MOT_1",
|
|
||||||
"SARES30MOBI1:MOT_2",
|
|
||||||
"SARES30MOBI1:MOT_3",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
####################
|
|
||||||
# Attocube motors
|
|
||||||
pvs_attocube=[
|
|
||||||
"SARES30-ATTOCUBE:A0-POS",
|
|
||||||
"SARES30-ATTOCUBE:A1-POS",
|
|
||||||
]
|
|
||||||
|
|
||||||
###############################
|
|
||||||
# Smaract stages from Juraj
|
|
||||||
pvs_smaract = [
|
|
||||||
"SARES30-XSMA156:X:MOTRBV",
|
|
||||||
"SARES30-XSMA156:Y:MOTRBV",
|
|
||||||
"SARES30-XSMA156:Z:MOTRBV",
|
|
||||||
"SARES30-XSMA156:Ry:MOTRBV",
|
|
||||||
"SARES30-XSMA156:Rx:MOTRBV",
|
|
||||||
"SARES30-XSMA156:Rz:MOTRBV",
|
|
||||||
]
|
|
||||||
|
|
||||||
pvs = (
|
|
||||||
pvs_machine
|
|
||||||
+ pvs_undulator
|
|
||||||
+ pvs_gas_monitor
|
|
||||||
+ pvs_OAPU044
|
|
||||||
+ pvs_PBPS053
|
|
||||||
+ pvs_OATT053
|
|
||||||
+ pvs_PPRM053
|
|
||||||
+ pvs_PSSS059
|
|
||||||
+ pvs_OOMH067
|
|
||||||
+ pvs_PSCR068
|
|
||||||
+ pvs_OOMH084
|
|
||||||
+ pvs_PPRM085
|
|
||||||
+ pvs_OAPU107
|
|
||||||
+ pvs_PBPS113
|
|
||||||
+ pvs_PPRM113
|
|
||||||
+ pvs_OLAS147
|
|
||||||
+ pvs_OAPU149
|
|
||||||
+ pvs_PBPS149
|
|
||||||
+ pvs_PPRM150
|
|
||||||
+ pvs_OATA150
|
|
||||||
+ pvs_OPPI151
|
|
||||||
+ pvs_ODMV152
|
|
||||||
+ pvs_PPRM150
|
|
||||||
+ pvs_OKBV153
|
|
||||||
+ pvs_PSCD153
|
|
||||||
+ pvs_OKBH154
|
|
||||||
+ pvs_standa
|
|
||||||
# + pvs_attocube
|
|
||||||
# + pvs_smaract
|
|
||||||
)
|
|
42
client.py
Normal file
42
client.py
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import requests
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
class Client:
|
||||||
|
|
||||||
|
def __init__(self, host="saresc-vcons-02", port=9090):
|
||||||
|
self.host = host
|
||||||
|
self.port = port
|
||||||
|
self.session = requests.Session()
|
||||||
|
|
||||||
|
def add_row(self, **kwargs):
|
||||||
|
addr = self._make_addr()
|
||||||
|
resp = self.session.patch(addr, json=kwargs)
|
||||||
|
return ResponseWrapper(resp)
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
addr = self._make_addr()
|
||||||
|
resp = self.session.get(addr)
|
||||||
|
return ResponseWrapper(resp)
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
addr = self._make_addr()
|
||||||
|
resp = self.session.delete(addr)
|
||||||
|
return ResponseWrapper(resp)
|
||||||
|
|
||||||
|
def _make_addr(self):
|
||||||
|
return f"http://{self.host}:{self.port}/"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ResponseWrapper:
|
||||||
|
|
||||||
|
def __init__(self, resp):
|
||||||
|
resp.raise_for_status()
|
||||||
|
self.resp = resp
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return self.resp.text
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -133,7 +133,8 @@ instrument = "cristallina"
|
|||||||
# pgroup = "p20519" # beamline commissioning 2
|
# pgroup = "p20519" # beamline commissioning 2
|
||||||
# pgroup = "p20840" # Cr beamline commisioning (Jan-Feb 2023)
|
# pgroup = "p20840" # Cr beamline commisioning (Jan-Feb 2023)
|
||||||
# pgroup = "p20841" # CrQ PMS commisioning 2 (Jan 2023)
|
# pgroup = "p20841" # CrQ PMS commisioning 2 (Jan 2023)
|
||||||
pgroup = "p20993" # CrQ commissoing DilSc2 (March 2023)
|
# pgroup = "p20993" # CrQ commissoing DilSc2 (March 2023)
|
||||||
|
pgroup = "p21147" # SAXS
|
||||||
|
|
||||||
# pgroup = "p19150" # Scratch
|
# pgroup = "p19150" # Scratch
|
||||||
# pgroup = "p19152" # Scratch
|
# pgroup = "p19152" # Scratch
|
||||||
@ -164,10 +165,12 @@ logger.info("Loading finished.")
|
|||||||
|
|
||||||
def simple_acquisition(filename):
|
def simple_acquisition(filename):
|
||||||
task = daq.acquire(filename)
|
task = daq.acquire(filename)
|
||||||
fname = task.filenames[0]
|
#fname = task.filenames[0]
|
||||||
pattern = r"run([0-9]{4})"
|
#pattern = r"run([0-9]{4})"
|
||||||
match = re.search(pattern, fname)
|
#match = re.search(pattern, fname)
|
||||||
run_number = int(match.groups()[0])
|
#run_number = int(match.groups()[0])
|
||||||
|
|
||||||
stand_client.add_row(run_number=run_number)
|
#stand_client.add_row(run_number=run_number)
|
||||||
|
|
||||||
|
stand_client.add_row(run_number=-4,step=0, smaract_x=smaract_mini_XYZ.x.get_current_value(),smaract_y=smaract_mini_XYZ.y.get_current_value(),smaract_z=smaract_mini_XYZ.z.get_current_value()
|
||||||
|
|
||||||
|
Binary file not shown.
18
measurement_scripts/DilSc_frappy_client.py
Normal file
18
measurement_scripts/DilSc_frappy_client.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import sys
|
||||||
|
sys.path.append('/sf/cristallina/applications/frappy')
|
||||||
|
from frappy.client import SecopClient
|
||||||
|
from frappy.core import BUSY, IDLE, ERROR, Parameter, Command, Done
|
||||||
|
|
||||||
|
# Connect to the dilsc
|
||||||
|
client = SecopClient('dilsc:5000')
|
||||||
|
client.connect()
|
||||||
|
|
||||||
|
def list_identifiers(client=client):
|
||||||
|
return client.identifier
|
||||||
|
|
||||||
|
# Set lower ramp rate in z-axis
|
||||||
|
client.setParameter('mfz','ramp',0.025)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def change_temperature(value,temp='T_pucksensor',client=client):
|
190
measurement_scripts/hole_drilling.py
Normal file
190
measurement_scripts/hole_drilling.py
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
from datetime import datetime
|
||||||
|
from time import sleep, time
|
||||||
|
from tracemalloc import start
|
||||||
|
import numpy as np
|
||||||
|
from collections import defaultdict
|
||||||
|
#from epics import PV
|
||||||
|
#from slic.utils import nice_arange
|
||||||
|
#from slic.devices.general.motor import Motor
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import epics
|
||||||
|
from cristallina import Newport_large, attocube, attenuator
|
||||||
|
from smaract_device_def import smaract_mini_XYZ
|
||||||
|
from slic.devices.xoptics.aramis_attenuator import Attenuator
|
||||||
|
from tqdm import tqdm
|
||||||
|
from standa import standa
|
||||||
|
|
||||||
|
from slic.devices.timing.events import CTASequencer
|
||||||
|
cta = CTASequencer("SAR-CCTA-ESC")
|
||||||
|
|
||||||
|
# setup logging
|
||||||
|
import logging
|
||||||
|
logger = logging.getLogger("slic.hole_drilling")
|
||||||
|
logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
|
#formatter = logging.Formatter(fmt='%(asctime)s %(levelname)-8s %(message)s',
|
||||||
|
# datefmt='%Y-%m-%d %H:%M:%S')
|
||||||
|
|
||||||
|
# create file handler which logs
|
||||||
|
try:
|
||||||
|
fh = logging.FileHandler('/sf/cristallina/applications/slic/cristallina/log/hole_drilling.log')
|
||||||
|
fh.setLevel(logging.DEBUG)
|
||||||
|
#fh.setFormatter(formatter)
|
||||||
|
logger.addHandler(fh)
|
||||||
|
except PermissionError as e:
|
||||||
|
logger.warning("Cannot write log file.")
|
||||||
|
logger.warning(e)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
attenuator = Attenuator("SAROP31-OATA150", description="Cristallina attenuator OATA150")
|
||||||
|
|
||||||
|
from slic.devices.xoptics.kb import KBHor,KBVer
|
||||||
|
kbHor = KBHor(
|
||||||
|
"SAROP31-OKBH154",
|
||||||
|
description="Cristallina horizontal KB mirror"
|
||||||
|
)
|
||||||
|
|
||||||
|
kbVer = KBVer(
|
||||||
|
"SAROP31-OKBV153",
|
||||||
|
description="Cristallina vertical KB mirror"
|
||||||
|
)
|
||||||
|
|
||||||
|
do_not_move_benders = True
|
||||||
|
testing_flag = False
|
||||||
|
pos = np.array([0,0])
|
||||||
|
|
||||||
|
# parameters
|
||||||
|
n_same_holes = 3
|
||||||
|
attenuations = np.linspace(0.15,0.35,9)#np.linspace(0.1,0.35,11)#np.linspace(0.1,0.35,6)#np.logspace(-3,0,num=7)
|
||||||
|
KBv_home = [1.3 , 1.6]
|
||||||
|
KBh_home = [1.4 , 1.7]
|
||||||
|
|
||||||
|
# Spacings
|
||||||
|
between_same_shots = 150
|
||||||
|
between_attenuations = 150
|
||||||
|
between_KB_settings = 500#500
|
||||||
|
|
||||||
|
### 23.02
|
||||||
|
def kb_settings_list(best,step,no_steps):
|
||||||
|
for i in range(no_steps):
|
||||||
|
if i == 0:
|
||||||
|
l=[]
|
||||||
|
l.append([best[0]+i*step,best[1]])
|
||||||
|
for i in range(no_steps):
|
||||||
|
if i == 0:
|
||||||
|
pass
|
||||||
|
l.append([best[0],best[1]+i*step])
|
||||||
|
return l
|
||||||
|
|
||||||
|
KBvs = kb_settings_list([1.595,1.874],0.05,3)
|
||||||
|
KBhs = kb_settings_list([1.799000,2.100000],0.05,3)
|
||||||
|
|
||||||
|
### 24.02
|
||||||
|
def kb_settings_list_new(best,step,no_steps_one_way):
|
||||||
|
l=[]
|
||||||
|
first = np.array(best) - np.array([step*no_steps_one_way,step*no_steps_one_way])
|
||||||
|
for i in range(no_steps_one_way*2+1):
|
||||||
|
l.append([first[0]+i*step,first[1]+i*step])
|
||||||
|
return l
|
||||||
|
KBvs = kb_settings_list_new([1.595,1.874],0.0075,3)
|
||||||
|
KBhs = kb_settings_list_new([1.799000,2.100000],0.0075,3)
|
||||||
|
|
||||||
|
|
||||||
|
# Time estimates for total time calculation (time in seconds)
|
||||||
|
t_kb_change = 30
|
||||||
|
t_shot = 4
|
||||||
|
t_atten_change = 10
|
||||||
|
|
||||||
|
# Choose motor stage (set true for smaract_stage_xyz, false if attocubes)
|
||||||
|
smaract_stage = True
|
||||||
|
# Change to mm from um if smaract stage selected
|
||||||
|
if smaract_stage:
|
||||||
|
between_same_shots = between_same_shots/1000
|
||||||
|
between_attenuations = between_attenuations/1000
|
||||||
|
between_KB_settings = between_KB_settings/1000
|
||||||
|
|
||||||
|
def shoot(n_shots=1):
|
||||||
|
epics.caput("SAR-CCTA-ESC:seq0Ctrl-Cycles-I", n_shots)
|
||||||
|
sleep(0.1)
|
||||||
|
epics.caput("SAR-CCTA-ESC:seq0Ctrl-Start-I", 1)
|
||||||
|
|
||||||
|
|
||||||
|
def move_x_rel(distance):
|
||||||
|
standa.x.mvr(distance)
|
||||||
|
|
||||||
|
def move_y_rel(distance):
|
||||||
|
standa.z.mvr(distance)
|
||||||
|
|
||||||
|
|
||||||
|
def move_absolute(x, y):
|
||||||
|
standa.x.mv(x).wait()
|
||||||
|
standa.z.mv(y).wait()
|
||||||
|
|
||||||
|
def make_holes(quantity,spacing=0.25,wait=1):
|
||||||
|
start_x = standa.x.get()
|
||||||
|
start_y = standa.z.get()
|
||||||
|
|
||||||
|
print(f'Starting postion:\n {standa}')
|
||||||
|
|
||||||
|
for i in range(quantity):
|
||||||
|
print(f'Shot {i}')
|
||||||
|
shoot()
|
||||||
|
sleep(wait)
|
||||||
|
move_x_rel(spacing)
|
||||||
|
print('Done')
|
||||||
|
print('Returning to the start')
|
||||||
|
standa.x.mv(start_x)
|
||||||
|
standa.z.mv(start_y)
|
||||||
|
|
||||||
|
def drill_holes_grid(x_start, x_stop, n_cols, y_start, y_stop, n_rows, wait_time=0.5):
|
||||||
|
# make grid
|
||||||
|
x_pos = np.linspace(x_start, x_stop, n_cols)
|
||||||
|
x_spacing = (x_stop-x_start)/(n_cols-1)
|
||||||
|
|
||||||
|
y_pos = np.linspace(y_start, y_stop, n_rows)
|
||||||
|
y_spacing = (y_stop-y_start)/(n_rows-1)
|
||||||
|
|
||||||
|
# TODO: add settings we want to change per row
|
||||||
|
row_settings = defaultdict(lambda: {'n_pulses' : 100})
|
||||||
|
row_settings[0] = {'n_pulses' : 500}
|
||||||
|
row_settings[1] = {'n_pulses' : 100}
|
||||||
|
row_settings[2] = {'n_pulses' : 10}
|
||||||
|
row_settings[3] = {'n_pulses' : 1}
|
||||||
|
|
||||||
|
x_start = standa.x.get()
|
||||||
|
y_start = standa.z.get()
|
||||||
|
|
||||||
|
logger.info(f"Begin hole pattern at x:{x_start:.5f}, y:{y_start:.5f}, with transmission: {attenuator.get_transmission():.5f}.")
|
||||||
|
|
||||||
|
for row, y in enumerate(y_pos):
|
||||||
|
settings = row_settings[row]
|
||||||
|
n_pulses = settings['n_pulses']
|
||||||
|
|
||||||
|
for x in x_pos:
|
||||||
|
move_absolute(x, y)
|
||||||
|
sleep(wait_time)
|
||||||
|
|
||||||
|
shoot(n_pulses)
|
||||||
|
|
||||||
|
sleep(0.2)
|
||||||
|
while cta.cta_client.is_running():
|
||||||
|
# wait until sequence is done
|
||||||
|
print('waiting for CTA ...')
|
||||||
|
sleep(0.1)
|
||||||
|
|
||||||
|
logger.info(f"At {time():.5f}s, drilled {n_pulses} hole(s) at x:{x:.5f}, y:{y:.5f}, with transmission: {attenuator.get_transmission():.5f}.")
|
||||||
|
|
||||||
|
move_absolute(x_start, y_start)
|
||||||
|
|
||||||
|
def drill_here():
|
||||||
|
|
||||||
|
x_start = standa.x.get()
|
||||||
|
x_stop = x_start + 2
|
||||||
|
n_cols = 11
|
||||||
|
|
||||||
|
y_start = standa.z.get()
|
||||||
|
y_stop = y_start + 1
|
||||||
|
n_rows = 4
|
||||||
|
|
||||||
|
drill_holes_grid(x_start, x_stop, n_cols, y_start, y_stop, n_rows, wait_time=0.5)
|
@ -366,9 +366,9 @@ pvs_OKBH154 = [
|
|||||||
####################
|
####################
|
||||||
# Standa motors (mainly used with the X-ray eye)
|
# Standa motors (mainly used with the X-ray eye)
|
||||||
pvs_standa = [
|
pvs_standa = [
|
||||||
"SARES30MOBI1:MOT_1",
|
"SARES30-MOBI1:MOT_1.RBV",
|
||||||
"SARES30MOBI1:MOT_2",
|
"SARES30-MOBI1:MOT_2.RBV",
|
||||||
"SARES30MOBI1:MOT_3",
|
"SARES30-MOBI1:MOT_3.RBV",
|
||||||
]
|
]
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
|
Reference in New Issue
Block a user