Files
Jungfraujoch/image_analysis/RadialIntegrationProfile.h

28 lines
945 B
C++

// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef JUNGFRAUJOCH_RADIALINTEGRATIONPROFILE_H
#define JUNGFRAUJOCH_RADIALINTEGRATIONPROFILE_H
#include <vector>
#include <mutex>
#include <jfjoch.pb.h>
#include "RadialIntegrationMapping.h"
class RadialIntegrationProfile {
mutable std::mutex m;
std::vector<int64_t> sum;
std::vector<int64_t> count;
std::vector<float> bin_to_q;
std::vector<float> corrections;
public:
explicit RadialIntegrationProfile(RadialIntegrationMapping &mapping, const DiffractionExperiment &experiment);
void Add(const std::vector<int32_t> &sum, const std::vector<int32_t> &count);
std::vector<float> GetResult(bool solid_angle_correction) const;
void GetPlot(JFJochProtoBuf::Plot &plot, bool solid_angle_correction) const;
const std::vector<float> &GetSolidAngleCorr() const;
};
#endif //JUNGFRAUJOCH_RADIALINTEGRATIONPROFILE_H