Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/abstract/tomodetector.py: 0%

20 statements  

« 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 

4 

5from daiquiri.core.hardware.abstract import HardwareObject 

6from daiquiri.core.schema.hardware import HardwareSchema 

7 

8import logging 

9 

10logger = logging.getLogger(__name__) 

11 

12 

13class _PropertiesSchema(HardwareSchema): 

14 state = fields.Str(metadata={"readOnly": True}) 

15 camera_pixel_size = fields.List( 

16 fields.Number(), metadata={"length": 2, "readOnly": True} 

17 ) 

18 actual_size = fields.List( 

19 fields.Integer(), metadata={"length": 2, "readOnly": True} 

20 ) 

21 sample_pixel_size_mode = fields.Str() 

22 user_sample_pixel_size = fields.Number() 

23 sample_pixel_size = fields.Number(metadata={"readOnly": True}) 

24 field_of_view = fields.Number(metadata={"readOnly": True}) 

25 detector = fields.Str(metadata={"readOnly": True}) 

26 optic = fields.Str(metadata={"readOnly": True}) 

27 source_distance = fields.Number(allow_none=True, metadata={"readOnly": True}) 

28 acq_mode = fields.Str() 

29 

30 

31class TomoDetector(HardwareObject): 

32 _type = "tomodetector" 

33 _properties = _PropertiesSchema()