mxcubecore.HardwareObjects.GenericDiffractometer#
GenericDiffractometer
Classes
|
|
|
|
|
|
Enumeration of diffractometer states |
|
|
Abstract base class for diffractometers |
|
|
|
|
|
|
|
|
|
|
|
- class mxcubecore.HardwareObjects.GenericDiffractometer.BlockShapeEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
- class mxcubecore.HardwareObjects.GenericDiffractometer.DiffractometerState[source]#
Bases:
object
Enumeration of diffractometer states
- class mxcubecore.HardwareObjects.GenericDiffractometer.GenericDiffractometer(name)[source]#
Bases:
HardwareObject
Abstract base class for diffractometers
- accept_centring()[source]#
Descript. : Arg. “ fully_centred_point. True if 3 click centring
else False
- property alignment_x#
alignment_x motor object (also used as graphics.focus)
- Returns:
AbstractActuator
- property alignment_y#
alignment_y motor object
- Returns:
AbstractActuator
- property alignment_z#
alignment_z motor object
- Returns:
AbstractActuator
- property centring_x#
centring_x motor object
- Returns:
AbstractActuator
- property centring_y#
centring_y motor object
- Returns:
AbstractActuator
- execute_server_task(method, timeout=30, *args)[source]#
- Method is used to execute commands and wait till
diffractometer is in ready state
- Parameters:
method (instance) – method to be executed
timeout (seconds) – timeout in seconds
- force_emit_signals()[source]#
Emits all hardware object signals
The method is called from the gui via beamline object to ensure that bricks have values after the initialization. Problem arise when a hardware object is used by several bricks. If first brick connects to some signal emitted by a brick then other bricks connecting to the same signal will not receive the values on the startup. The easiest solution is to call force_emit_signals method directly after the initialization of the beamline object
- get_pixels_per_mm()[source]#
Returns tuple with pixels_per_mm_x and pixels_per_mm_y
- Returns:
list with two floats
- get_point_between_two_points(point_one, point_two, frame_num, frame_total)[source]#
Method returns a centring point between two centring points It is used to get a position on a helical line based on frame number and total frame number
- get_scan_limits(speed=None, num_images=None, exp_time=None)[source]#
Gets scan limits. Necessary for example in the plate mode where osc range is limited
- get_snapshot()[source]#
Get snapshot from sample view
- Returns:
A bytes object of the current camera image.
- Return type:
- image_clicked(x: float, y: float, xi: float | None = None, yi: float | None = None)[source]#
Handles a user click sent from the frontend during the manual centring.
This method is called by the backend when the user clicks on the sample image in the frontend.
The attribute self.waiting_for_click controls whether the click should be accepted or ignored:
None: click is accepted (legacy)
True: waiting for a click, accept it and mark it as received
False: already received a click, ignore further clicks
- Parameters:
- Raises:
RuntimeError – If a click is received while a previous one is still being processed.
- init()[source]#
‘public’ post-initialization method. Override as needed.
For ConfiguredObjects called after loading contained objects.
- move_motors(motor_positions, timeout=15)[source]#
Moves diffractometer motors to the requested positions
- Parameters:
motors_dict (dict) – dictionary with motor names or hwobj and target values.
- move_to_beam(x, y, omega=None)[source]#
- Descript.function to create a centring point based on all motors
positions.
- property omega#
omega motor object
- Returns:
AbstractActuator
- set_phase(phase, timeout=None)[source]#
- Sets diffractometer to selected phase
By default available phase is Centring, BeamLocation, DataCollection, Transfer
- Parameters:
phase (string) – phase
timeout (int) – timeout in sec
- set_use_sc(flag)[source]#
Sets use_sc flag, that indicates if sample changer is used
- Parameters:
flag (boolean) – use sample changer flag
- class mxcubecore.HardwareObjects.GenericDiffractometer.HeadTypeEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#