mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 18:40:42 +02:00
changed order to pedestal binary then accumulate, also fxed a bug in that
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@243 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
c7bc397098
commit
b9fcbf4697
@ -991,19 +991,21 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){
|
|||||||
}
|
}
|
||||||
//pedestal or accumulate
|
//pedestal or accumulate
|
||||||
else{
|
else{
|
||||||
|
double temp;//cannot overwrite cuz of accumulate
|
||||||
for(unsigned int px=0;px<(nPixelsX*nPixelsY);px++){
|
for(unsigned int px=0;px<(nPixelsX*nPixelsY);px++){
|
||||||
if(accumulate)
|
temp = data->values[px];
|
||||||
histYAxis[0][px] += data->values[px];
|
|
||||||
else
|
|
||||||
histYAxis[0][px] = data->values[px];
|
|
||||||
if(pedestal)
|
if(pedestal)
|
||||||
histYAxis[0][px] = histYAxis[0][px] - (pedestalVals[px]);
|
temp = data->values[px] - (pedestalVals[px]);
|
||||||
if(binary) {
|
if(binary) {
|
||||||
if ((histYAxis[0][px] >= binaryFrom) && (histYAxis[0][px] <= binaryTo))
|
if ((temp >= binaryFrom) && (temp <= binaryTo))
|
||||||
histYAxis[0][px] = 1;
|
temp = 1;
|
||||||
else
|
else
|
||||||
histYAxis[0][px] = 0;
|
temp = 0;
|
||||||
}
|
}
|
||||||
|
if(accumulate)
|
||||||
|
temp += histYAxis[0][px];
|
||||||
|
//after all processing
|
||||||
|
histYAxis[0][px] = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1038,19 +1040,21 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){
|
|||||||
}
|
}
|
||||||
//pedestal or accumulate or binary
|
//pedestal or accumulate or binary
|
||||||
else{
|
else{
|
||||||
|
double temp;
|
||||||
for(unsigned int px=0;px<(nPixelsX*nPixelsY);px++){
|
for(unsigned int px=0;px<(nPixelsX*nPixelsY);px++){
|
||||||
if(accumulate)
|
temp = data->values[px];
|
||||||
lastImageArray[px] += data->values[px];
|
|
||||||
else
|
|
||||||
lastImageArray[px] = data->values[px];
|
|
||||||
if(pedestal)
|
if(pedestal)
|
||||||
lastImageArray[px] = lastImageArray[px] - (pedestalVals[px]);
|
temp = data->values[px] - (pedestalVals[px]);
|
||||||
if(binary) {
|
if(binary) {
|
||||||
if ((lastImageArray[px] >= binaryFrom) && (lastImageArray[px] <= binaryTo))
|
if ((temp >= binaryFrom) && (temp <= binaryTo))
|
||||||
lastImageArray[px] = 1;
|
temp = 1;
|
||||||
else
|
else
|
||||||
lastImageArray[px] = 0;
|
temp = 0;
|
||||||
}
|
}
|
||||||
|
if(accumulate)
|
||||||
|
temp += lastImageArray[px];
|
||||||
|
//after all processing
|
||||||
|
lastImageArray[px] = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user