mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +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 */
|
||||
struct timespec timerBegin;
|
||||
|
||||
/** x coord hardcoded, as detector does not send them yet **/
|
||||
uint16_t xcoord;
|
||||
/** x coord hardcoded ad 1D, if detector does not send them yet **/
|
||||
uint16_t xcoordin1D;
|
||||
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ DataProcessor::DataProcessor(Fifo*& f, fileFormat* ftype, bool fwenable, bool* d
|
||||
streamingFrequency(freq),
|
||||
streamingTimerInMs(timer),
|
||||
currentFreqCount(0),
|
||||
xcoord(0),
|
||||
xcoordin1D(0),
|
||||
acquisitionStartedFlag(false),
|
||||
measurementStartedFlag(false),
|
||||
firstAcquisitionIndex(0),
|
||||
@ -235,7 +235,7 @@ void DataProcessor::SetupFileWriter(bool fwe, int* nd, char* fname, char* fpath,
|
||||
if (g)
|
||||
generalData = g;
|
||||
// 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) {
|
||||
@ -369,9 +369,15 @@ void DataProcessor::ProcessAnImage(char* buf) {
|
||||
}
|
||||
|
||||
|
||||
// x coord for those not having standard header
|
||||
if (!generalData->standardheader)
|
||||
header->xCoord = xcoord;
|
||||
// x coord is 0 for detector in pos [0,0,0]
|
||||
if (xcoordin1D) {
|
||||
// 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)
|
||||
file->WriteToFile(buf, generalData->imageSize + sizeof(sls_detector_header), fnum-firstMeasurementIndex, nump);
|
||||
|
Loading…
x
Reference in New Issue
Block a user