v1.0.0-rc.81
This commit is contained in:
@@ -89,25 +89,19 @@ void ImageAnalysisCPU::Analyze(DataMessage &output,
|
||||
|
||||
auto &pixel_to_bin = integration.GetPixelToBin();
|
||||
auto &corrections = integration.Corrections();
|
||||
auto nbins = integration.GetBinNumber();
|
||||
|
||||
std::vector<int32_t> updated_image(experiment.GetPixelsNum());
|
||||
|
||||
std::vector<float> sum(nbins);
|
||||
std::vector<float> sum2(nbins);
|
||||
std::vector<uint32_t> count(nbins);
|
||||
profile.Clear(integration);
|
||||
|
||||
for (int i = 0; i < npixels; i++) {
|
||||
auto bin = pixel_to_bin[i];
|
||||
auto value = image[i] * corrections[i];
|
||||
|
||||
if (mask_1byte[i] != 0) {
|
||||
updated_image[i] = INT32_MIN;
|
||||
++masked_pixels;
|
||||
} else if (image[i] >= sat_pixel_val) {
|
||||
updated_image[i] = INT32_MIN;
|
||||
++sat_pixels;
|
||||
} else if (std::is_signed<T>::value && (image[i] == err_pixel_val)) {// Error pixels are possible only for signed types
|
||||
} else if (std::is_signed<T>::value && (image[i] == err_pixel_val)) {
|
||||
// Error pixels are possible only for signed types
|
||||
updated_image[i] = INT32_MIN;
|
||||
++err_pixels;
|
||||
} else {
|
||||
@@ -134,17 +128,10 @@ void ImageAnalysisCPU::Analyze(DataMessage &output,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bin < nbins) {
|
||||
sum[bin] += value;
|
||||
sum2[bin] += value * value;
|
||||
count[bin] += 1;
|
||||
}
|
||||
profile.Add(pixel_to_bin[i], image[i] * corrections[i]);
|
||||
}
|
||||
}
|
||||
|
||||
profile.Clear(integration);
|
||||
profile.Add(sum, count);
|
||||
|
||||
std::vector<DiffractionSpot> spots;
|
||||
if (spot_finding_settings.enable)
|
||||
spots = spotFinder.Run(image, spot_finding_settings);
|
||||
|
||||
Reference in New Issue
Block a user