25 lines
908 B
Python
25 lines
908 B
Python
Beamline_mode = caget(BEAMLINE_MODE)
|
|
Beamline_selected = caget(BEAMLINE_SELECTED)
|
|
if Beamline_selected != BEAMLINE_NAME:
|
|
show_message('Beamline selected not correct (selected: {}), set to {}'.format(Beamline_selected, BEAMLINE_NAME),"Wrong beamline set",blocking=True)
|
|
if Beamline_mode != "Pink":
|
|
show_message('Beamline not in pink mode, set beamline to pink',"Wrong beamline set",blocking=True)
|
|
camera_screen.move(SCREEN_TARGET)
|
|
time.sleep(0.2)
|
|
camera_screen.getSettlingCondition().waitSettled() #ecj
|
|
|
|
cam_server.start(CAMERA_NAME + '_pointing', True)
|
|
cam_server.averaging=10
|
|
st = cam_server.stream
|
|
print('Started camera')
|
|
#Fix this with a specific pipeline
|
|
time.sleep(0.5)
|
|
st.waitCacheChange(5000)
|
|
#show_panel(cam_server)
|
|
add_device(st, True)
|
|
# set the attenuator to current FEL energy and set attenuation
|
|
Fel_energy = caget(FEL_ENERGY)*1000
|
|
caput(ATT_ENERGY, Fel_energy)
|
|
|
|
att.write(ATENUATOR_CAL)
|