mxcubecore.HardwareObjects.ESRF.ESRFBeam#
BeamDefiner ESRF implementation class - methods to define the size and shape of the beam. Example yml configuration:
class: ESRF.ESRFBeam.ESRFBeam
configuration:
beam_divergence_horizontal: 104
beam_divergence_vertical: 6.5
definer_type: definer # could be also aperture or slits
objects:
aperture: udiff_aperture.yml
definer: beam_definer.yml
Classes
|
Beam ESRF implementation |
- class mxcubecore.HardwareObjects.ESRF.ESRFBeam.ESRFBeam(name)[source]#
Bases:
AbstractBeam
Beam ESRF implementation
- get_available_size() dict [source]#
Get the available predefined beam definer configuration. :returns:
{"type": ["aperture"], "values": [labels]}
or{"type": ["definer"], "values": [labels]}
or ``{“type”: [“width”, “height”], “values”:[low_lim_w, high_lim_w, low_lim_h, high_lim_h]}``
- Return type:
- get_beam_size() tuple[float, float] [source]#
Get the beam size.
- Returns:
width and height.
- Return type:
Two-item tuple
- get_defined_beam_size() dict [source]#
Get the predefined beam labels and size.
- Returns:
Dictionary with list of available beam size labels and the corresponding size (width,height) tuples.
{"label": [str, str, ...], "size": [(w,h), (w,h), ...]}
- Return type:
- get_value_xml() tuple[float, float, str, str] [source]#
XMLRPC does not handle Enum, the shape is transformed to string.
- Returns:
width, height, shape, name
- Return type:
Four-item tuple
- set_value(size: list[float] | str | None = None)[source]#
Set the beam size.
- Parameters:
- Raises:
RuntimeError – Beam definer not configured Size out of the limits.
- wait_for_beam(timeout: float | None = None)[source]#
Wait until beam present.
- Parameters:
seconds (Optional - timeout in) –
timeout (float | None) –
:param : :param If timeout == 0: return at once and do not wait. :param if timeout is None: wait forever (default).
- Raises:
RuntileError if no beam after the specified timeout. –
- Parameters:
timeout (float | None) –