mxcubecore.HardwareObjects.ESRF.ESRFBeamProxy¶
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
beam_position: "250, 260" # optional [pixels]
objects:
aperture: udiff_aperture.yaml # if definer_type aperture
definer: beam_definer.yaml # if definer_type definer
monitor_beam: monitor_beam.yaml
Classes
|
Beam ESRF implementation |
- class mxcubecore.HardwareObjects.ESRF.ESRFBeamProxy.ESRFBeamProxy(name)[source]¶
Bases:
AbstractBeamBeam ESRF implementation
- class HOConfig(*, beam_position: str | None = None, **extra_data: Any)[source]¶
Bases:
HOConfig- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- 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)