mxcubeweb.core.adapter.detector_adapter#

Classes

DetectorAdapter(ho, role, app)

DisplayImageParams(*, path, img_num)

class mxcubeweb.core.adapter.detector_adapter.DetectorAdapter(ho, role, app)[source]#

Bases: AdapterBase

display_image(params: DisplayImageParams) dict[source]#

Notify ADXV and/or Braggy of the image to display.

Parameters:

params (DisplayImageParams) –

Return type:

dict

get_value() dict[source]#

Get the file suffix of the data files.

Return type:

dict

state()[source]#

Retrieve the state of the underlying hardware object as a JavaScript string.

Retrieves the state of the underlying hardware object and converts it to a str that can be used by the javascript front end.

Returns:

The state

Return type:

(str)

class mxcubeweb.core.adapter.detector_adapter.DisplayImageParams(*, path: Path, img_num: int)[source]#

Bases: BaseModel

Parameters:
  • path (Path) –

  • img_num (int) –

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'img_num': FieldInfo(annotation=int, required=True, description='Index of the image to display'), 'path': FieldInfo(annotation=Path, required=True, description="Path to images' masterfile", metadata=[PathType(path_type='file')])}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.