mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
gui: fixed pedestal
This commit is contained in:
@ -679,7 +679,7 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex, uint32_t subFra
|
|||||||
resetPedestal = false;
|
resetPedestal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPedestal) {
|
if (isPedestal && pedestalCount <= NUM_PEDESTAL_FRAMES) {
|
||||||
// add pedestals frames
|
// add pedestals frames
|
||||||
if (pedestalCount < NUM_PEDESTAL_FRAMES) {
|
if (pedestalCount < NUM_PEDESTAL_FRAMES) {
|
||||||
for (unsigned int px = 0; px < nPixels; ++px)
|
for (unsigned int px = 0; px < nPixels; ++px)
|
||||||
@ -692,6 +692,7 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex, uint32_t subFra
|
|||||||
for (unsigned int px = 0; px < nPixels; ++px)
|
for (unsigned int px = 0; px < nPixels; ++px)
|
||||||
tempPedestalVals[px] = tempPedestalVals[px] / (double)NUM_PEDESTAL_FRAMES;
|
tempPedestalVals[px] = tempPedestalVals[px] / (double)NUM_PEDESTAL_FRAMES;
|
||||||
memcpy(pedestalVals, tempPedestalVals, nPixels * sizeof(double));
|
memcpy(pedestalVals, tempPedestalVals, nPixels * sizeof(double));
|
||||||
|
pedestalCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -725,7 +726,7 @@ void qDrawPlot::Get1dData(double* rawData) {
|
|||||||
// pedestal
|
// pedestal
|
||||||
if (isPedestal) {
|
if (isPedestal) {
|
||||||
for (unsigned int px = 0; px < nPixelsX; ++px) {
|
for (unsigned int px = 0; px < nPixelsX; ++px) {
|
||||||
rawData[px] =- (pedestalVals[px]);
|
rawData[px] -= (pedestalVals[px]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// accumulate
|
// accumulate
|
||||||
@ -757,7 +758,7 @@ void qDrawPlot::Get2dData(double* rawData) {
|
|||||||
// pedestal
|
// pedestal
|
||||||
if (isPedestal) {
|
if (isPedestal) {
|
||||||
for (unsigned int px = 0; px < nPixels; ++px) {
|
for (unsigned int px = 0; px < nPixels; ++px) {
|
||||||
rawData[px] =- (pedestalVals[px]);
|
rawData[px] -= (pedestalVals[px]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// accumulate
|
// accumulate
|
||||||
|
Reference in New Issue
Block a user