Files
Jungfraujoch/image_analysis/bragg_integration/BraggPrediction.h
2025-10-20 20:43:44 +02:00

42 lines
1.4 KiB
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JFJOCH_BRAGGPREDICTION_H
#define JFJOCH_BRAGGPREDICTION_H
#include <vector>
#include "../../symmetry/gemmi/symmetry.hpp"
#include "../../common/CrystalLattice.h"
#include "../../common/DiffractionExperiment.h"
#include "../../common/Reflection.h"
struct BraggPredictionSettings {
float high_res_A = 1.5;
float ewald_dist_cutoff = 0.0005;
int max_hkl = 100;
char centering = 'P';
};
class BraggPrediction {
protected:
const int max_reflections;
std::vector<Reflection> reflections;
public:
explicit BraggPrediction(int max_reflections = 10000);
virtual ~BraggPrediction() = default;
virtual int Calc(const DiffractionExperiment &experiment, const CrystalLattice &lattice,
const BraggPredictionSettings &settings);
const std::vector<Reflection> &GetReflections() const;
};
std::vector<Reflection> CalcBraggPredictions(const DiffractionExperiment &experiment,
const CrystalLattice &lattice,
float high_res_A = 1.5,
float ewald_dist_cutoff = 0.0005,
int max_hkl = 100,
int max_reflections = 10000);
#endif //JFJOCH_BRAGGPREDICTION_H