mxcubecore.HardwareObjects.MicroDiffractometer#
Micro Diffractometer implementation of the AbstractDiffractometer class.
Classes
|
Microdiff with Exporter implementation of AbstractDiffractometer |
- class mxcubecore.HardwareObjects.MicroDiffractometer.MicroDiffractometer(name)[source]#
Bases:
AbstractDiffractometerMicrodiff with Exporter implementation of AbstractDiffractometer
- check_scan_limits(start: float, end: float, exptime: float) bool[source]#
Check if the scan parameters are within the limits
- do_characterisation_scan(start: float, scan_range: float, nb_frames: int, exptime: float, nb_scans: int, angle: float, timeout: float | None = None)[source]#
Do fast characterisation. :param start: Position of omega for the first scan [deg]. :param scan_range: range for each scan [deg]. :param nb_frames: Frame numbers for each scan. :param exptime: Total exposure time for each scan [s]. :param nb_scans: How many times a scan to be repeated. :param angle: The angle between each scan [deg]. This number,
added to the last position of each scan and will be the start position of the following scan.
- Parameters:
- Raises:
RuntimeError – Timeout waiting for status ready.
- do_line_scan(start: float, end: float, exptime: float, number_of_images: int, motors_pos: dict[str, dict], timeout: float | None = None)[source]#
Do helical (line) scan on omega. :param start: scan start position. :param end: scan end position. :param exptime: scan exposure time (total). :param number_of_images: Used only if more tahn one frame needed. :param timeout: optional - timeout [s],
if timeout = 0: return at once and do not wait, if timeout is None: wait forever (default).
- Parameters:
- Raises:
RuntimeError – Timeout waiting for status ready.
ValueError – Scan parameters not within limits (if relevant).
- do_mesh_scan(start: float, end: float, exptime: float, dead_time: float, nb_lines: int, nb_frames_total: int, grid_centre: list[tuple[str, float]], mesh_range: dict, timeout: float | None = None)[source]#
Do a mesh scan.
- Parameters:
start (float) – scan start position.
end (float) – scan end position.
exptime (float) – scan exposure time (total).
dead_time (float) – Dead time between the pulses. Detector dependant.
nb_lines (int) – Total number of lines.
nb_frames_total (int) – Total number of frames.
grid_centre (list[tuple[str, float]]) – List of tuples (motor_role, position). representing the centre of the mesh grid.
mesh_range (dict) – Horizontal and vertical range.
timeout (float | None) – optional - timeout [s], if timeout = 0: return at once and do not wait, if timeout is None: wait forever (default).
- Raises:
RuntimeError – Timeout waiting for status ready.
- do_oscillation_scan(start: float, end: float, exptime: float, number_of_images: int = 1, timeout: float | None = None)[source]#
Do an oscillation scan on omega.
- Parameters:
start (float) – omega start position.
end (float) – omega end position.
exptime (float) – scan exposure time (total).
number_of_images (int) – Used if need to set number of frames.
timeout (float | None) – optional - timeout [s], if timeout = 0: return at once and do not wait, if timeout is None: wait forever (default).
- Raises:
RuntimeError – Timeout waiting for status ready.
ValueError – Scan parameters not within limits (if relevant).
- do_still_scan(pulse_duration: float, pulse_period: float, nb_pulse: int, timeout: [None | float] = None)[source]#
Do a zero oscillation acquisition.
- Parameters:
pulse_duration (float) – Duration of the pulse sent to the detector.
pulse_period (float) – The period of the pulse sent to the detector.
nb_pulse (int) – Number of pulses to be sent.
timeout ([None | float]) – optional - timeout [s], if timeout = 0: return at once and do not wait, if timeout is None: wait forever (default).
- Raises:
RuntimeError – Timeout waiting for status ready.
- get_constraint() DiffractometerConstraint[source]#
Get the diffrractometer constraint type.
- Return type:
- get_motors()[source]#
Get the dictionary of all the motors which can be used.
- Returns:
hardware_object}.
- Return type:
Ddctionary {role
- get_phase() DiffractometerPhase[source]#
Get the current phase.
- Return type:
- get_state()[source]#
Get the diffractometer general state.
- Returns:
state
- Return type:
(enum ‘HardwareObjectState’)
- get_value_motors(motors_list: [list | None] = None) dict[str, float][source]#
- Get the positions of diffractometer motors. If the motors_list
is empty, return the positions of all the availble motors.
- Parameters:
motors_list ([list | None]) – List of motor roles.
- Returns:
position}.
- Return type:
Dictionary {role