mxcubecore.HardwareObjects.abstract.AbstractBeam#
AbstractBeam class - methods to define the size and shape of the beam.
emits: - beamSizeChanged (self._beam_width, self._beam_height) - beamInfoChanged (self._beam_info_dict.copy())
Classes
|
AbstractBeam class |
|
Beam shape definitions |
- class mxcubecore.HardwareObjects.abstract.AbstractBeam.AbstractBeam(name)[source]#
Bases:
HardwareObject
AbstractBeam class
- property aperture#
Returns aperture hwobj
- property definer#
Beam definer device, equipment like focusing optics, CRLs, and etc.
- evaluate_beam_info()[source]#
Method called if aperture, slits or focusing has been changed. Evaluates which of the beam size defining devices determins the size. :returns:
- Beam info dictionary (dict), type of the definer (str).
- {size_x: float, size_y: float,
shape: BeamShape enum, label: str},
- Return type:
(dict)
- get_available_size()[source]#
Get the available beam definers configuration. :returns:
- Dictionary {“type”: (list), “values”: (list)}, where
“type”: the definer type (“aperture”, “slits”,”definer”) “values”: List of available beam size difinitions,
according to the “type”.
- Return type:
(dict)
- Raises:
- get_beam_divergence()[source]#
Get the beam divergence. :returns: Beam divergence (horizontal, vertical) [μm] :rtype: (tuple)
- get_beam_position_on_screen()[source]#
Get the beam position :returns: Position (x, y) [pixel] :rtype: (tuple)
- get_defined_beam_size()[source]#
Get the predefined beam labels and size. :returns:
- Dictionary wiith list of avaiable beam size labels
and the corresponding size (width,height) tuples. {“label”: [str, str, …], “size”: [(w,h), (w,h), …]}
- Return type:
(dict)
- Raises:
- set_beam_position_on_screen(beam_x_y)[source]#
Set the beam position :returns: Position (x, y) [pixel] :rtype: beam_x_y (tuple)
- set_beam_size_shape(beam_width, beam_height, beam_shape)[source]#
Sets beam size and shape :param beam_width: requested beam width in microns :type beam_width: float :param beam_height: requested beam height in microns :type beam_height: float :param beam_shape: requested beam shape :type beam_shape: BeamShape enum
- set_value(size=None)[source]#
Set the beam size. :param size: Width, heigth [um] or
(str): Aperture or definer name.
- Raises:
- property slits#
Returns slits hwobj