Files
Jungfraujoch/image_analysis/bragg_prediction/BraggPrediction.h
T
leonarski_f 6c85aaba2b
Build Packages / Unit tests (push) Failing after 2s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 23m22s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 25m29s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 25m52s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 27m20s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 28m48s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 30m13s
Build Packages / build:rpm (rocky8) (push) Successful in 24m50s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 24m52s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 24m21s
Build Packages / XDS test (durin plugin) (push) Successful in 21m50s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (rocky9) (push) Successful in 27m59s
Build Packages / Build documentation (push) Successful in 1m18s
Build Packages / DIALS test (push) Successful in 31m37s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 15m24s
Build Packages / XDS test (neggia plugin) (push) Successful in 13m11s
BraggPrediction: Include X-ray bandwidth
2026-06-09 15:01:44 +02:00

44 lines
1.4 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#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';
float wedge_deg = 0.1f;
float mosaicity_deg = 0.2f;
float min_zeta = 0.05;
float mosaicity_multiplier = 4.0;
// Relative X-ray bandwidth Δλ/λ expressed as a Gaussian sigma (0 = monochromatic).
// When > 0 the Ewald-shell acceptance is thickened radially per reflection by
// σ_bw = |recip_z|·bandwidth_sigma (= bλ/2d²), so the 1/d² pink-beam smear no
// longer clips high-resolution reflections. Must stay the last member so existing
// designated initializers remain valid.
float bandwidth_sigma = 0.0f;
};
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;
};