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>
</object>
Classes
|
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 :param aperture: Aperture enum. :type aperture: aperture(Enum)
- get_available_size()[source]#
Get the available predefined beam definer configuration. :returns:
- {“type”: [“apertures”], “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()[source]#
Get the predefined beam labels and size. :returns:
- Dictionary with lists of avaiable beam size labels
and the corresponding size (width,height) tuples. {“label”: [str, str, …], “size”: [(w,h), (w,h), …]}
- Return type:
(dict)
- get_value()[source]#
- Get the size (width and heigth) of the beam, its shape and
its label. The size is in mm.
- Retunrs:
- (tuple): (width, heigth, shape, name), with types
(float, float, Enum, str)
- set_beam_position_on_screen(beam_x_y)[source]#
Sets beam mark position on screen #TODO move method to sample_view :param beam_x_y: Position [x, y] [pixel] :type beam_x_y: list
- set_slits_gap(width_microns, height_microns)[source]#
Sets slits gap in microns :param width_microns: :type width_microns: int :param height_microns: :type height_microns: int
- set_value(size=None)[source]#
Set the beam size :param size: Width, heigth or
(str): Aperture or definer definer name.
- Raises:
RuntimeError – Beam definer not configured Size out of the limits.
TypeError – Wrong size type.