mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
Merge branch 'eigerserverlock' into developer
This commit is contained in:
commit
a4bdffd0b9
@ -71,6 +71,7 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def nmod(self):
|
def nmod(self):
|
||||||
|
"""Number of modules in shared memory."""
|
||||||
return self.size()
|
return self.size()
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
@ -325,6 +326,12 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def nframes(self):
|
def nframes(self):
|
||||||
|
"""
|
||||||
|
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
|
||||||
|
Note
|
||||||
|
-----
|
||||||
|
[Gotthard2] only in continuous mode.
|
||||||
|
"""
|
||||||
return self.getNumberOfFramesFromStart()
|
return self.getNumberOfFramesFromStart()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -1430,6 +1437,7 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def packageversion(self):
|
def packageversion(self):
|
||||||
|
"""Package version (git branch)."""
|
||||||
return self.getPackageVersion()
|
return self.getPackageVersion()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -1683,6 +1691,9 @@ class Detector(CppDetectorApi):
|
|||||||
def parallel(self):
|
def parallel(self):
|
||||||
"""
|
"""
|
||||||
[Eiger][Mythen3] Enable or disable the parallel readout mode of detector.
|
[Eiger][Mythen3] Enable or disable the parallel readout mode of detector.
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
[Mythen3] If exposure time is too short, acquisition will return with an ERROR and take fewer frames than expected.
|
||||||
"""
|
"""
|
||||||
return self.getParallelMode()
|
return self.getParallelMode()
|
||||||
|
|
||||||
@ -1796,6 +1807,11 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def now(self):
|
def now(self):
|
||||||
|
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
|
||||||
|
Note
|
||||||
|
-----
|
||||||
|
[Gotthard2] not in burst and auto mode.
|
||||||
|
"""
|
||||||
return self.getActualTime()
|
return self.getActualTime()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -1954,6 +1970,20 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def maxclkphaseshift(self):
|
def maxclkphaseshift(self):
|
||||||
|
"""
|
||||||
|
[Gotthard2][Mythen3] Absolute maximum Phase shift of clocks.
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
:setter: Not Implemented
|
||||||
|
Example
|
||||||
|
-------
|
||||||
|
>>> d.maxclkphaseshift
|
||||||
|
0: 80
|
||||||
|
1: 80
|
||||||
|
2: 160
|
||||||
|
3: 80
|
||||||
|
4: 80
|
||||||
|
"""
|
||||||
return MaxPhaseProxy(self)
|
return MaxPhaseProxy(self)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -2370,7 +2400,9 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def pattern(self):
|
def pattern(self):
|
||||||
"""[Mythen3][Moench][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
|
"""[Mythen3][Moench][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
:getter: Not Implemented
|
||||||
Example
|
Example
|
||||||
---------
|
---------
|
||||||
>>> d.pattern = '/tmp/pat.txt'
|
>>> d.pattern = '/tmp/pat.txt'
|
||||||
@ -2737,7 +2769,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def clkdiv(self):
|
def clkdiv(self):
|
||||||
"""
|
"""
|
||||||
[Gotthard2][Mythen3] Clock Divider of 5 clocks. Must be greater than 1.
|
[Gotthard2][Mythen3] Clock Divider of all clocks. Must be greater than 1.
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
>>> d.clkdiv[0] = 20
|
>>> d.clkdiv[0] = 20
|
||||||
|
@ -84,7 +84,7 @@ class Detector {
|
|||||||
* CHIPTESTBOARD */
|
* CHIPTESTBOARD */
|
||||||
Result<defs::detectorType> getDetectorType(Positions pos = {}) const;
|
Result<defs::detectorType> getDetectorType(Positions pos = {}) const;
|
||||||
|
|
||||||
/** Gets the total number of detectors */
|
/** Gets the total number of modules in shared memory */
|
||||||
int size() const;
|
int size() const;
|
||||||
|
|
||||||
bool empty() const;
|
bool empty() const;
|
||||||
@ -1404,7 +1404,8 @@ class Detector {
|
|||||||
* *
|
* *
|
||||||
* ************************************************/
|
* ************************************************/
|
||||||
|
|
||||||
/** [CTB][Moench][Mythen3] */
|
/** [CTB][Moench][Mythen3] Loads ASCII pattern file directly to server
|
||||||
|
* (instead of executing line by line)*/
|
||||||
void setPattern(const std::string &fname, Positions pos = {});
|
void setPattern(const std::string &fname, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB][Moench][Mythen3] */
|
/** [CTB][Moench][Mythen3] */
|
||||||
@ -1419,9 +1420,9 @@ class Detector {
|
|||||||
/** [CTB][Moench][Mythen3] same as executing for ctb and moench */
|
/** [CTB][Moench][Mythen3] same as executing for ctb and moench */
|
||||||
Result<uint64_t> getPatternWord(int addr, Positions pos = {});
|
Result<uint64_t> getPatternWord(int addr, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB] Caution: If word is -1 reads the addr (same as
|
/** [CTB][Moench] Caution: If word is -1 reads the addr (same as
|
||||||
* executing the pattern)
|
* executing the pattern)
|
||||||
* [Mythen3][Moench] */
|
* [Mythen3] */
|
||||||
void setPatternWord(int addr, uint64_t word, Positions pos = {});
|
void setPatternWord(int addr, uint64_t word, Positions pos = {});
|
||||||
|
|
||||||
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||||
@ -1437,9 +1438,7 @@ class Detector {
|
|||||||
Positions pos = {});
|
Positions pos = {});
|
||||||
|
|
||||||
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||||
* levels
|
* levels */
|
||||||
* @returns number of loops
|
|
||||||
*/
|
|
||||||
Result<int> getPatternLoopCycles(int level, Positions pos = {}) const;
|
Result<int> getPatternLoopCycles(int level, Positions pos = {}) const;
|
||||||
|
|
||||||
/** [CTB][Moench][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2
|
/** [CTB][Moench][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2
|
||||||
|
@ -2109,8 +2109,8 @@ std::string CmdProxy::PatternWord(int action) {
|
|||||||
os << cmd << ' ';
|
os << cmd << ' ';
|
||||||
if (action == defs::HELP_ACTION) {
|
if (action == defs::HELP_ACTION) {
|
||||||
os << "[step or address] [64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 "
|
os << "[step or address] [64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 "
|
||||||
"bit pattern at "
|
"bit pattern at address of pattern memory.\n\t[Ctb][Moench] read "
|
||||||
"address of pattern memory."
|
"is same as executing pattern"
|
||||||
<< '\n';
|
<< '\n';
|
||||||
} else if (action == defs::GET_ACTION) {
|
} else if (action == defs::GET_ACTION) {
|
||||||
if (args.size() != 1) {
|
if (args.size() != 1) {
|
||||||
|
@ -2343,9 +2343,9 @@ class CmdProxy {
|
|||||||
"[n]\n\tPort number of the stop server on detector for detector-client "
|
"[n]\n\tPort number of the stop server on detector for detector-client "
|
||||||
"tcp interface. Default is 1953. Normally unchanged.");
|
"tcp interface. Default is 1953. Normally unchanged.");
|
||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(lock, getDetectorLock, setDetectorLock,
|
INTEGER_COMMAND_VEC_ID(
|
||||||
StringTo<int>,
|
lock, getDetectorLock, setDetectorLock, StringTo<int>,
|
||||||
"[0, 1]\n\tLock detector to one IP, 1: locks");
|
"[0, 1]\n\tLock detector to one IP, 1: locks. Default is unlocked");
|
||||||
|
|
||||||
GET_COMMAND(
|
GET_COMMAND(
|
||||||
lastclient, getLastClientIP,
|
lastclient, getLastClientIP,
|
||||||
|
@ -623,13 +623,13 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
|
|
||||||
// send data to callback
|
// send data to callback
|
||||||
if (data) {
|
if (data) {
|
||||||
char *image = multiframe;
|
char *callbackImage = multiframe;
|
||||||
int imagesize = multisize;
|
int imagesize = multisize;
|
||||||
|
|
||||||
if (gapPixels) {
|
if (gapPixels) {
|
||||||
int n = InsertGapPixels(multiframe, multigappixels, quadEnable,
|
int n = InsertGapPixels(multiframe, multigappixels, quadEnable,
|
||||||
dynamicRange, nDetPixelsX, nDetPixelsY);
|
dynamicRange, nDetPixelsX, nDetPixelsY);
|
||||||
image = multigappixels;
|
callbackImage = multigappixels;
|
||||||
imagesize = n;
|
imagesize = n;
|
||||||
}
|
}
|
||||||
LOG(logDEBUG) << "Image Info:"
|
LOG(logDEBUG) << "Image Info:"
|
||||||
@ -640,8 +640,8 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
|
|
||||||
thisData =
|
thisData =
|
||||||
new detectorData(currentProgress, currentFileName, nDetPixelsX,
|
new detectorData(currentProgress, currentFileName, nDetPixelsX,
|
||||||
nDetPixelsY, image, imagesize, dynamicRange,
|
nDetPixelsY, callbackImage, imagesize,
|
||||||
currentFileIndex, completeImage);
|
dynamicRange, currentFileIndex, completeImage);
|
||||||
|
|
||||||
dataReady(
|
dataReady(
|
||||||
thisData, currentFrameIndex,
|
thisData, currentFrameIndex,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user