mxcubecore.HardwareObjects.Beamline¶
Beamline class serving as singleton container for links to top-level HardwareObjects
All HardwareObjects
Classes
|
Beamline class serving as singleton container for links to HardwareObjects |
- class mxcubecore.HardwareObjects.Beamline.Beamline(name: str)[source]¶
Bases:
HardwareObjectBeamline 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:
- 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
- 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