mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 01:50:40 +02:00
WIP doc
This commit is contained in:
parent
e85326d415
commit
bc09b8bfb9
@ -407,6 +407,13 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def numinterfaces(self):
|
||||
"""[Jungfrau][Gotthard2] Number of udp interfaces to stream data from detector. Default is 1.
|
||||
Note
|
||||
-----
|
||||
Also enables second interface in receiver for listening (Writes a file per interface if writing enabled). \n
|
||||
Also restarts client and receiver zmq sockets if zmq streaming enabled. \n
|
||||
[Gotthard2] second interface enabled to send veto information via 10Gbps for debugging. By default, if veto enabled, it is sent via 2.5 gbps interface.
|
||||
"""
|
||||
return self.getNumberofUDPInterfaces()
|
||||
|
||||
@numinterfaces.setter
|
||||
@ -670,8 +677,8 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
[Gotthard] 0, 90, 110, 120, 150, 180, 200
|
||||
[Eiger][Mythen3][Gotthard2] 0 - 200
|
||||
[Gotthard] 0, 90, 110, 120, 150, 180, 200 \n
|
||||
[Eiger][Mythen3][Gotthard2] 0 - 200 \n
|
||||
[Jungfrau][Ctb][Moench] 0, 60 - 200
|
||||
"""
|
||||
return element_if_equal(self.getHighVoltage())
|
||||
@ -723,6 +730,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def lock(self):
|
||||
"""Lock detector to one client IP, 1 locks, 0 unlocks. Default is unlocked."""
|
||||
return element_if_equal(self.getDetectorLock())
|
||||
|
||||
@lock.setter
|
||||
@ -739,6 +747,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def lastclient(self):
|
||||
"""Get Client IP Address that last communicated with the detector."""
|
||||
return element_if_equal(self.getLastClientIP())
|
||||
|
||||
@property
|
||||
@ -784,6 +793,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def led(self):
|
||||
"""[Ctb] Switches on/off all LEDs. Default is enabled. """
|
||||
return element_if_equal(self.getLEDEnable())
|
||||
|
||||
@led.setter
|
||||
@ -879,6 +889,11 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def partialreset(self):
|
||||
"""[Eiger] Sets up detector to do partial or complete reset at start of acquisition. 0 complete reset, 1 partial reset. Default is complete reset.
|
||||
Note
|
||||
-----
|
||||
Advanced Function!
|
||||
"""
|
||||
return element_if_equal(self.getPartialReset())
|
||||
|
||||
@partialreset.setter
|
||||
@ -895,6 +910,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def overflow(self):
|
||||
"""[Eiger] Enable or disable show overflow flag in 32 bit mode. Default is disabled. """
|
||||
return element_if_equal(self.getOverFlowMode())
|
||||
|
||||
@overflow.setter
|
||||
@ -912,6 +928,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def interruptsubframe(self):
|
||||
"""[Eiger] Enable last subframe interrupt at required exposure time. Disabling will wait for last sub frame to finish exposing. Default is disabled."""
|
||||
return element_if_equal(self.getInterruptSubframe())
|
||||
|
||||
@interruptsubframe.setter
|
||||
@ -929,11 +946,25 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def measuredperiod(self):
|
||||
"""
|
||||
[Eiger] Measured frame period between last frame and previous one.
|
||||
|
||||
Note
|
||||
-----
|
||||
Can be measured with minimum 2 frames in an acquisition.
|
||||
:setter: Not implemented
|
||||
"""
|
||||
res = self.getMeasuredPeriod()
|
||||
return element_if_equal([it.total_seconds() for it in res])
|
||||
|
||||
@property
|
||||
def measuredsubperiod(self):
|
||||
"""
|
||||
[Eiger] Measured sub frame period between last sub frame and previous one.
|
||||
Note
|
||||
-----
|
||||
:setter: Not implemented
|
||||
"""
|
||||
res = self.getMeasuredSubFramePeriod()
|
||||
return element_if_equal([it.total_seconds() for it in res])
|
||||
|
||||
@ -1164,7 +1195,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def dbitpipeline(self):
|
||||
""" [Ctb] Pipeline of the clock for latching digital bits. """
|
||||
"""[Ctb] Pipeline of the clock for latching digital bits. """
|
||||
return element_if_equal(self.getDBITPipeline())
|
||||
|
||||
@dbitpipeline.setter
|
||||
@ -1173,6 +1204,11 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def maxdbitphaseshift(self):
|
||||
"""[CTB][Jungfrau] Absolute maximum Phase shift of of the clock to latch digital bits.
|
||||
Note
|
||||
-----
|
||||
:setter: Not Implemented
|
||||
"""
|
||||
return element_if_equal(self.getMaxDBITPhaseShift())
|
||||
|
||||
@property
|
||||
@ -1193,6 +1229,11 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def maxadcphaseshift(self):
|
||||
"""[Jungfrau][CTB][Moench] Absolute maximum Phase shift of ADC clock.
|
||||
Note
|
||||
-----
|
||||
:setter: Not Implemented
|
||||
"""
|
||||
return element_if_equal(self.getMaxADCPhaseShift())
|
||||
|
||||
@property
|
||||
@ -1237,6 +1278,12 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def pattern(self):
|
||||
"""[Mythen3][Moench][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
|
||||
|
||||
Examples
|
||||
---------
|
||||
>>> d.pattern = '/tmp/pat.txt'
|
||||
"""
|
||||
# TODO! Clean fix
|
||||
print("Set only")
|
||||
return 0
|
||||
@ -1244,6 +1291,7 @@ class Detector(CppDetectorApi):
|
||||
# patioctrl
|
||||
@property
|
||||
def patioctrl(self):
|
||||
"""[Ctb][Moench] 64 bit mask defining input (0) and output (1) signals."""
|
||||
return element_if_equal(self.getPatternIOControl())
|
||||
|
||||
@patioctrl.setter
|
||||
@ -1252,6 +1300,12 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patlimits(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of complete pattern.
|
||||
|
||||
Examples
|
||||
---------
|
||||
>>> d.patlimits = [0x23, 0x40]
|
||||
"""
|
||||
return element_if_equal(self.getPatternLoopAddresses(-1))
|
||||
|
||||
@patlimits.setter
|
||||
@ -1260,6 +1314,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."""
|
||||
return element_if_equal(self.getPatternMask())
|
||||
|
||||
@patmask.setter
|
||||
@ -1273,6 +1328,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patwait0(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 0 address."""
|
||||
return element_if_equal(self.getPatternWaitAddr(0))
|
||||
|
||||
@patwait0.setter
|
||||
@ -1281,6 +1337,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patwait1(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 1 address."""
|
||||
return element_if_equal(self.getPatternWaitAddr(1))
|
||||
|
||||
@patwait1.setter
|
||||
@ -1289,6 +1346,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patwait2(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 2 address."""
|
||||
return element_if_equal(self.getPatternWaitAddr(2))
|
||||
|
||||
@patwait2.setter
|
||||
@ -1297,6 +1355,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patwaittime0(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 0 time in clock cycles."""
|
||||
return element_if_equal(self.getPatternWaitTime(0))
|
||||
|
||||
@patwaittime0.setter
|
||||
@ -1305,6 +1364,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patwaittime1(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 1 time in clock cycles."""
|
||||
return element_if_equal(self.getPatternWaitTime(1))
|
||||
|
||||
@patwaittime1.setter
|
||||
@ -1313,6 +1373,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patwaittime2(self):
|
||||
"""[Ctb][Moench][Mythen3] Wait 2 time in clock cycles."""
|
||||
return element_if_equal(self.getPatternWaitTime(2))
|
||||
|
||||
@patwaittime2.setter
|
||||
@ -1321,6 +1382,12 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patloop0(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 0.
|
||||
|
||||
Examples
|
||||
---------
|
||||
>>> d.patloop0 = [0x23, 0x40]
|
||||
"""
|
||||
return element_if_equal(self.getPatternLoopAddresses(0))
|
||||
|
||||
@patloop0.setter
|
||||
@ -1329,6 +1396,12 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patloop1(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 1.
|
||||
|
||||
Examples
|
||||
---------
|
||||
>>> d.patloop1 = [0x23, 0x40]
|
||||
"""
|
||||
return element_if_equal(self.getPatternLoopAddresses(1))
|
||||
|
||||
@patloop1.setter
|
||||
@ -1337,6 +1410,12 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patloop2(self):
|
||||
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 2.
|
||||
|
||||
Examples
|
||||
---------
|
||||
>>> d.patloop2 = [0x23, 0x40]
|
||||
"""
|
||||
return element_if_equal(self.getPatternLoopAddresses(2))
|
||||
|
||||
@patloop2.setter
|
||||
@ -1345,6 +1424,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patnloop0(self):
|
||||
"""[Ctb][Moench][Mythen3] Number of cycles of loop 0."""
|
||||
return element_if_equal(self.getPatternLoopCycles(0))
|
||||
|
||||
@patnloop0.setter
|
||||
@ -1353,6 +1433,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patnloop1(self):
|
||||
"""[Ctb][Moench][Mythen3] Number of cycles of loop 1."""
|
||||
return element_if_equal(self.getPatternLoopCycles(1))
|
||||
|
||||
@patnloop1.setter
|
||||
@ -1361,6 +1442,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def patnloop2(self):
|
||||
"""[Ctb][Moench][Mythen3] Number of cycles of loop 2."""
|
||||
return element_if_equal(self.getPatternLoopCycles(2))
|
||||
|
||||
@patnloop2.setter
|
||||
|
@ -457,10 +457,13 @@ class Detector {
|
||||
/** [Jungfrau][Gotthard2] */
|
||||
Result<int> getNumberofUDPInterfaces(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau][Gotthard2] Also restarts client and receiver zmq sockets
|
||||
* [Gotthard2] second interface enabled to send veto information via 10gbps
|
||||
* for debugging. By default it is sent via 2.5gbps if veto enabled
|
||||
* n can be 1 or 2 */
|
||||
/** [Jungfrau][Gotthard2] Number of udp interfaces to stream data from
|
||||
* detector. Default is 1. \n Also enables second interface in receiver for
|
||||
* listening (Writes a file per interface if writing enabled). \n Also
|
||||
* restarts client and receiver zmq sockets if zmq streaming enabled. \n
|
||||
* [Gotthard2] second interface enabled to send veto information via 10Gbps
|
||||
* for debugging. By default, if veto enabled, it is sent via 2.5 gbps
|
||||
* interface. */
|
||||
void setNumberofUDPInterfaces(int n, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
@ -822,7 +825,7 @@ class Detector {
|
||||
/** [Eiger] */
|
||||
Result<bool> getOverFlowMode(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] */
|
||||
/** [Eiger] Overflow in 32 bit mode. Default is disabled.*/
|
||||
void setOverFlowMode(bool value, Positions pos = {});
|
||||
|
||||
/** [Eiger] */
|
||||
@ -861,7 +864,9 @@ class Detector {
|
||||
/** [Eiger] */
|
||||
Result<bool> getInterruptSubframe(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] when set, the last subframe is interrupted at end of acq */
|
||||
/** [Eiger] Enable last subframe interrupt at required exposure time.
|
||||
* Disabling will wait for last sub frame to finish exposing. Default is
|
||||
* disabled. */
|
||||
void setInterruptSubframe(const bool enable, Positions pos = {});
|
||||
|
||||
/** [Eiger] minimum two frames */
|
||||
@ -885,8 +890,7 @@ class Detector {
|
||||
/** [Eiger] Advanced */
|
||||
Result<bool> getPartialReset(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger] Advanced
|
||||
* used for pulsing chips */
|
||||
/** [Eiger] Advanced used for pulsing chips. Default is Complete reset */
|
||||
void setPartialReset(bool value, Positions pos = {});
|
||||
|
||||
/** [Eiger] Advanced
|
||||
@ -1267,7 +1271,7 @@ class Detector {
|
||||
/** [CTB] */
|
||||
Result<bool> getLEDEnable(Positions pos = {}) const;
|
||||
|
||||
/** [CTB] */
|
||||
/** [CTB] Default is enabled. */
|
||||
void setLEDEnable(bool enable, Positions pos = {});
|
||||
|
||||
/**************************************************
|
||||
@ -1340,9 +1344,8 @@ class Detector {
|
||||
/** [CTB][Moench][Mythen3] */
|
||||
Result<uint64_t> getPatternBitMask(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Moench][Mythen3] Sets the bitmask that the mask will be applied to
|
||||
* for every pattern
|
||||
*/
|
||||
/** [CTB][Moench][Mythen3] Sets the bits that will have a pattern mask
|
||||
* applied to the selected patmask for every pattern. */
|
||||
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
||||
|
||||
/** [Mythen3] */
|
||||
@ -1498,6 +1501,7 @@ class Detector {
|
||||
|
||||
Result<bool> getDetectorLock(Positions pos = {}) const;
|
||||
|
||||
/** lock detector to one client IP. default is unlocked */
|
||||
void setDetectorLock(bool lock, Positions pos = {});
|
||||
|
||||
/** Get last client IP saved on detector server */
|
||||
|
@ -2106,8 +2106,7 @@ std::string CmdProxy::PatternLoopAddresses(int action) {
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patlimits") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits "
|
||||
"of complete "
|
||||
"pattern."
|
||||
"of complete pattern."
|
||||
<< '\n';
|
||||
} else if (cmd == "patloop0") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits "
|
||||
|
@ -1640,11 +1640,12 @@ class CmdProxy {
|
||||
numinterfaces, getNumberofUDPInterfaces, setNumberofUDPInterfaces,
|
||||
StringTo<int>,
|
||||
"[1, 2]\n\t[Jungfrau][Gotthard2] Number of udp interfaces to stream "
|
||||
"data from detector. Default: 1.\n\t"
|
||||
"[Gotthard2] 2 will select 10gbps as channel for veto data streaming "
|
||||
"in detector and also enable second interface in receiver to listen to "
|
||||
"it. This is mainly for debugging purposes. By default, numinterfaces "
|
||||
"is 1 and if veto enabled, it is sent via 2.5 gbps interface");
|
||||
"data from detector. Default: 1.\n\tAlso enables second interface in "
|
||||
"receiver for listening (Writes a file per interface if writing "
|
||||
"enabled).\n\tAlso restarts client and receiver zmq sockets if zmq "
|
||||
"streaming enabled.\n\t[Gotthard2] second interface enabled to send "
|
||||
"veto information via 10Gbps for debugging. By default, if veto "
|
||||
"enabled, it is sent via 2.5 gbps interface.");
|
||||
|
||||
INTEGER_COMMAND(
|
||||
selinterface, getSelectedUDPInterface, selectUDPInterface,
|
||||
@ -1909,7 +1910,7 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND(overflow, getOverFlowMode, setOverFlowMode, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger] Enable or disable show overflow flag in "
|
||||
"32 bit mode.");
|
||||
"32 bit mode. Default is disabled.");
|
||||
|
||||
INTEGER_COMMAND(
|
||||
flippeddatax, getBottom, setBottom, StringTo<int>,
|
||||
@ -1931,8 +1932,8 @@ class CmdProxy {
|
||||
|
||||
TIME_GET_COMMAND(measuredperiod, getMeasuredPeriod,
|
||||
"[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured frame "
|
||||
"period between last frame and previous one. Useful data "
|
||||
"only for acquisitions with more than 1 frame.");
|
||||
"period between last frame and previous one. Can be "
|
||||
"measured with minimum 2 frames in an acquisition.");
|
||||
|
||||
TIME_GET_COMMAND(measuredsubperiod, getMeasuredSubFramePeriod,
|
||||
"[(optional unit) ns|us|ms|s]\n\t[Eiger] Measured sub "
|
||||
@ -1941,7 +1942,8 @@ class CmdProxy {
|
||||
INTEGER_COMMAND(
|
||||
partialreset, getPartialReset, setPartialReset, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger] Sets up detector to do partial or complete reset at "
|
||||
"start of acquisition. 0 complete reset, 1 partial reset.");
|
||||
"start of acquisition. 0 complete reset, 1 partial reset. Default is "
|
||||
"complete reset. Advanced function!");
|
||||
|
||||
/* Jungfrau Specific */
|
||||
|
||||
@ -2187,8 +2189,8 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND_HEX_WIDTH16(
|
||||
patsetbit, getPatternBitMask, setPatternBitMask, StringTo<uint64_t>,
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit values "
|
||||
"applied to the selected patmask for every pattern.");
|
||||
"[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.");
|
||||
|
||||
EXECUTE_SET_COMMAND(patternstart, startPattern,
|
||||
"\n\t[Mythen3] Starts Pattern");
|
||||
|
Loading…
x
Reference in New Issue
Block a user