documentation, wip

This commit is contained in:
maliakal_d 2021-06-08 12:14:06 +02:00
parent e00c62a7a5
commit 6f54291a84
4 changed files with 21 additions and 16 deletions

View File

@ -1749,7 +1749,7 @@ class Detector(CppDetectorApi):
Note Note
---- ----
[Eiger] Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same value. \n [Eiger] Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same value. \n
[Mythen3] Sets vth1, vth2 and vth3 to the same value. [Mythen3] Sets vth1, vth2 and vth3 to the same value for enabled counters.
""" """
return self.getDAC(dacIndex.VTHRESHOLD) return self.getDAC(dacIndex.VTHRESHOLD)
@ -2381,6 +2381,7 @@ class Detector(CppDetectorApi):
Note Note
----- -----
Each element in list can be 0 - 2 and must be non repetitive. Each element in list can be 0 - 2 and must be non repetitive.
Enabling counters sets vth dacs to remembered values and disabling sets them to disabled values.
Example Example
----------- -----------

View File

@ -1273,7 +1273,9 @@ class Detector {
/** [Mythen3] */ /** [Mythen3] */
Result<uint32_t> getCounterMask(Positions pos = {}) const; Result<uint32_t> getCounterMask(Positions pos = {}) const;
/** [Mythen3] countermask bit set for each counter index enabled */ /** [Mythen3] countermask bit set for each counter index enabled. Enabling
* counters sets vth dacs to remembered values and disabling sets them to
* disabled values. Setting vth dacs explicitly overwrites them. */
void setCounterMask(uint32_t countermask, Positions pos = {}); void setCounterMask(uint32_t countermask, Positions pos = {});
Result<int> getNumberOfGates(Positions pos = {}) const; Result<int> getNumberOfGates(Positions pos = {}) const;
@ -1308,8 +1310,7 @@ class Detector {
Result<bool> getMaster(Positions pos = {}) const; Result<bool> getMaster(Positions pos = {}) const;
// TODO! check if we really want to expose this !!!!!
//TODO! check if we really want to expose this !!!!!
Result<int> getChipStatusRegister(Positions pos = {}) const; Result<int> getChipStatusRegister(Positions pos = {}) const;
void setGainCaps(int caps, Positions pos = {}); void setGainCaps(int caps, Positions pos = {});

View File

@ -1867,7 +1867,8 @@ std::string CmdProxy::Counters(int action) {
if (action == defs::HELP_ACTION) { if (action == defs::HELP_ACTION) {
os << "[i0] [i1] [i2]... \n\t[Mythen3] List of counters indices " os << "[i0] [i1] [i2]... \n\t[Mythen3] List of counters indices "
"enabled. Each element in list can be 0 - 2 and must be non " "enabled. Each element in list can be 0 - 2 and must be non "
"repetitive." "repetitive. Enabling counters sets vth dacs to remembered "
"values and disabling sets them to disabled values."
<< '\n'; << '\n';
} else if (action == defs::GET_ACTION) { } else if (action == defs::GET_ACTION) {
if (!args.empty()) { if (!args.empty()) {
@ -1981,12 +1982,12 @@ std::string CmdProxy::GateDelay(int action) {
return os.str(); return os.str();
} }
std::string CmdProxy::GainCaps(int action) {
std::string CmdProxy::GainCaps(int action){
std::ostringstream os; std::ostringstream os;
os << cmd << ' '; os << cmd << ' ';
if (action == defs::HELP_ACTION) { if (action == defs::HELP_ACTION) {
os << "[cap1, cap2, ...]\n\t[Mythen3] gain, options: C10pre, C15sh, C30sh, C50sh, C225ACsh, C15pre" os << "[cap1, cap2, ...]\n\t[Mythen3] gain, options: C10pre, C15sh, "
"C30sh, C50sh, C225ACsh, C15pre"
<< '\n'; << '\n';
} else if (action == defs::GET_ACTION) { } else if (action == defs::GET_ACTION) {
if (!args.empty()) if (!args.empty())
@ -1994,7 +1995,7 @@ std::string CmdProxy::GainCaps(int action){
auto tmp = det->getGainCaps(); auto tmp = det->getGainCaps();
sls::Result<defs::M3_GainCaps> csr; sls::Result<defs::M3_GainCaps> csr;
for (auto val : tmp){ for (auto val : tmp) {
if (val) if (val)
csr.push_back(static_cast<defs::M3_GainCaps>(val)); csr.push_back(static_cast<defs::M3_GainCaps>(val));
} }
@ -2005,7 +2006,7 @@ std::string CmdProxy::GainCaps(int action){
WrongNumberOfParameters(1); WrongNumberOfParameters(1);
} }
int caps = 0; int caps = 0;
for (const auto& arg:args){ for (const auto &arg : args) {
if (arg != "0") if (arg != "0")
caps |= sls::StringTo<defs::M3_GainCaps>(arg); caps |= sls::StringTo<defs::M3_GainCaps>(arg);
} }

View File

@ -10,7 +10,8 @@ std::string GetHelpDac(std::string dac) {
"[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] " "[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] "
"Detector threshold voltage for single photon counters.\n\t[Eiger] " "Detector threshold voltage for single photon counters.\n\t[Eiger] "
"Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same " "Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same "
"value. \n\t[Mythen3] Sets vth1, vth2 and vth3 to the same value."); "value. \n\t[Mythen3] Sets vth1, vth2 and vth3 to the same value "
"for enabled counters.");
} }
if (dac == "vsvp") { if (dac == "vsvp") {
return std::string( return std::string(
@ -134,17 +135,18 @@ std::string GetHelpDac(std::string dac) {
if (dac == "vth1") { if (dac == "vth1") {
return std::string( return std::string(
"[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for first " "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for first "
"detector threshold voltage."); "detector threshold voltage. Overwrites even if counter disabled.");
} }
if (dac == "vth2") { if (dac == "vth2") {
return std::string( return std::string(
"[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for " "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for "
"second detector threshold voltage."); "second detector threshold voltage. Overwrites even if counter "
"disabled.");
} }
if (dac == "vth3") { if (dac == "vth3") {
return std::string( return std::string(
"[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for third " "[dac or mV value][(optional unit) mV] \n\t[Mythen3] Dac for third "
"detector threshold voltage."); "detector threshold voltage. Overwrites even if counter disabled.");
} }
if (dac == "vcal_n") { if (dac == "vcal_n") {
return std::string( return std::string(