MXAnalysis: Generate rotation prediction properly
This commit is contained in:
@@ -26,11 +26,11 @@ double stddev(const std::vector<float> &v) {
|
||||
|
||||
|
||||
MXAnalysisAfterFPGA::MXAnalysisAfterFPGA(const DiffractionExperiment &in_experiment, IndexAndRefine &indexer)
|
||||
: experiment(in_experiment), indexer(indexer) {
|
||||
: experiment(in_experiment),
|
||||
indexer(indexer),
|
||||
prediction(CreateBraggPrediction(in_experiment.IsRotationIndexing())) {
|
||||
if (experiment.IsSpotFindingEnabled())
|
||||
find_spots = true;
|
||||
|
||||
prediction = CreateBraggPrediction();
|
||||
}
|
||||
|
||||
void MXAnalysisAfterFPGA::ReadFromFPGA(const DeviceOutput *output, const SpotFindingSettings &settings, size_t module_number) {
|
||||
|
||||
@@ -24,7 +24,7 @@ MXAnalysisWithoutFPGA::MXAnalysisWithoutFPGA(const DiffractionExperiment &in_exp
|
||||
mask_1bit(npixels, false),
|
||||
spotFinder(CreateImageSpotFinder(experiment.GetXPixelsNum(), experiment.GetYPixelsNum())),
|
||||
indexer(in_indexer),
|
||||
prediction(CreateBraggPrediction()),
|
||||
prediction(CreateBraggPrediction(in_experiment.IsRotationIndexing())),
|
||||
updated_image(spotFinder->GetInputBuffer()),
|
||||
azint_bins(in_integration.GetBinNumber()),
|
||||
saturation_limit(experiment.GetSaturationLimit()),
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
#include "BraggPredictionFactory.h"
|
||||
#include "BraggPredictionRotation.h"
|
||||
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
#include "../../common/CUDAWrapper.h"
|
||||
#include "BraggPredictionGPU.h"
|
||||
#endif
|
||||
|
||||
std::unique_ptr<BraggPrediction> CreateBraggPrediction(int max_reflections) {
|
||||
std::unique_ptr<BraggPrediction> CreateBraggPrediction(bool rotation_indexing, int max_reflections) {
|
||||
if (rotation_indexing)
|
||||
return std::make_unique<BraggPredictionRotation>(max_reflections);
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
if (get_gpu_count() > 0)
|
||||
return std::make_unique<BraggPredictionGPU>(max_reflections);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "BraggPrediction.h"
|
||||
|
||||
std::unique_ptr<BraggPrediction> CreateBraggPrediction(int max_reflections = 10000);
|
||||
std::unique_ptr<BraggPrediction> CreateBraggPrediction(bool rotation_indexing,
|
||||
int max_reflections = 10000);
|
||||
|
||||
#endif //JFJOCH_BRAGGPREDICTIONFACTORY_H
|
||||
Reference in New Issue
Block a user