diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 7c4168be6..e22e3937d 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -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 -------- diff --git a/slsDetectorSoftware/include/Detector.h b/slsDetectorSoftware/include/Detector.h index 9be2e43c3..00ee0cce7 100644 --- a/slsDetectorSoftware/include/Detector.h +++ b/slsDetectorSoftware/include/Detector.h @@ -1338,13 +1338,13 @@ class Detector { Result 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 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 = {}); diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index 8d7e10f92..a82c15212 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -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, - "[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, - "[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");