mxcubeweb.core.adapter.wavelength_adapter#

Classes

WavelengthAdapter(ho, *args)

Adapter for wavelength Hardware Object, a web socket is used communicate information on longer running processes.

class mxcubeweb.core.adapter.wavelength_adapter.WavelengthAdapter(ho, *args)[source]#

Bases: ActuatorAdapterBase

Adapter for wavelength Hardware Object, a web socket is used communicate information on longer running processes.

get_value() FloatValueModel[source]#

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

Raises:

ValueError – When value for any reason can’t be retrieved.

Return type:

FloatValueModel

limits()[source]#

Read the wavelengt limits. :returns: Two floats (min, max) limits. :rtype: (tuple)

Raises:

ValueError – When limits for any reason can’t be retrieved.

read_only()[source]#

Check if the wavelength is read only or not. Retuns:

(bool): True if read only, False if not.

set_value(value: HOActuatorValueChangeModel)[source]#

Execute the sequence to set the value. :param value: Target wavelength [Å]. :type value: float

Returns:

The actual value set.

Return type:

(float as str)

Raises:
  • ValueError – Value not valid or attemp to set read only value.

  • RuntimeError – Timeout while setting the value.

  • StopItteration – When a value change was interrupted (abort/cancel).

Parameters:

value (HOActuatorValueChangeModel) –

state()[source]#

Get the state. :returns: The state :rtype: (str)

stop()[source]#

Stop the execution.