MXAnalysisWithoutFPGA: Azimuthal integration moved to spot finder
This commit is contained in:
@@ -70,30 +70,3 @@ ImageStatistics ImagePreprocessor::Analyze(const uint8_t *input, T err_pixel_val
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ImagePreprocessor::AzimIntegration(const AzimuthalIntegration &integration, AzimuthalIntegrationProfile &profile) {
|
||||
const auto azint_bins = integration.GetBinNumber();
|
||||
std::vector<float> azint_sum(azint_bins);
|
||||
std::vector<float> azint_sum2(azint_bins);
|
||||
std::vector<uint32_t> azint_count(azint_bins);
|
||||
|
||||
for (int i = 0; i < azint_count.size(); i++) {
|
||||
azint_sum[i] = 0.0f;
|
||||
azint_sum2[i] = 0.0f;
|
||||
azint_count[i] = 0;
|
||||
}
|
||||
|
||||
auto &pixel_to_bin = integration.GetPixelToBin();
|
||||
auto &corrections = integration.Corrections();
|
||||
|
||||
for (int i = 0; i < npixels; i++) {
|
||||
const uint16_t bin = pixel_to_bin[i];
|
||||
if (bin < azint_bins) {
|
||||
float val = static_cast<float>(processed_image[i]) * corrections[i];
|
||||
azint_sum[bin] += val;
|
||||
++azint_count[bin];
|
||||
}
|
||||
}
|
||||
profile.Clear(integration);
|
||||
profile.Add(azint_sum, azint_count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user