post-p21592 HVE commissioning cleanup
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
import time
|
||||
from time import sleep
|
||||
|
||||
import numpy as np
|
||||
from epics import PV
|
||||
|
||||
@ -21,7 +23,7 @@ N_UNDS = list(range(3, 15 + 1))
|
||||
# Cristallina without calibration
|
||||
# offset is the difference between PSSS and undulator setpoint
|
||||
# sign convention: Undulator - PSSS
|
||||
energy_offset = -62 # eV
|
||||
energy_offset = -59 # eV
|
||||
|
||||
|
||||
# move the PSSS motor according to the energy
|
||||
@ -390,9 +392,19 @@ class ScalerEK:
|
||||
|
||||
|
||||
def get_machine_n_und_ref():
|
||||
res = PVEnumAdjustable("SARUN:REF-UND").get()
|
||||
if not res.startswith("SARUN"):
|
||||
return None
|
||||
|
||||
for attempt in range(3):
|
||||
try:
|
||||
res = PVEnumAdjustable("SARUN:REF-UND").get()
|
||||
if not res.startswith("SARUN"):
|
||||
return None
|
||||
except AttributeError as e:
|
||||
print("Error getting undulator, retrying")
|
||||
print(e)
|
||||
time.sleep(1)
|
||||
else:
|
||||
break
|
||||
|
||||
n = len("SARUN")
|
||||
res = res[n:]
|
||||
try:
|
||||
|
Reference in New Issue
Block a user