Bragg integration: option to use azimuthal integration profile

This commit is contained in:
2026-06-10 14:41:36 +02:00
parent e051eed033
commit e4230bc14e
15 changed files with 218 additions and 115 deletions
+7 -7
View File
@@ -239,8 +239,8 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
const CompressedImage &image,
BraggPrediction &prediction,
const IndexAndRefine::IndexingOutcome &outcome,
const AzimuthalIntegrationMapping *mapping,
const AzimuthalIntegrationProfile *profile) {
const AzimuthalIntegrationMapping &mapping,
const AzimuthalIntegrationProfile &profile) {
if (!outcome.lattice_candidate)
return;
@@ -299,11 +299,11 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
// integrated reflections that flow into the normal save/merge).
const bool use_pixel_refine =
experiment.GetIndexingSettings().GetGeomRefinementAlgorithm() == GeomRefinementAlgorithmEnum::PixelRefine
&& !pixel_reference_.empty() && mapping && profile;
&& !pixel_reference_.empty();
if (use_pixel_refine) {
auto integration_start_time = std::chrono::steady_clock::now();
PixelRefineIntegrate(msg, image, prediction, outcome, *mapping, *profile, i_outcome);
PixelRefineIntegrate(msg, image, prediction, outcome, mapping, profile, i_outcome);
msg.integrated_reflections = i_outcome.reflections.size();
auto integration_end_time = std::chrono::steady_clock::now();
msg.integration_time_s = std::chrono::duration<float>(integration_end_time - integration_start_time).count();
@@ -314,7 +314,7 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
msg.bragg_prediction_time_s = std::chrono::duration<float>(pred_end_time - pred_start_time).count();
auto integration_start_time = std::chrono::steady_clock::now();
i_outcome.reflections = BraggIntegrate2D(outcome.experiment, image, prediction.GetReflections(), nrefl, msg.number);
i_outcome.reflections = BraggIntegrate2D(outcome.experiment, image, prediction.GetReflections(), mapping, profile, nrefl, msg.number);
msg.integrated_reflections = i_outcome.reflections.size();
auto integration_end_time = std::chrono::steady_clock::now();
msg.integration_time_s = std::chrono::duration<float>(integration_end_time - integration_start_time).count();
@@ -357,8 +357,8 @@ void IndexAndRefine::ProcessImage(DataMessage &msg,
const SpotFindingSettings &spot_finding_settings,
const CompressedImage &image,
BraggPrediction &prediction,
const AzimuthalIntegrationMapping *mapping,
const AzimuthalIntegrationProfile *profile) {
const AzimuthalIntegrationMapping &mapping,
const AzimuthalIntegrationProfile &profile) {
if (!indexer_ || !spot_finding_settings.indexing)
return;