mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 01:20:02 +02:00
WIP, doc
This commit is contained in:
parent
9505c51404
commit
27c1916d63
@ -777,6 +777,14 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def reg(self):
|
def reg(self):
|
||||||
|
"""
|
||||||
|
Reads/writes to a 32 bit register.
|
||||||
|
|
||||||
|
Note
|
||||||
|
-----
|
||||||
|
Advanced user Function! \n
|
||||||
|
[Eiger] Address is +0x100 for only left, +0x200 for only right.
|
||||||
|
"""
|
||||||
return self._register
|
return self._register
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -834,14 +842,18 @@ class Detector(CppDetectorApi):
|
|||||||
-----
|
-----
|
||||||
To set default rate correction, use setDefaultRateCorrection
|
To set default rate correction, use setDefaultRateCorrection
|
||||||
|
|
||||||
|
Known Issue
|
||||||
|
------------
|
||||||
|
:getter: Always give 0 due to the microseconds precision.
|
||||||
|
:setter: Use scientific notation to set custom rate correction, since timedelta resolution is 1 microseconds. \n
|
||||||
|
Or use setDefaultRateCorrection to set the default one from trimbit file
|
||||||
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
-----------
|
-----------
|
||||||
>>> d.ratecorr = 1.05
|
>>> d.ratecorr = 10e-9
|
||||||
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>> d.setDefaultRateCorrection()
|
||||||
>>> d.period
|
>>> d.ratecorr = 0.0
|
||||||
181.23
|
|
||||||
>>> d.getPeriod()
|
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
|
||||||
"""
|
"""
|
||||||
return reduce_time(self.getRateCorrection())
|
return reduce_time(self.getRateCorrection())
|
||||||
|
|
||||||
@ -1181,6 +1193,7 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def runclk(self):
|
def runclk(self):
|
||||||
|
"""[Ctb][Moench] Run clock in MHz."""
|
||||||
return element_if_equal(self.getRUNClock())
|
return element_if_equal(self.getRUNClock())
|
||||||
|
|
||||||
@runclk.setter
|
@runclk.setter
|
||||||
@ -1189,6 +1202,15 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def romode(self):
|
def romode(self):
|
||||||
|
"""
|
||||||
|
[CTB] Readout mode. Default is analog. Options: ANALOG_ONLY, DIGITAL_ONLY, ANALOG_AND_DIGITAL
|
||||||
|
|
||||||
|
Examples
|
||||||
|
--------
|
||||||
|
>>> d.romode = slsdet.readoutMode.ANALOG_ONLY
|
||||||
|
>>> d.romode
|
||||||
|
readoutMode.ANALOG_ONLY
|
||||||
|
"""
|
||||||
return element_if_equal(self.getReadoutMode())
|
return element_if_equal(self.getReadoutMode())
|
||||||
|
|
||||||
@romode.setter
|
@romode.setter
|
||||||
|
@ -1206,7 +1206,7 @@ class Detector {
|
|||||||
/** [CTB] */
|
/** [CTB] */
|
||||||
Result<defs::readoutMode> getReadoutMode(Positions pos = {}) const;
|
Result<defs::readoutMode> getReadoutMode(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [CTB] Options: ANALOG_ONLY = 0, DIGITAL_ONLY = 1, ANALOG_AND_DIGITAL */
|
/** [CTB] Options: ANALOG_ONLY, DIGITAL_ONLY, ANALOG_AND_DIGITAL */
|
||||||
void setReadoutMode(defs::readoutMode value, Positions pos = {});
|
void setReadoutMode(defs::readoutMode value, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB] */
|
/** [CTB] */
|
||||||
@ -1444,10 +1444,12 @@ class Detector {
|
|||||||
const std::string &hostname,
|
const std::string &hostname,
|
||||||
const std::string &fname, Positions pos = {});
|
const std::string &fname, Positions pos = {});
|
||||||
|
|
||||||
/** Advanced user Function! */
|
/** Advanced user Function! \n
|
||||||
|
* [Eiger] Address is +0x100 for only left, +0x200 for only right. */
|
||||||
Result<uint32_t> readRegister(uint32_t addr, Positions pos = {}) const;
|
Result<uint32_t> readRegister(uint32_t addr, Positions pos = {}) const;
|
||||||
|
|
||||||
/** Advanced user Function! */
|
/** Advanced user Function! \n
|
||||||
|
* [Eiger] Address is +0x100 for only left, +0x200 for only right. */
|
||||||
void writeRegister(uint32_t addr, uint32_t val, Positions pos = {});
|
void writeRegister(uint32_t addr, uint32_t val, Positions pos = {});
|
||||||
|
|
||||||
/** Advanced user Function! */
|
/** Advanced user Function! */
|
||||||
|
@ -1312,8 +1312,8 @@ std::string CmdProxy::RateCorrection(int action) {
|
|||||||
os << cmd << ' ';
|
os << cmd << ' ';
|
||||||
if (action == defs::HELP_ACTION) {
|
if (action == defs::HELP_ACTION) {
|
||||||
os << "[n_rate (in ns)]\n\t[Eiger] Dead time correction constant in "
|
os << "[n_rate (in ns)]\n\t[Eiger] Dead time correction constant in "
|
||||||
"ns. -1 will set to default tau of settings. 0 will unset rate "
|
"ns. -1 will set to default tau of settings from trimbit file. 0 "
|
||||||
"correction."
|
"will unset rate correction."
|
||||||
<< '\n';
|
<< '\n';
|
||||||
} else if (action == defs::GET_ACTION) {
|
} else if (action == defs::GET_ACTION) {
|
||||||
if (!args.empty()) {
|
if (!args.empty()) {
|
||||||
@ -2509,7 +2509,8 @@ std::string CmdProxy::Register(int action) {
|
|||||||
os << cmd << ' ';
|
os << cmd << ' ';
|
||||||
if (action == defs::HELP_ACTION) {
|
if (action == defs::HELP_ACTION) {
|
||||||
os << "[address] [32 bit value]\n\tReads/writes to a 32 bit register "
|
os << "[address] [32 bit value]\n\tReads/writes to a 32 bit register "
|
||||||
"in hex.\n\t[Eiger] +0x100 for only left, +0x200 for only right"
|
"in hex. Advanced Function!\n\t[Eiger] +0x100 for only left, "
|
||||||
|
"+0x200 for only right."
|
||||||
<< '\n';
|
<< '\n';
|
||||||
} else if (action == defs::GET_ACTION) {
|
} else if (action == defs::GET_ACTION) {
|
||||||
if (args.size() != 1) {
|
if (args.size() != 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user