mxcubecore.HardwareObjects.mockup.BeamMockup#

BeamMockup class - methods to define the size and shape of he beam.

Example xml configuration:

<object class="BeamMockup">
  <object href="/beam_definer" role="definer"/>
  <!-- accepted definer_type values: aperture, slits, definer -->
  <definer_type>definer</definer_type>
  <beam_divergence_vertical>0</beam_divergence_vertical>
  <beam_divergence_horizontal>0</beam_divergence_horizontal>
  <check_beam>(0.03, 0.03)</check_beam>
</object>

Classes

BeamMockup(name)

Beam Mockup class

class mxcubecore.HardwareObjects.mockup.BeamMockup.BeamMockup(name)[source]#

Bases: AbstractBeam

Beam Mockup class

aperture_diameter_changed(aperture)[source]#

Method called when the aperture diameter changes.

Parameters:

enum. (Aperture) –

get_aperture_pos_name() str[source]#

Get the name of the current aperture.

Returns:

name of current aperture position

Return type:

str

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:

dict

get_defined_beam_size() dict[source]#

Get the predefined beam labels and size.

Returns:

Dictionary with lists of available beam size labels and the corresponding size (width,height) tuples. {"label": [str, str, ...], "size": [(w,h), (w,h), ...]}

Return type:

dict

get_slits_gap() tuple[float, float][source]#

Get the beam size from the slits gap.

Returns:

Two-item tuple with horizontal and vertical beam size in microns

Return type:

tuple[float, float]

init()[source]#

Initialize hardware

set_beam_position_on_screen(beam_x_y: list[int, int])[source]#

Sets beam mark position on screen. #TODO move method to sample_view

Parameters:
  • [x (Position) –

  • pixels. (y] in) –

  • beam_x_y (list[int, int]) –

set_slits_gap(width_microns: int, height_microns: int)[source]#

Sets slits gap in microns.

Parameters:
  • microns. (width and height in) –

  • width_microns (int) –

  • height_microns (int) –

set_value(size: list[float, float] | str | None = None)[source]#

Set the beam size.

Parameters:

size (list[float, float] | str | None) – List of width and height in micrometers or Aperture or definer definer name as string.

Raises:
slits_gap_changed(size: tuple[float, float])[source]#

Method called when the slits gap changes.

Parameters: