mxcubecore.HardwareObjects.abstract.AbstractBeam#
Abstract beam hardware object.
Classes
|
Abstract beam hardware object. |
|
Beam shape definitions |
- class mxcubecore.HardwareObjects.abstract.AbstractBeam.AbstractBeam(name)[source]#
Bases:
HardwareObject
Abstract beam hardware object.
Has methods to define the size and shape of the beam.
- Emits:
beamSizeChanged (tuple[float, float]) – Two-item tuple of beam width and beam height in micrometers emitted when the beam size has changed.
beamInfoChanged (dict) – Dictionary containing beam info emitted when the beam info has changed.
- _aperture#
reference to the aperture hardware object
- _slits#
reference to the slits hardware object
- _definer#
reference to the slits hardware object
- property aperture#
Aperture hardware object.
- property definer#
Beam definer device, equipment like focusing optics, CRLs, and etc.
- evaluate_beam_info() dict [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 definerstr
.{size_x: float, size_y: float, shape: BeamShape enum, label: str}
.- Return type:
- get_available_size() dict [source]#
Get the available beam definers configuration.
- Returns:
Dictionary
{"type": (list), "values": (list)}
wheretype
is the definer type("aperture", "slits","definer")
andvalues
is a list of available beam size definitions according totype
.- Return type:
- get_beam_divergence() tuple [source]#
Get the beam divergence.
- Returns:
Beam divergence (horizontal, vertical) in micrometers.
- Return type:
- get_beam_info_dict() dict [source]#
Get beam info dictionary.
- Returns:
Copy of beam info dictionary.
- Return type:
- get_beam_position_on_screen() tuple [source]#
Get the beam position.
- Returns:
X and Y coordinates of the beam position in pixels.
- Return type:
- get_beam_size() tuple[float, float] [source]#
Get 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:
- set_beam_position_on_screen(beam_x_y: tuple) None [source]#
Set the beam position.
- Parameters:
beam_x_y (tuple) – X and Y coordinates of the beam position in pixels.
- Return type:
None
- set_beam_size_shape(beam_width: float, beam_height: float, beam_shape: BeamShape) None [source]#
Set beam size and shape.
- set_value(size: list[float] | str | None = None) None [source]#
Set the beam size. :param size: List of width and heigth in micrometers or
aperture or definer name as string.
- property slits#
Slits hardware object.