diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py index 44401cc..bb3ed46 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py @@ -480,7 +480,7 @@ class FlomniSampleTransferMixin: def laser_parameters_set_psd_intensity_threshold_tracking_low(self, val: float): dev.rtx.controller.emitter_set_psd_intensity_threshold_tracking_low(val) - def laser_tweak(self): + def laser_parameters_tweak_tracking(self): """Interactive tweak of the two laser tracking target positions. Arrow keys nudge the ConstEmitter tracking targets by a fixed step of @@ -494,15 +494,27 @@ class FlomniSampleTransferMixin: After every change the current y/z targets and the fzp x interferometer signal strength (channel 1) are printed, so one can watch the signal respond while tweaking. + + Requires the laser tracker to be enabled: with the tracker off nothing + moves on the hardware side, so the tweak would be a no-op. """ import fcntl import sys import termios import tty - step = 0.01 controller = dev.rtx.controller + if not controller.laser_tracker_check_enabled(): + print( + "The laser tracker is disabled. Enable it with laser_tracker_on() " + "before tweaking the tracking targets - otherwise nothing moves on " + "the hardware side." + ) + return + + step = 0.02 + def read_targets(): values = controller.emitter_get() return (