mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer
This commit is contained in:
commit
bd6d212f99
@ -80,8 +80,8 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
Frees shared memory before loading configuration file. This function does not support ~ for home.
|
||||
|
||||
Frees shared memory before loading configuration file.
|
||||
Set up once.
|
||||
|
||||
:getter: Not implemented
|
||||
:setter: Loads config file
|
||||
@ -809,6 +809,13 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def auto_comp_disable(self):
|
||||
"""[Jungfrau] Enable or disable auto comparator disable mode.
|
||||
|
||||
Note
|
||||
-----
|
||||
By default, the on-chip gain switching is active during the entire exposure. This mode disables the on-chip gain switching comparator automatically after 93.75% of exposure time (only for longer than 100us).\n
|
||||
Default is 0 or this mode disabled (comparator enabled throughout). 1 enables mode. 0 disables mode.
|
||||
"""
|
||||
return self.getAutoCompDisable()
|
||||
|
||||
@auto_comp_disable.setter
|
||||
@ -916,7 +923,16 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def counters(self):
|
||||
"""
|
||||
[Mythen3] List of counters enabled. Each element in list can be 0 - 2 and must be non repetitive.
|
||||
[Mythen3] List of counter indices enabled.
|
||||
|
||||
Note
|
||||
-----
|
||||
Each element in list can be 0 - 2 and must be non repetitive.
|
||||
|
||||
Examples
|
||||
-----------
|
||||
>>> d.counters = [0, 1]
|
||||
|
||||
"""
|
||||
mask = self.getCounterMask()
|
||||
mask = element_if_equal(mask)
|
||||
@ -951,6 +967,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def asamples(self):
|
||||
"""[Ctb][Moench] Number of analog samples expected. """
|
||||
return element_if_equal(self.getNumberOfAnalogSamples())
|
||||
|
||||
@asamples.setter
|
||||
@ -967,6 +984,12 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def dbitphase(self):
|
||||
"""[Ctb][Jungfrau] Phase shift of clock to latch digital bits. Absolute phase shift.
|
||||
|
||||
Note
|
||||
-----
|
||||
[Ctb]Changing dbitclk also resets dbitphase and sets to previous values.
|
||||
"""
|
||||
return element_if_equal(self.getDBITPhase())
|
||||
|
||||
@dbitphase.setter
|
||||
@ -975,6 +998,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def dbitclk(self):
|
||||
"""[Ctb] Clock for latching the digital bits in MHz."""
|
||||
return element_if_equal(self.getDBITClock())
|
||||
|
||||
@dbitclk.setter
|
||||
@ -983,6 +1007,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def dbitpipeline(self):
|
||||
""" [Ctb] Pipeline of the clock for latching digital bits. """
|
||||
return element_if_equal(self.getDBITPipeline())
|
||||
|
||||
@dbitpipeline.setter
|
||||
@ -1019,9 +1044,9 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
| [Jungfrau] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.
|
||||
| [Ctb][Moench] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.
|
||||
| [Gotthard] Relative phase shift.
|
||||
[Jungfrau] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n
|
||||
[Ctb][Moench] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.\n
|
||||
[Gotthard] Relative phase shift.
|
||||
|
||||
:getter: Not implemented for Gotthard
|
||||
"""
|
||||
@ -1033,8 +1058,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def adcpipeline(self):
|
||||
"""[Ctb][Moench] Sets pipeline for ADC clock.
|
||||
"""
|
||||
"""[Ctb][Moench] Sets pipeline for ADC clock. """
|
||||
return element_if_equal(self.getADCPipeline())
|
||||
|
||||
@adcpipeline.setter
|
||||
@ -1043,8 +1067,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def adcclk(self):
|
||||
"""[Ctb][Moench] Sets ADC clock frequency in MHz.
|
||||
"""
|
||||
"""[Ctb][Moench] Sets ADC clock frequency in MHz. """
|
||||
return element_if_equal(self.getADCClock())
|
||||
|
||||
@adcclk.setter
|
||||
|
@ -46,8 +46,11 @@ class Detector {
|
||||
* belonging to it */
|
||||
void freeSharedMemory();
|
||||
|
||||
/** Frees shared memory before loading configuration file. Set up once
|
||||
* normally */
|
||||
void loadConfig(const std::string &fname);
|
||||
|
||||
/** Shared memory not freed prior. Set up per measurement. */
|
||||
void loadParameters(const std::string &fname);
|
||||
|
||||
Result<std::string> getHostname(Positions pos = {}) const;
|
||||
@ -256,13 +259,21 @@ class Detector {
|
||||
/** [Gotthard][Jungfrau][CTB][Moench] */
|
||||
Result<int> getADCPhaseInDegrees(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Moench] */
|
||||
/** [Gotthard][Jungfrau][CTB][Moench]
|
||||
* [Jungfrau] Absolute phase shift. Changing Speed also resets adcphase to
|
||||
* recommended defaults. \n
|
||||
* [Ctb][Moench] Absolute phase shift. Changing adcclk also resets adcphase
|
||||
* and sets it to previous values. \n
|
||||
* [Gotthard] Relative phase shift
|
||||
*/
|
||||
void setADCPhaseInDegrees(int value, Positions pos = {});
|
||||
|
||||
/** [CTB][Jungfrau] */
|
||||
Result<int> getDBITPhase(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Jungfrau] */
|
||||
/** [CTB][Jungfrau] Absolute phase shift \n
|
||||
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
||||
*/
|
||||
void setDBITPhase(int value, Positions pos = {});
|
||||
|
||||
/** [CTB][Jungfrau] */
|
||||
@ -271,7 +282,9 @@ class Detector {
|
||||
/** [CTB][Jungfrau] */
|
||||
Result<int> getDBITPhaseInDegrees(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Jungfrau] */
|
||||
/** [CTB][Jungfrau] Absolute phase shift \n
|
||||
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
||||
*/
|
||||
void setDBITPhaseInDegrees(int value, Positions pos = {});
|
||||
|
||||
/** [Mythen3][Gotthard2] Hz */
|
||||
@ -925,7 +938,10 @@ class Detector {
|
||||
* //TODO naming
|
||||
* By default, the on-chip gain switching is active during the entire
|
||||
* exposure. This mode disables the on-chip gain switching comparator
|
||||
* automatically after 93.75% of exposure time (only for longer than 100us).
|
||||
* automatically after 93.75% of exposure time (only for longer than
|
||||
* 100us).\n
|
||||
* Default is false or this mode disabled(comparator enabled throughout).
|
||||
* true enables " "mode. 0 disables mode.
|
||||
*/
|
||||
void setAutoCompDisable(bool value, Positions pos = {});
|
||||
|
||||
@ -1075,7 +1091,7 @@ class Detector {
|
||||
/** [Mythen3] */
|
||||
Result<uint32_t> getCounterMask(Positions pos = {}) const;
|
||||
|
||||
/** [Mythen3] countermask bit set for each counter enabled */
|
||||
/** [Mythen3] countermask bit set for each counter index enabled */
|
||||
void setCounterMask(uint32_t countermask, Positions pos = {});
|
||||
|
||||
Result<int> getNumberOfGates(Positions pos = {}) const;
|
||||
|
@ -564,14 +564,12 @@ std::string CmdProxy::Adcphase(int action) {
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_value] "
|
||||
"[(optional)deg]\n\t[Jungfrau][Ctb][Moench][Gotthard] "
|
||||
"Phase "
|
||||
"shift of ADC clock. \n\t[Jungfrau] Absolute phase shift. If deg "
|
||||
"used, then shift in degrees. Changing Speed also resets "
|
||||
"Phase shift of ADC clock. \n\t[Jungfrau] Absolute phase shift. "
|
||||
"If deg used, then shift in degrees. Changing Speed also resets "
|
||||
"adcphase to recommended defaults.\n\t[Ctb][Moench] Absolute "
|
||||
"phase "
|
||||
"shift. If deg used, then shift in degrees. Changing adcclk also "
|
||||
"resets adcphase and sets it to previous values.\n\t[Gotthard] "
|
||||
"Relative phase shift. Cannot get"
|
||||
"phase shift. If deg used, then shift in degrees. Changing "
|
||||
"adcclk also resets adcphase and sets it to previous "
|
||||
"values.\n\t[Gotthard] Relative phase shift. Cannot get"
|
||||
<< '\n';
|
||||
} else {
|
||||
auto det_type = det->getDetectorType().squash(defs::GENERIC);
|
||||
@ -622,11 +620,9 @@ std::string CmdProxy::Dbitphase(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau] Phase shift of "
|
||||
"clock to "
|
||||
"latch digital bits. Absolute phase shift. If deg used, then "
|
||||
"shift in degrees. \n\t[Ctb]Changing dbitclk also resets "
|
||||
"dbitphase and "
|
||||
"sets to previous values."
|
||||
"clock to latch digital bits. Absolute phase shift. If deg used, "
|
||||
"then shift in degrees. \n\t[Ctb]Changing dbitclk also resets "
|
||||
"dbitphase and sets to previous values."
|
||||
<< '\n';
|
||||
} else {
|
||||
auto det_type = det->getDetectorType().squash(defs::GENERIC);
|
||||
@ -1764,8 +1760,9 @@ std::string CmdProxy::Counters(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[i0] [i1] [i2]... \n\t[Mythen3] List of counters enabled. Each "
|
||||
"element in list can be 0 - 2 and must be non repetitive."
|
||||
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."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
|
@ -1103,7 +1103,7 @@ class CmdProxy {
|
||||
/* configuration */
|
||||
EXECUTE_SET_COMMAND_NOID_1ARG(
|
||||
config, loadConfig,
|
||||
"[fname]\n\tConfigures detector to configuration contained in fname. "
|
||||
"[fname]\n\tFrees shared memory before loading configuration file. "
|
||||
"Set up once.");
|
||||
|
||||
EXECUTE_SET_COMMAND_NOID_1ARG(
|
||||
@ -1953,11 +1953,12 @@ class CmdProxy {
|
||||
INTEGER_COMMAND(
|
||||
auto_comp_disable, getAutoCompDisable, setAutoCompDisable,
|
||||
StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau] Auto comparator disable mode. Default 0 or this "
|
||||
"mode disabled(comparator enabled throughout). 1 enables mode. 0 "
|
||||
"disables mode. This mode disables the on-chip gain switching "
|
||||
"comparator automatically after 93.75% of exposure time (only for "
|
||||
"longer than 100us).");
|
||||
"[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By default, the "
|
||||
"on-chip gain switching is active during the entire exposure.This mode "
|
||||
"disables the on - chip gain switching comparator automatically after "
|
||||
"93.75% of exposure time (only for longer than 100us). \n\tDefault is "
|
||||
"0 or this mode disabled(comparator enabled throughout). 1 enables "
|
||||
"mode. 0 disables mode. ");
|
||||
|
||||
INTEGER_COMMAND_NOID(
|
||||
storagecells, getNumberOfAdditionalStorageCells,
|
||||
@ -2028,7 +2029,7 @@ class CmdProxy {
|
||||
INTEGER_COMMAND(
|
||||
asamples, getNumberOfAnalogSamples, setNumberOfAnalogSamples,
|
||||
StringTo<int>,
|
||||
"[0, 1]\n\t[CTB][Moench] Number of analog samples expected.");
|
||||
"[n_samples]\n\t[CTB][Moench] Number of analog samples expected.");
|
||||
|
||||
INTEGER_COMMAND(
|
||||
adcclk, getADCClock, setADCClock, StringTo<int>,
|
||||
@ -2064,7 +2065,7 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND(dsamples, getNumberOfDigitalSamples,
|
||||
setNumberOfDigitalSamples, StringTo<int>,
|
||||
"[0, 1]\n\t[CTB] Number of digital samples expected.");
|
||||
"[n_value]\n\t[CTB] Number of digital samples expected.");
|
||||
|
||||
INTEGER_COMMAND(romode, getReadoutMode, setReadoutMode,
|
||||
sls::StringTo<slsDetectorDefs::readoutMode>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user