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_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'advanced_methods': FieldInfo(annotation=list[str], required=False, default=[]), 'available_methods': FieldInfo(annotation=dict[str, bool], required=False, default={}), 'click_centring_num_clicks': FieldInfo(annotation=int, required=False, default=3), 'default_acquisition_parameters': FieldInfo(annotation=dict[str, Any], required=False, default={}), 'disable_num_passes': FieldInfo(annotation=bool, required=False, default=False), 'enable_2d_points': FieldInfo(annotation=bool, required=False, default=True), 'mesh_result_format': FieldInfo(annotation=str, required=False, default='PNG'), 'offline_processing_methods': FieldInfo(annotation=list[Any], required=False, default=[]), 'online_processing_methods': FieldInfo(annotation=list[Any], required=False, default=[]), 'run_number': FieldInfo(annotation=int, required=False, default=1), 'run_online_processing': FieldInfo(annotation=bool, required=False, default=False), 'tunable_wavelength': FieldInfo(annotation=bool, required=False, default=False), 'undulators': FieldInfo(annotation=list[Any], required=False, default=[]), 'use_native_mesh': FieldInfo(annotation=bool, required=False, default=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- 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