Skip to content

ketek

borealis.detector.ketek

Created on Sat Jan 8 12:54:49 2022.

@author: A. Vancraeyenest

KetekAXASM(ini_filepath, alias='Ketek-AXAS M')

Bases: Detector

Class to operate KETEK detector AXAS-M.

Initialise the detector.

Source code in borealis/detector/ketek.py
28
29
30
31
32
33
34
35
36
37
def __init__(self, ini_filepath: str, alias: str = "Ketek-AXAS M"):
    """Initialise the detector."""
    super().__init__(alias)
    self._ini_file = self._validate_ini(ini_filepath)
    self._chan_no = 0
    self._initialise(self._ini_file)
    self._start_system()
    self.serial_number = self._get_serial_number()

    LOGGER.info("Detector %s successfully initialised", self)

acquisition(acquisition_time)

Start an acquisition and return corresponding Spectrum object.

Source code in borealis/detector/ketek.py
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
def acquisition(self, acquisition_time: float):
    """Start an acquisition and return corresponding Spectrum object."""
    self._start_run()
    sleep(acquisition_time)
    self._stop_run()
    mca_counts = self._get_spectrum()
    run_stat = self._get_all_run_stats()

    mca_metadata = MCAMetadata(run_stat['runtime'],
                               run_stat['ICR'],
                               run_stat['OCR'],
                               self.get_det_info())
    mca = MCA(mca_counts, mca_metadata)

    return mca

stop()

Close the connection to the detector and free resources.

Wrap xiaExit. Disconnect from the hardware and clean up Handel’s internals.

Source code in borealis/detector/ketek.py
55
56
57
58
59
60
61
62
63
64
def stop(self):
    """
    Close the connection to the detector and free resources.

    Wrap xiaExit.
    Disconnect from the hardware and clean up Handel’s internals.

    """
    ret_code = self.HANDEL.xiaExit()
    check_error(ret_code)