Merge branch 'eigerserverlock' into developer

This commit is contained in:
maliakal_d 2020-09-22 18:48:35 +02:00
commit a4bdffd0b9
5 changed files with 49 additions and 18 deletions

View File

@ -71,6 +71,7 @@ class Detector(CppDetectorApi):
@property
def nmod(self):
"""Number of modules in shared memory."""
return self.size()
def __repr__(self):
@ -325,6 +326,12 @@ class Detector(CppDetectorApi):
@property
@element
def nframes(self):
"""
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
Note
-----
[Gotthard2] only in continuous mode.
"""
return self.getNumberOfFramesFromStart()
@property
@ -1430,6 +1437,7 @@ class Detector(CppDetectorApi):
@property
def packageversion(self):
"""Package version (git branch)."""
return self.getPackageVersion()
@property
@ -1683,6 +1691,9 @@ class Detector(CppDetectorApi):
def parallel(self):
"""
[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()
@ -1796,6 +1807,11 @@ class Detector(CppDetectorApi):
@property
@element
def now(self):
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
Note
-----
[Gotthard2] not in burst and auto mode.
"""
return self.getActualTime()
@property
@ -1954,6 +1970,20 @@ class Detector(CppDetectorApi):
@property
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)
@property
@ -2370,7 +2400,9 @@ class Detector(CppDetectorApi):
@property
def pattern(self):
"""[Mythen3][Moench][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
Note
----
:getter: Not Implemented
Example
---------
>>> d.pattern = '/tmp/pat.txt'
@ -2737,7 +2769,7 @@ class Detector(CppDetectorApi):
@property
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
-------
>>> d.clkdiv[0] = 20

View File

@ -84,7 +84,7 @@ class Detector {
* CHIPTESTBOARD */
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;
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 = {});
/** [CTB][Moench][Mythen3] */
@ -1419,9 +1420,9 @@ class Detector {
/** [CTB][Moench][Mythen3] same as executing for ctb and moench */
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)
* [Mythen3][Moench] */
* [Mythen3] */
void setPatternWord(int addr, uint64_t word, Positions pos = {});
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
@ -1437,9 +1438,7 @@ class Detector {
Positions pos = {});
/**[CTB][Moench][Mythen3] Options: level: -1 (complete pattern) and 0-2
* levels
* @returns number of loops
*/
* levels */
Result<int> getPatternLoopCycles(int level, Positions pos = {}) const;
/** [CTB][Moench][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2

View File

@ -2109,8 +2109,8 @@ std::string CmdProxy::PatternWord(int action) {
os << cmd << ' ';
if (action == defs::HELP_ACTION) {
os << "[step or address] [64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 "
"bit pattern at "
"address of pattern memory."
"bit pattern at address of pattern memory.\n\t[Ctb][Moench] read "
"is same as executing pattern"
<< '\n';
} else if (action == defs::GET_ACTION) {
if (args.size() != 1) {

View File

@ -2343,9 +2343,9 @@ class CmdProxy {
"[n]\n\tPort number of the stop server on detector for detector-client "
"tcp interface. Default is 1953. Normally unchanged.");
INTEGER_COMMAND_VEC_ID(lock, getDetectorLock, setDetectorLock,
StringTo<int>,
"[0, 1]\n\tLock detector to one IP, 1: locks");
INTEGER_COMMAND_VEC_ID(
lock, getDetectorLock, setDetectorLock, StringTo<int>,
"[0, 1]\n\tLock detector to one IP, 1: locks. Default is unlocked");
GET_COMMAND(
lastclient, getLastClientIP,

View File

@ -623,13 +623,13 @@ void DetectorImpl::readFrameFromReceiver() {
// send data to callback
if (data) {
char *image = multiframe;
char *callbackImage = multiframe;
int imagesize = multisize;
if (gapPixels) {
int n = InsertGapPixels(multiframe, multigappixels, quadEnable,
dynamicRange, nDetPixelsX, nDetPixelsY);
image = multigappixels;
callbackImage = multigappixels;
imagesize = n;
}
LOG(logDEBUG) << "Image Info:"
@ -640,8 +640,8 @@ void DetectorImpl::readFrameFromReceiver() {
thisData =
new detectorData(currentProgress, currentFileName, nDetPixelsX,
nDetPixelsY, image, imagesize, dynamicRange,
currentFileIndex, completeImage);
nDetPixelsY, callbackImage, imagesize,
dynamicRange, currentFileIndex, completeImage);
dataReady(
thisData, currentFrameIndex,