mxcubecore.HardwareObjects.abstract.AbstractResolution#

Resolution abstract implementation. Overloaded methods: get_state, get_value, get_limits. Implemented methods: _set_value, distance_to_resolution, resolution_to_distance. Emited signals: valueChanged. Hardware object used: energy and detecor. The detector object can be defined in the configuration file. If not, the one set from the beamline configuration is used.

Classes

AbstractResolution(name)

Abstract Resolution class

class mxcubecore.HardwareObjects.abstract.AbstractResolution.AbstractResolution(name)[source]#

Bases: AbstractMotor

Abstract Resolution class

abort()[source]#

Abort the distance motor movement

distance_to_resolution(distance=None, wavelength=None)[source]#

Convert distance to resolution. :param distance: Distance [mm]. Defaults to current distance :type distance: float :param wavelength: Wavelength [Å] (defaults to current wavelength) :type wavelength: float

Returns:

Resolution [Å].

Return type:

(float)

get_limits()[source]#

Return resolution low and high limits.

Parameters:

wavelength – Returns the limits for given wavelength if passed, current wavelength is otherwised used

Returns:

two floats tuple (low limit, high limit).

Return type:

(tuple)

get_limits_for_wavelength(wavelength: float)[source]#

Return resolution low and high limits.

Parameters:

wavelength (float) – Returns the limits for given wavelength if passed, current wavelength is otherwised used

Returns:

two floats tuple (low limit, high limit).

Return type:

(tuple)

get_state()[source]#

Get the state of the distance motor. :returns: The state. :rtype: (enum ‘HardwareRepositoryStates’)

get_value()[source]#

Read the value. :returns: value. :rtype: (float)

get_value_at_corner()[source]#

Get the resolution at the corners of the detector. :returns: Resolution [Å] :rtype: (float)

init()[source]#

Initialisation

resolution_to_distance(resolution=None, wavelength=None)[source]#

Convert resolution to distance. :param resolution: Resolution [Å]. Defaults to nominal value :type resolution: float :param wavelength: Wavelength [Å] (defaults to current wavelength) :type wavelength: float

Returns:

distance [mm].

Return type:

(float)

set_limits(limits)[source]#
Resolution limits are not settable.

Set the detector distance limits instead

Raises:

NotImplementedError

stop()[source]#

Stop the distance motor movement

update_distance(value=None)[source]#

Update the resolution when distance changed. :param value: Detector distance [mm]. :type value: float

update_energy(value)[source]#

Update the resolution when energy changed. :param value: Energy [keV] :type value: float