workflows.py: tempoary protection for det_z on x10s, needs to be beamline specific and probably in the detector move call.
This commit is contained in:
@@ -144,7 +144,15 @@ def rse2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
|
||||
def sa2dc(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
start = time.perf_counter()
|
||||
status = devs.bec_worker.det_z(value=cfg.dtz)
|
||||
det_z_pos = cfg.dtz
|
||||
#TODO det_z_minimum
|
||||
if not det_z_pos:
|
||||
logger.error("Detector Z position not set, defaulting to 170")
|
||||
det_z_pos = 170
|
||||
if det_z_pos and det_z_pos < 170:
|
||||
logger.warning(f"Detector Z position is less than 170: {det_z_pos}, setting to 170")
|
||||
det_z_pos = 170
|
||||
status = devs.bec_worker.det_z(value=det_z_pos)
|
||||
logger.info(f"start detector move to {cfg.dtz} at {time.perf_counter() - start:.2f}")
|
||||
devs.samcam_auto(AutoEnum.AUTO)
|
||||
logger.info(f"sam cam auto exposure in {time.perf_counter() - start:.2f}")
|
||||
|
||||
Reference in New Issue
Block a user