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(name)

AbstractBeam class

BeamShape(value)

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:

NotImplementedError

get_beam_divergence()[source]#

Get the beam divergence. :returns: Beam divergence (horizontal, vertical) [μm] :rtype: (tuple)

get_beam_info_dict()[source]#
Returns:

copy of beam_info_dict

Return type:

(dict)

get_beam_position_on_screen()[source]#

Get the beam position :returns: Position (x, y) [pixel] :rtype: (tuple)

get_beam_shape()[source]#
Returns:

Enum BeamShape

Return type:

beam_shape

get_beam_size()[source]#
Returns:

two floats

Return type:

(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:

NotImplementedError

init()[source]#

Initialise default values and objects

re_emit_values()[source]#

Reemits beamSizeChanged and beamInfoChanged signals

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:

NotImplementedError

property slits#

Returns slits hwobj

class mxcubecore.HardwareObjects.abstract.AbstractBeam.BeamShape(value)[source]#

Bases: Enum

Beam shape definitions