mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-09 03:20:42 +02:00
fix in receiver as x, y and z are properly integrated with detector server for eiger and jungfrau, and handling previous versions of detector where x y and z were all 0 (hardcoding them in 1 d)
This commit is contained in:
parent
210bcb081d
commit
1f138abac1
@ -319,8 +319,8 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
|
|||||||
/** timer beginning stamp for random streaming */
|
/** timer beginning stamp for random streaming */
|
||||||
struct timespec timerBegin;
|
struct timespec timerBegin;
|
||||||
|
|
||||||
/** x coord hardcoded, as detector does not send them yet **/
|
/** x coord hardcoded ad 1D, if detector does not send them yet **/
|
||||||
uint16_t xcoord;
|
uint16_t xcoordin1D;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ DataProcessor::DataProcessor(Fifo*& f, fileFormat* ftype, bool fwenable, bool* d
|
|||||||
streamingFrequency(freq),
|
streamingFrequency(freq),
|
||||||
streamingTimerInMs(timer),
|
streamingTimerInMs(timer),
|
||||||
currentFreqCount(0),
|
currentFreqCount(0),
|
||||||
xcoord(0),
|
xcoordin1D(0),
|
||||||
acquisitionStartedFlag(false),
|
acquisitionStartedFlag(false),
|
||||||
measurementStartedFlag(false),
|
measurementStartedFlag(false),
|
||||||
firstAcquisitionIndex(0),
|
firstAcquisitionIndex(0),
|
||||||
@ -235,7 +235,7 @@ void DataProcessor::SetupFileWriter(bool fwe, int* nd, char* fname, char* fpath,
|
|||||||
if (g)
|
if (g)
|
||||||
generalData = g;
|
generalData = g;
|
||||||
// fix xcoord as detector is not providing it right now
|
// fix xcoord as detector is not providing it right now
|
||||||
xcoord = ((NumberofDataProcessors > (*nunits)) ? index : ((*dindex) * (*nunits)) + index);
|
xcoordin1D = ((NumberofDataProcessors > (*nunits)) ? index : ((*dindex) * (*nunits)) + index);
|
||||||
|
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
@ -369,9 +369,15 @@ void DataProcessor::ProcessAnImage(char* buf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// x coord for those not having standard header
|
// x coord is 0 for detector in pos [0,0,0]
|
||||||
if (!generalData->standardheader)
|
if (xcoordin1D) {
|
||||||
header->xCoord = xcoord;
|
// do nothing as detector has correctly send them
|
||||||
|
if (header->xCoord || header->yCoord || header->zCoord)
|
||||||
|
;
|
||||||
|
// detector has send all 0's when there should have been a value greater than 0 in some dimension
|
||||||
|
else
|
||||||
|
header->xCoord = xcoordin1D;
|
||||||
|
}
|
||||||
|
|
||||||
if (file)
|
if (file)
|
||||||
file->WriteToFile(buf, generalData->imageSize + sizeof(sls_detector_header), fnum-firstMeasurementIndex, nump);
|
file->WriteToFile(buf, generalData->imageSize + sizeof(sls_detector_header), fnum-firstMeasurementIndex, nump);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user