mxcubeweb.core.adapter.wavelength_adapter#

Classes

WavelengthAdapter(ho, *args)

Adapter for wavelength Hardware Object.

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

Bases: ActuatorAdapterBase

Adapter for wavelength Hardware Object.

A web socket is used to communicate information on longer running processes.

get_value() FloatValueModel[source]#

Read the wavelength value.

Returns:

Wavelength [Å].

Return type:

(float as str)

Raises:

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

limits()[source]#

Read the wavelengt limits.

Returns:

Two floats (min, max) limits.

Return type:

(tuple)

Raises:

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

read_only()[source]#

Check if the wavelength is read only or not.

Returns:

True if read only, False if not.

Return type:

(bool)

set_value(value: HOActuatorValueChangeModel)[source]#

Execute the sequence to set the value.

Parameters:

value (float) – Target wavelength [Å].

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).

state()[source]#

Get the state.

Returns:

The state

Return type:

(str)

stop()[source]#

Stop the execution.