mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
ctb adc names (#757)
* first draft of adc names * fixed tests * formatting * added python functions in src --------- Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
@ -1766,7 +1766,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def daclist(self):
|
||||
"""
|
||||
List of enums for every dac for this detector.
|
||||
List of enums/names for every dac for this detector.
|
||||
:setter: Only implemented for Chiptestboard
|
||||
|
||||
"""
|
||||
@ -1776,6 +1776,20 @@ class Detector(CppDetectorApi):
|
||||
def daclist(self, value):
|
||||
self.setDacNames(value)
|
||||
|
||||
@property
|
||||
def adclist(self):
|
||||
"""
|
||||
List of names for every adc for this detector.
|
||||
:setter: Only implemented for Chiptestboard
|
||||
|
||||
"""
|
||||
return self.getAdcNames()
|
||||
|
||||
@adclist.setter
|
||||
def adclist(self, value):
|
||||
self.setAdcNames(value)
|
||||
|
||||
|
||||
@property
|
||||
def dacvalues(self):
|
||||
"""Gets the dac values for every dac for this detector."""
|
||||
|
@ -1647,10 +1647,33 @@ void init_det(py::module &m) {
|
||||
(defs::dacIndex(Detector::*)(const std::string &)) &
|
||||
Detector::getDacIndex,
|
||||
py::arg());
|
||||
CppDetectorApi.def(
|
||||
"setDacName",
|
||||
(void (Detector::*)(defs::dacIndex, const std::string &)) &
|
||||
Detector::setDacName,
|
||||
py::arg(), py::arg());
|
||||
CppDetectorApi.def("getDacName",
|
||||
(std::string(Detector::*)(defs::dacIndex)) &
|
||||
Detector::getDacName,
|
||||
py::arg());
|
||||
CppDetectorApi.def("setAdcNames",
|
||||
(void (Detector::*)(const std::vector<std::string>)) &
|
||||
Detector::setAdcNames,
|
||||
py::arg());
|
||||
CppDetectorApi.def("getAdcNames",
|
||||
(std::vector<std::string>(Detector::*)() const) &
|
||||
Detector::getAdcNames);
|
||||
CppDetectorApi.def("getAdcIndex",
|
||||
(int (Detector::*)(const std::string &)) &
|
||||
Detector::getAdcIndex,
|
||||
py::arg());
|
||||
CppDetectorApi.def("setAdcName",
|
||||
(void (Detector::*)(const int, const std::string &)) &
|
||||
Detector::setAdcName,
|
||||
py::arg(), py::arg());
|
||||
CppDetectorApi.def("getAdcName",
|
||||
(std::string(Detector::*)(int)) & Detector::getAdcName,
|
||||
py::arg());
|
||||
CppDetectorApi.def(
|
||||
"setPattern",
|
||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||
|
Reference in New Issue
Block a user