v1.0.0-rc.70
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
|
||||
#include "ImageAnalysisCPU.h"
|
||||
|
||||
#include "StrongPixelSet.h"
|
||||
#include "spot_finding/StrongPixelSet.h"
|
||||
#include "../compression/JFJochDecompress.h"
|
||||
#include "SpotAnalysis.h"
|
||||
#include "spot_finding/SpotAnalysis.h"
|
||||
#include "geom_refinement/XtalOptimizer.h"
|
||||
|
||||
ImageAnalysisCPU::ImageAnalysisCPU(const DiffractionExperiment &in_experiment,
|
||||
const AzimuthalIntegration &in_integration,
|
||||
@@ -163,13 +164,41 @@ void ImageAnalysisCPU::Analyze(DataMessage &output,
|
||||
if ((indexer != nullptr) && spot_finding_settings.indexing) {
|
||||
auto latt_f = indexer->Run(experiment, output);
|
||||
auto latt = latt_f.get();
|
||||
if (latt && spot_finding_settings.quick_integration) {
|
||||
auto img = CompressedImage(updated_image, experiment.GetXPixelsNum(),
|
||||
experiment.GetYPixelsNum());
|
||||
auto res = BraggIntegrate2D(experiment, img, latt.value());
|
||||
|
||||
output.reflections = res.reflections;
|
||||
output.b_factor = res.b_factor;
|
||||
if (latt) {
|
||||
DiffractionExperiment experiment_copy(experiment);
|
||||
XtalOptimizerData data{
|
||||
.geom = experiment_copy.GetDiffractionGeometry(),
|
||||
.latt = latt.value()
|
||||
};
|
||||
switch (experiment.GetIndexingSettings().GetGeomRefinementAlgorithm()) {
|
||||
case GeomRefinementAlgorithmEnum::None:
|
||||
break;
|
||||
case GeomRefinementAlgorithmEnum::BeamCenter:
|
||||
XtalOptimizer(data, output.spots, false);
|
||||
experiment_copy.BeamX_pxl(data.geom.GetBeamX_pxl()).BeamY_pxl(data.geom.GetBeamY_pxl());
|
||||
output.beam_center_x = data.geom.GetBeamX_pxl();
|
||||
output.beam_center_y = data.geom.GetBeamY_pxl();
|
||||
latt = data.latt;
|
||||
output.indexing_lattice = data.latt;
|
||||
break;
|
||||
case GeomRefinementAlgorithmEnum::BeamCenterTetragonal:
|
||||
XtalOptimizer(data, output.spots, true);
|
||||
experiment_copy.BeamX_pxl(data.geom.GetBeamX_pxl()).BeamY_pxl(data.geom.GetBeamY_pxl());
|
||||
output.beam_center_x = data.geom.GetBeamX_pxl();
|
||||
output.beam_center_y = data.geom.GetBeamY_pxl();
|
||||
latt = data.latt;
|
||||
output.indexing_lattice = data.latt;
|
||||
break;
|
||||
}
|
||||
|
||||
if (spot_finding_settings.quick_integration) {
|
||||
auto img = CompressedImage(updated_image, experiment.GetXPixelsNum(), experiment.GetYPixelsNum());
|
||||
auto res = BraggIntegrate2D(experiment_copy, img, latt.value());
|
||||
|
||||
output.reflections = res.reflections;
|
||||
output.b_factor = res.b_factor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user