Blame view

src/common/VISCamera.py 1.05 KB
ec372f36   haribo   Date: 28/06/2016
1
2
3
from pyrosapp.models import *
from .Device import DeviceObj
from enum import Enum
ad85da7c   haribo   Date: 28/06/2016
4
from .FilterWheel import FilterWheelObj
ec372f36   haribo   Date: 28/06/2016
5
6
7
8
9
10
11
12
13
14

class ReadmodeEnum(Enum):
    ramp = "Ramp"
    # TODO: définir les modes de lecture

class ShutterEnum(Enum):
    synchro = "Synchro"
    closed = "Closed"
    opened = "Opened"

ad85da7c   haribo   Date: 28/06/2016
15
16
17
class VISCameraObj(DeviceObj):

    filter_wheel = FilterWheelObj()
ec372f36   haribo   Date: 28/06/2016
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

    def __init__(self):
        super().__init__()

        self.set_msgs = [
            ("WINDOW", [4, ], int),
            ("READMODE", [1, ], ReadmodeEnum),
            ("FILENAME", [1, ], str),
            ("HEADER", [1, ], dict),
            ("READOUT_FREQUENCY", [1, ], float),
            ("EXPOSURE", [1, ], int),
            ("BINNING", [2, ], int),
        ]

        self.get_msgs = [
            "STATUS",
            "SETUP",
            "TEMPERATURE",
            "TIMER",
        ]

        self.do_msgs = [
            ("COOLER", [2, ], float),
            ("SHUTTER", [1, ], ShutterEnum),
            ("START", [0, ]),
            ("ABORT", [0, ]),
            ("STOP", [0, ]),
        ]