Files
Jungfraujoch/image_analysis/bragg_integration/BraggIntegrationStats.h
2025-09-21 19:27:51 +02:00

36 lines
1006 B
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JFJOCH_BRAGGINTEGRATIONSTATS_H
#define JFJOCH_BRAGGINTEGRATIONSTATS_H
#include <cstdint>
#include <vector>
#include <optional>
#include "../../common/Reflection.h"
class BraggIntegrationStats {
float d_min, d_max;
float one_over_dmax;
float one_over_dmin;
int32_t nshells;
std::vector<float> I;
std::vector<float> I_sigma;
std::vector<int64_t> count;
std::vector<float> wilson_plot;
std::vector<float> wilson_plot_legend;
std::vector<float> plot_Isigma;
public:
explicit BraggIntegrationStats(float d_max_A = 6.0, float d_min_A = 1.5, int32_t nshells = 20);
void AddReflection(const Reflection &r);
std::optional<float> BFactor();
std::vector<float> GetWilsonPlot();
std::vector<float> GetWilsonPlotLegend();
std::vector<float> GetISigmaPlot();
};
#endif //JFJOCH_BRAGGINTEGRATIONSTATS_H