41 lines
1.1 KiB
C++
41 lines
1.1 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 "../../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';
|
|
|
|
// Rotation parameters
|
|
Coord rotation_axis = Coord(1, 0, 0);
|
|
int image_number = 0;
|
|
float wedge_size_deg = 0.1f;
|
|
float mosaicity_deg = 0.1f;
|
|
};
|
|
|
|
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;
|
|
};
|
|
|
|
|
|
#endif //JFJOCH_BRAGGPREDICTION_H
|