mxcubecore.HardwareObjects.abstract.AbstractDiffractometer#
Abstract Diffractometer class. Initialises the username property and all the motors and nstate (discrete positions) equipment, which are part of the diffractometer. Certain number of roles are fixed and define a corresponding motor or nstate actuator object. This allows to use them in a standard way by the MXCuBE application (web or Qt). There is also a convention of the direction of the motors: - z axis is in the direction of gravity. Positive direction is upwards. - y axis is perpendicular to the z axis and to the nominal beam direction.
Positive direction is so that x,y,z would form a right-handed coordinate system.
x axis is orthogonal to the y and z axes (and approximately parallel to the beam). Positive direction is from the sample towards the detector.
Here follows the list of the fixed roles and the description of the corresponding objects, accessible via beamline.diffractometer hardware object.
Motor objects (roles) and their functionality:
- omega - the rotation axis, independent of the orientation (up, down or side).
Positive direction is a right-handed rotation.
- kappa - the rotation axis between the omega and kappa_phi axes.
Positive direction is a right-handed rotation. Not present on all goniostats.
- kappa_phi - the rotation axis directly attached to the sample.
Positive direction is a right-handed rotation. Not present on all goniostats.
sampx - centring table x axis sampy - centring table y axis focus - alignment table x axis phiy - alignment table y axis phiz - alignment table z axis sample_horizontal - Pseudomotor approximately along the y axis.
Generated by phiy or a combination of sampx, sampy depending on goniostat
- sample_vertical - Pseudomotor approximately along the z axis.
Generated or phiz or a combination of sampx, sampy depending on goniostat
backlight - adjust the intensity of the back light frontlight - adjust the intensity of the front light kappa - the minikappa kappa axis kappa_phi - the minikappa phi axis
2. Discrete (N) state equipment and its functionality: zoom - zoom levels fshutter - fast (ms) shutter - allow beam on the sample beamstop - put in front of a detector to avoid the direct beam. capillary - if present, a tube to reduce the scattering background. backlightswitch - move the backlight on the level of the on-axis viewer frontlightswitch - switch on/off the front light fluo_detector - if present, actuator to move a fluorescence detector close to the sample
Classes
|
Abstract Diffractometer. |
|
Chip calibration model. |
|
Chip layout model. |
|
Enumeration of chip holder shape. |
|
Enumeration diffractometer constraint types. |
|
Enumeration diffractometer head types. |
|
Enumeration diffractometer phases. |
|
|
|
Enumeration of chip holder geometry. |
|
Generic sample holder. |
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.AbstractDiffractometer(name)[source]#
Bases:
HardwareObjectAbstract Diffractometer.
- head_type#
Current head type
- Type:
DiffractometerHead Enum
- current_phase#
Current phase
- Type:
DiffractometerPhase Enum
- current_constraint#
Current constraint.
- Type:
DiffractometerConstraint Enum
- Emits:
valueChanged – (“valueChanged”, (value,))
phaseChanged – (“phaseChanged”, (state))
- States:
HardwareObjectStates: READY, BUSY, FAULT
- get_chip_configuration() GonioHeadConfiguration | None[source]#
Get the chip configuration.
- Return type:
GonioHeadConfiguration | None
- get_constraint()[source]#
Get the current constraint :returns: DiffractometerConstraint member. :rtype: (Enum)
- property get_constraint_enum#
Get the constraints Enum. Used when no import wished.
- get_motors() dict[source]#
Get the dictionary of all configured motors or the ones to use.
- Returns:
hardware_object}
- Return type:
Dictionary {role
- get_nstate_equipment() dict[source]#
Get the dictionary of all the nstate (discrete positions) equipment.
- Returns:
hardware_object}
- Return type:
Dictionary {role
- get_phase() DiffractometerPhase[source]#
Get the current phase.
- Return type:
- property get_phase_enum#
Get the phase Enum. Used when no import wished.
- get_state_motors(motors_list: list | None = None) dict[source]#
- Get the state of diffractometer motors. If the motors_list is
empty, return the state of all the available motors.
- Parameters:
roles. (List of motor) –
motors_list (list | None) –
- Returns:
state}
- Return type:
Dictionary {motor_role
- get_value_motors(motors_list: list | None = None) dict[source]#
- Get the positions of diffractometer motors. If the motors_list is
empty, return the positions of all the available motors.
- Parameters:
roles. (List of motor) –
motors_list (list | None) –
- Returns:
position}
- Return type:
Dictionary {motor_role
- property head_enum#
Get the diffractometer head Enum. Used when no import wished.
- init()[source]#
Initialise username property. Initialise the equipment, defined in the configuration file
- set_chip_layout(layout_name: str) bool[source]#
Choose the chip configuration layout. :param The layout name.:
- set_constraint(value: DiffractometerConstraint, timeout: float | None = None)[source]#
Sets diffractometer to selected constraint.
- Parameters:
value (DiffractometerConstraint) – DiffractometerConstraint member.
timeout (float | None) – optional - timeout [s], if timeout = 0: return at once and do not wait, if timeout is None: wait forever (default).
- set_head_configuration(str_data: str) None[source]#
Write the chip configuration in the chip configuration json file. :param String containing the configuration.:
- Parameters:
str_data (str) –
- Return type:
None
- set_phase(value: DiffractometerPhase | str, timeout: float | None = None)[source]#
Sets diffractometer to selected phase.
- Parameters:
value (DiffractometerPhase | str) – DiffractometerPhase or string value
timeout (float | None) – timeout [s], If timeout = 0: return at once and do not wait; if timeout is None: wait forever (default).
- set_value_motors(motors_positions_dict: dict, simultaneous: bool = True, timeout: float | None = None)[source]#
Move specified motors to the requested positions
- Parameters:
- Raises:
TimeoutError – Timeout
KeyError – The name does not correspond to an existing motor
- update_phase(value: DiffractometerPhase | None = None)[source]#
Update the phase value, Emit phaseChanged signal.
- Parameters:
value (DiffractometerPhase | None) – DiffractometerPhase member. Optional.
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.CalibrationData(*, top_left: Tuple[float, float, float] = [0, 0, 0], top_right: Tuple[float, float, float] = [0, 0, 0], bottom_left: Tuple[float, float, float] = [0, 0, 0])[source]#
Bases:
BaseModelChip calibration model.
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.ChipLayout(*, head_type: DiffractometerHead = DiffractometerHead.SSX, holder_type: HolderTypeEnum = HolderTypeEnum.KNOWN_GEOMETRY, holder_brand: str = '', holder_size: Tuple[float, float] = [0, 0], sections: List[SampleHolderSectionModel], calibration_data: CalibrationData)[source]#
Bases:
BaseModelChip layout model.
- Parameters:
head_type (DiffractometerHead) –
holder_type (HolderTypeEnum) –
holder_brand (str) –
sections (List[SampleHolderSectionModel]) –
calibration_data (CalibrationData) –
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.ChipShapeEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
EnumEnumeration of chip holder shape.
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.DiffractometerConstraint(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
EnumEnumeration diffractometer constraint types.
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.DiffractometerHead(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
EnumEnumeration diffractometer head types.
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.DiffractometerPhase(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
EnumEnumeration diffractometer phases.
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.HolderTypeEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
EnumEnumeration of chip holder geometry.
- class mxcubecore.HardwareObjects.abstract.AbstractDiffractometer.SampleHolderSectionModel(*, calibration_data: CalibrationData | None = None, section_offset: Tuple[int, int] = [0, 0], block_size: Tuple[float, float] = [15, 15], block_spacing: Tuple[float, float] = [15, 15], block_shape: ChipShapeEnum = ChipShapeEnum.RECTANGULAR, number_of_rows: int = 6, number_of_collumns: int = 6, row_labels: List[str] = [], column_lables: List[str] = [], targets_per_block: Tuple[int, int] = [20, 20])[source]#
Bases:
BaseModelGeneric sample holder.
- Parameters:
calibration_data (CalibrationData | None) –
block_shape (ChipShapeEnum) –
number_of_rows (int) –
number_of_collumns (int) –