mxcubecore.HardwareObjects.Murko¶
Client of a murko server, loop and crystal segmentation of sample images.
murko: https://github.com/MartinSavko/murko. The server answers zmq REQ requests; the client needs pyzmq, which is only imported when it is used. Install it with the optional dependency: pip install “mxcubecore[murko]”.
Example yaml configuration:
class: mxcubecore.HardwareObjects.Murko.Murko configuration:
host: murko-server port: 8901 timeout: 10
Classes
|
Asks murko where the loop is in an image. |
Where murko sees the loop, in fractions of the image size. |
Exceptions
Murko cannot be reached, the queue should not go on without it. |
- class mxcubecore.HardwareObjects.Murko.Murko(name: str)[source]¶
Bases:
HardwareObjectAsks murko where the loop is in an image.
- Parameters:
name (str)
- class HOConfig(*, host: str = 'localhost', port: int = 8901, timeout: float = 10, **extra_data: Any)[source]¶
Bases:
HOConfig- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- predict(image) MurkoPrediction | None[source]¶
Find the loop in image.
- Parameters:
image – the image, as an array or JPEG bytes.
- Returns:
None when no loop is seen, otherwise where the loop is.
- Raises:
MurkoUnavailable – when murko does not answer within the timeout.
- Return type:
MurkoPrediction | None
- class mxcubecore.HardwareObjects.Murko.MurkoPrediction[source]¶
Bases:
TypedDictWhere murko sees the loop, in fractions of the image size.
Bases:
RuntimeErrorMurko cannot be reached, the queue should not go on without it.