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
----
[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)
@ -2381,6 +2381,7 @@ class Detector(CppDetectorApi):
Note
-----
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
-----------

View File

@ -1273,7 +1273,9 @@ class Detector {
/** [Mythen3] */
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 = {});
Result<int> getNumberOfGates(Positions pos = {}) const;
@ -1308,8 +1310,7 @@ class Detector {
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;
void setGainCaps(int caps, Positions pos = {});

View File

@ -1867,7 +1867,8 @@ std::string CmdProxy::Counters(int action) {
if (action == defs::HELP_ACTION) {
os << "[i0] [i1] [i2]... \n\t[Mythen3] List of counters indices "
"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';
} else if (action == defs::GET_ACTION) {
if (!args.empty()) {
@ -1981,12 +1982,12 @@ std::string CmdProxy::GateDelay(int action) {
return os.str();
}
std::string CmdProxy::GainCaps(int action){
std::string CmdProxy::GainCaps(int action) {
std::ostringstream os;
os << cmd << ' ';
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';
} else if (action == defs::GET_ACTION) {
if (!args.empty())
@ -1994,22 +1995,22 @@ std::string CmdProxy::GainCaps(int action){
auto tmp = det->getGainCaps();
sls::Result<defs::M3_GainCaps> csr;
for (auto val : tmp){
for (auto val : tmp) {
if (val)
csr.push_back(static_cast<defs::M3_GainCaps>(val));
}
os << OutString(csr) << '\n';
} else if (action == defs::PUT_ACTION) {
if (args.size() < 1) {
WrongNumberOfParameters(1);
}
int caps = 0;
for (const auto& arg:args){
for (const auto &arg : args) {
if (arg != "0")
caps |= sls::StringTo<defs::M3_GainCaps>(arg);
}
det->setGainCaps(caps);
os << OutString(args) << '\n';
} else {

View File

@ -10,7 +10,8 @@ std::string GetHelpDac(std::string dac) {
"[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] "
"Detector threshold voltage for single photon counters.\n\t[Eiger] "
"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") {
return std::string(
@ -134,17 +135,18 @@ std::string GetHelpDac(std::string dac) {
if (dac == "vth1") {
return std::string(
"[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") {
return std::string(
"[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") {
return std::string(
"[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") {
return std::string(