Skip to content

advacam

borealis.detector.advacam

MinipixTPX3()

Bases: Detector

Provide support for Advacam Minipix TPX3.

Borealis currently only provides Windows libraries for Minipix TPX3.

Open the communication with Minipix detector

Source code in borealis/detector/advacam.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
def __init__(self):
    """Open the communication with Minipix detector"""
    with contextlib.chdir(pixet_dir):
        pypixet.start()
        self.pixet = pypixet.pixet
        # TODO: .devicesByType(pixet.PX_DEVTYPE_TPX3) only if I can get a TPX3 virtual device when none connected
        devices = self.pixet.devices()
        self.device = devices[0]

    full_name = self.device.fullName()
    dev_info = self.pixet.DevInfo()
    self.device.deviceInfo(dev_info)

    self.serial_number = dev_info.serial

    # TODO: turn into property +  enun for possible modes (cf doc)
    self.device.setOperationMode(self.pixet.PX_TPX3_OPM_EVENT_ITOT)

    # TODO:  turn into property
    self.device.setThreshold(self.pixet.PX_CHIP_ALL, 4, self.pixet.PX_THLFLG_ENERGY)

    # TODO: turn into property
    self.nb_of_frame = 1

    self.width = self.device.width()
    self.height = self.device.height()

    super().__init__(full_name)