mxcubecore.HardwareObjects.Beamline

Beamline class serving as singleton container for links to top-level HardwareObjects

All HardwareObjects

Classes

Beamline(name)

Beamline class serving as singleton container for links to HardwareObjects

class mxcubecore.HardwareObjects.Beamline.Beamline(name: str)[source]

Bases: HardwareObject

Beamline class serving as singleton container for links to HardwareObjects

Parameters:

name (str)

class HOConfig(*, advanced_methods: list[str] = [], available_methods: dict[str, bool] = {}, click_centring_num_clicks: int = 3, tunable_wavelength: bool = False, disable_num_passes: bool = False, run_online_processing: bool = False, offline_processing_methods: list[Any] = [], online_processing_methods: list[Any] = [], default_acquisition_parameters: dict[str, Any] = {}, run_number: int = 1, undulators: list[Any] = [], mesh_result_format: str = 'PNG', use_native_mesh: bool = True, enable_2d_points: bool = True, **extra_data: Any)[source]

Bases: HOConfig

Parameters:
  • advanced_methods (list[str])

  • available_methods (dict[str, bool])

  • click_centring_num_clicks (int)

  • tunable_wavelength (bool)

  • disable_num_passes (bool)

  • run_online_processing (bool)

  • offline_processing_methods (list[Any])

  • online_processing_methods (list[Any])

  • default_acquisition_parameters (dict[str, Any])

  • run_number (int)

  • undulators (list[Any])

  • mesh_result_format (str)

  • use_native_mesh (bool)

  • enable_2d_points (bool)

  • extra_data (Any)

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

emit(signal: str | object | Any, *args) → None[source]

Emit signal. Accepts both multiple args and a single tuple of args.

This is needed for communication from the GUI to the core (jsonparamsgui in mxcubeqt)

NBNB TODO HACK This is a duplicate of the same function in HardwareObjectMixin. Since the Beamline is not a CommandContainer or a normal HardwareObject it may not be appropriate to make it a subclass of HardwareObjectYaml We need to consider how we want this organised

Parameters:
  • signal (Union[str, object, Any]) – In practice a string, or dispatcher.

  • *args (tuple) – Arguments sent with signal.

Return type:

None

force_emit_signals()[source]

Emits all hardware object signals

The method is called from the gui via beamline object to ensure that bricks have values after the initialization. Problem arise when a hardware object is used by several bricks. If first brick connects to some signal emitted by a brick then other bricks connecting to the same signal will not receive the values on the startup. The easiest solution is to call force_emit_signals method directly after the initialization of the beamline object

get_default_acquisition_parameters(acquisition_type='default')[source]
Returns:

A AcquisitionParameters object with all default parameters for the specified acquisition type. “default” is a standard acqquisition

get_default_path_template()[source]
Returns:

A PathTemplate object with default parameters.

init()[source]

Object initialisation - executed after loading contents