detector_base
borealis.detector.detector_base
Created on Fri May 13 14:48:59 2022.
@author: A. Vancraeyenest
Detector(alias='')
Bases: SensorComponent
Abstract base class for Detector classes.
Defines the public API of any detector class.
ABC method for detector initialisation. (derived must override).
Inherited class must call super().init(alias=
Source code in borealis/detector/detector_base.py
28 29 30 31 32 33 34 35 36 37 38 39 40 | |
__str__()
Custom str method for Detector class (DO NOT OVERWRITE THIS METHOD).
Source code in borealis/detector/detector_base.py
42 43 44 | |
acquisition(acquisition_time)
abstractmethod
ABC method for acquisition (derived must override).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
acquisition_time
|
float
|
Acquisition time in seconds. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
mca |
MCA
|
MCA object with spectrum counts and metadata. |
Source code in borealis/detector/detector_base.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
get_det_info()
Return the detector info as dictionary (stored in the MCA metadata).
Source code in borealis/detector/detector_base.py
67 68 69 70 71 | |
log(level, msg, *args, **kwargs)
Log a message with prepending the device's alias in front of the message.
Source code in borealis/detector/detector_base.py
81 82 83 84 | |
stop()
abstractmethod
ABC method for stopping detector. (derived must override).
Source code in borealis/detector/detector_base.py
63 64 65 | |
DummyDet(alias='DummyDet')
Bases: Detector
When in need for a detector but no access to a real device.
Source code in borealis/detector/detector_base.py
97 98 99 | |