mxcubecore.HardwareObjects.abstract.AbstractEnergy#

Abstract Energy and Wavelength class. Defines the get/set wavelength, get_wavelength_limits methods and is_tunable property. Implements update_value. Emits signals valueChanged and attributeChanged.

Classes

AbstractEnergy(name)

Abstract Energy and Wavelength

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

Bases: AbstractActuator

Abstract Energy and Wavelength

calculate_energy(wavelength=None)[source]#

Calculate energy from wavelength :param value: wavelength [Å] :type value: (float

Returns:

Energy [keV]

Return type:

(float)

calculate_wavelength(energy=None)[source]#

Calculate wavelength from energy :param energy: Energy [keV] :type energy: float

Returns:

wavelength [Å]

Return type:

(float)

force_emit_signals()[source]#

Forces to emit all signals.

Method is called from gui Do not call it within HWR

get_wavelength()[source]#

Read the wavelength :returns: Wavelength [Å]. :rtype: (float)

get_wavelength_limits()[source]#

Return wavelength low and high limits. :returns: two floats tuple (low limit, high limit) [Å]. :rtype: (tuple)

is_ready()[source]#

Check if the state is ready. :returns: True if ready, False otherwise. :rtype: (bool)

property is_tunable#

Check if not fixed energy. :returns: True if tunable, False if fixed energy. :rtype: (bool)

set_wavelength(value, timeout=None)[source]#

Move motor to absolute value. Wait the move to finish. :param value: target position [keV] :type value: float :param timeout: optional - timeout [s].

if timeout = 0: return at once and do not wait if timeout is None: wait forever

update_value(value=None)[source]#

Emist signal energyChanged for both energy and wavelength Argin:

value: Not used, but kept in the method signature.