id4_common.utils.shorts#
Short convenience wrappers for common session operations.
Module Contents#
- id4_common.utils.shorts.opt(method='cen')#
Move positioner of last scan to center of last scan
- usage: RE(opt())
- optional argument: method = ‘cen’ (default)
method = ‘max’
- id4_common.utils.shorts.crl_setup(hutch=None)#
Switch the CRL sample-position offset to the active hutch.
Delegates to
CRLClass.select_g()/select_h, which write to the IOC’sZOffsetTogglePV. The per-hutch offset values themselves live on the device ascrl.offset_g/offset_hand are not changed here.- Parameters:
hutch ({'g', 'h'}, optional) – Hutch to switch to. Case-insensitive, accepts
"G"/"H"and the longer aliases"diffractometer"(= G) /"magnet"(= H) for backwards compatibility. WhenNone(default), prompt interactively.
- id4_common.utils.shorts.crl_size(focal_size)#
Set the CRL focal size.
Renamed from
crlso the function does not shadow thecrldevice thatload_device("crl")injects into the session namespace.- Parameters:
focal_size (float) – Target focal size in microns. If < 5 µm, the device’s
minimize_buttonis triggered instead of writing a setpoint. Otherwise the value is written tocrl.beamsize(which handles the microns -> meters conversion internally).
- id4_common.utils.shorts.te(temperature)#
Set the active temperature controller’s setpoint.
Thin shortcut over the
tcsignal installed byid4_common.utils.temperature_setup.temperature_setup(). Writes the setpoint and returns immediately; the controller continues ramping toward the target on its own.- Parameters:
temperature (float) – Target temperature setpoint.
- Raises:
RuntimeError –
temperature_setup()has not been run, so there is no active controller to talk to.