diff --git a/slsDetectorGui/include/qDrawPlot.h b/slsDetectorGui/include/qDrawPlot.h index b13768037..2c8739040 100644 --- a/slsDetectorGui/include/qDrawPlot.h +++ b/slsDetectorGui/include/qDrawPlot.h @@ -94,7 +94,7 @@ class qDrawPlot : public QWidget, private Ui::PlotObject { void rearrangeGotthard25data(double *data); static const int NUM_PEDESTAL_FRAMES = 20; - static const int NUM_GOTTHARD25_CHANS = 2560; + static const int NUM_GOTTHARD25_CHANS = 1280; sls::Detector *det; slsDetectorDefs::detectorType detType; diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 80b848b49..5101c11dd 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -1156,15 +1156,14 @@ void qDrawPlot::toDoublePixelData(double *dest, char *source, int size, void qDrawPlot::rearrangeGotthard25data(double *data) { const int nChans = NUM_GOTTHARD25_CHANS; - double temp[nChans] = {0.0}; - int nChansMod = nChans / 2; - for (int i = 0; i != nChansMod; ++i) { - // master module (interleave from front) + double temp[nChans * 2] = {0.0}; + for (int i = 0; i != nChans; ++i) { + // master module temp[i * 2] = data[i]; - // slave module (reverse interleave) - temp[(nChansMod - 1 - i) * 2 + 1] = data[nChansMod + i]; + // slave module + temp[i * 2 + 1] = data[nChans + i]; } - memcpy(data, temp, nChans * sizeof(double)); + memcpy(data, temp, nChans * 2 * sizeof(double)); } void qDrawPlot::UpdatePlot() {