M3: polarity, interpolation, pump probe (#421)

* wip, adding m3 functions: polarity, inerpolation, pumpprobe

* added interpol, polarity, pump probe, analog pulsing, digital pulsing

* tests

* binaries in

* update release

* added python polarity enum

* fixed python and minor readability in mythen3.c

* binarie sin

* added all the m3 funcs also in list.c and enablingall counters for enabling interpolation

* binarie sin
This commit is contained in:
Dhanya Thattil
2022-04-08 15:18:01 +02:00
committed by GitHub
parent 27c7fd9a97
commit 52882cba20
28 changed files with 901 additions and 142 deletions

View File

@ -642,6 +642,17 @@ std::string ToString(const defs::gainMode s) {
}
}
std::string ToString(const defs::polarity s) {
switch (s) {
case defs::POSITIVE:
return std::string("pos");
case defs::NEGATIVE:
return std::string("neg");
default:
return std::string("Unknown");
}
}
const std::string &ToString(const std::string &s) { return s; }
template <> defs::detectorType StringTo(const std::string &s) {
@ -1055,6 +1066,14 @@ template <> defs::gainMode StringTo(const std::string &s) {
throw sls::RuntimeError("Unknown gain mode " + s);
}
template <> defs::polarity StringTo(const std::string &s) {
if (s == "pos")
return defs::POSITIVE;
if (s == "neg")
return defs::NEGATIVE;
throw sls::RuntimeError("Unknown polarity mode " + s);
}
template <> uint32_t StringTo(const std::string &s) {
int base = s.find("0x") != std::string::npos ? 16 : 10;
return std::stoul(s, nullptr, base);