This commit is contained in:
maliakal_d 2020-08-26 11:11:51 +02:00
parent d44388a44e
commit 6d8168722a
3 changed files with 51 additions and 10 deletions

View File

@ -263,6 +263,22 @@ class Detector(CppDetectorApi):
@property
def period(self):
"""
Period between frames, accepts either a value in seconds or datetime.timedelta
Note
-----
:getter: always returns in seconds. To get in datetime.delta, use getPeriod
Examples
-----------
>>> d.period = 1.05
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
>>> d.period
181.23
>>> d.getPeriod()
[datetime.timedelta(seconds=181, microseconds=230000)]
"""
res = self.getPeriod()
return reduce_time(res)
@ -811,7 +827,24 @@ class Detector(CppDetectorApi):
@property
def ratecorr(self):
""" tau in ns """
"""
[Eiger] Custom dead time correction constant in ns. 0 will unset rate correction.
Note
-----
To set default rate correction, use setDefaultRateCorrection
Examples
-----------
>>> d.ratecorr = 1.05
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
>>> d.period
181.23
>>> d.getPeriod()
[datetime.timedelta(seconds=181, microseconds=230000)]
"""
"""
return element_if_equal(self.getRateCorrection())
@ratecorr.setter
@ -1343,6 +1376,14 @@ class Detector(CppDetectorApi):
@property
@element
def patsetbit(self):
"""[Ctb][Moench][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern.
Examples
--------
>>> d.patsetbit = 0x8f0effff6dbffdbf
>>> hex(d.patsetbit)
'0x8f0effff6dbffdbf'
"""
return self.getPatternBitMask()
@patsetbit.setter
@ -1351,7 +1392,7 @@ class Detector(CppDetectorApi):
@property
def patmask(self):
"""[Ctb][Moench][Mythen3] Sets the bits that will have a pattern mask applied to the selected patmask for every pattern.
"""[Ctb][Moench][Mythen3] Sets the mask applied to every pattern to the selected bits.
Examples
--------

View File

@ -1338,13 +1338,13 @@ class Detector {
Result<uint64_t> getPatternMask(Positions pos = {});
/** [CTB][Moench][Mythen3] Sets the mask applied to every pattern to the
* selected bit mask */
* selected bits */
void setPatternMask(uint64_t mask, Positions pos = {});
/** [CTB][Moench][Mythen3] */
Result<uint64_t> getPatternBitMask(Positions pos = {}) const;
/** [CTB][Moench][Mythen3] Sets the bits that will have a pattern mask
/** [CTB][Moench][Mythen3] Selects the bits that will have a pattern mask
* applied to the selected patmask for every pattern. */
void setPatternBitMask(uint64_t mask, Positions pos = {});

View File

@ -1173,8 +1173,7 @@ class CmdProxy {
TIME_COMMAND(
period, getPeriod, setPeriod,
"[duration] [(optional unit) ns|us|ms|s]\n\tPeriod between frames"
"\n\t[Gotthard2] Uploaded to detector just before acquisition starts");
"[duration] [(optional unit) ns|us|ms|s]\n\tPeriod between frames");
TIME_COMMAND(delay, getDelayAfterTrigger, setDelayAfterTrigger,
"[duration] [(optional unit) "
@ -2184,13 +2183,14 @@ class CmdProxy {
INTEGER_COMMAND_HEX_WIDTH16(
patmask, getPatternMask, setPatternMask, StringTo<uint64_t>,
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit mask applied to every "
"pattern. Only these bits for each pattern will be masked against.");
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] Sets the mask applied to "
"every pattern to the selected bits.");
INTEGER_COMMAND_HEX_WIDTH16(
patsetbit, getPatternBitMask, setPatternBitMask, StringTo<uint64_t>,
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] Sets the bits that will have "
"a pattern mask applied to the selected patmask for every pattern.");
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] Selects the bits that will "
"have a pattern mask applied to the selected patmask for every "
"pattern.");
EXECUTE_SET_COMMAND(patternstart, startPattern,
"\n\t[Mythen3] Starts Pattern");