// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #ifndef JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H #define JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H #include #include #include "Plot.h" #include "AzimuthalIntegration.h" #include "../acquisition_device/AcquisitionDevice.h" class AzimuthalIntegrationProfile { mutable std::mutex m; std::vector sum; std::vector count; std::vector bin_to_q; std::string title; public: explicit AzimuthalIntegrationProfile(const AzimuthalIntegration &mapping); void Clear(const AzimuthalIntegration &mapping); void SetTitle(const std::string& input); void Add(const DeviceOutput &result); void Add(const std::vector &sum, const std::vector &count); std::vector GetResult() const; float GetMeanValueOfBins(uint16_t min_bin, uint16_t max_bin) const; float GetBkgEstimate(const AzimuthalIntegrationSettings& settings) const; MultiLinePlot GetPlot() const; AzimuthalIntegrationProfile& operator+=(const AzimuthalIntegrationProfile& profile); // Not thread safe }; #endif //JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H