Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/abstract/optic.py: 0%
19 statements
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3from marshmallow import fields
5from daiquiri.core.hardware.abstract import HardwareObject
6from daiquiri.core.schema.hardware import HardwareSchema
8import logging
10logger = logging.getLogger(__name__)
13class OpticPropertiesSchema(HardwareSchema):
14 state = fields.String()
15 magnification = fields.Float()
16 available_magnifications = fields.List(fields.Float())
17 target_magnification = fields.Float()
18 magnification_range = fields.List(fields.Float(), metadata={"length": 2})
21class OpticCallablesSchema(HardwareSchema):
22 move = fields.Float()
25class Optic(HardwareObject):
26 _type = "optic"
28 _properties = OpticPropertiesSchema()
29 _callables = OpticCallablesSchema()
31 def move(self, value):
32 self.call("move", value)