34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
// Copyright (2019-2023) Paul Scherrer Institute
|
|
|
|
#ifndef JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H
|
|
#define JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H
|
|
|
|
#include <vector>
|
|
#include <mutex>
|
|
#include "../common/Plot.h"
|
|
|
|
#include "AzimuthalIntegrationMapping.h"
|
|
#include "../acquisition_device/AcquisitionDevice.h"
|
|
|
|
class AzimuthalIntegrationProfile {
|
|
mutable std::mutex m;
|
|
std::vector<float> sum;
|
|
std::vector<uint64_t> count;
|
|
std::vector<float> bin_to_q;
|
|
std::string title;
|
|
public:
|
|
explicit AzimuthalIntegrationProfile(const AzimuthalIntegrationMapping &mapping);
|
|
AzimuthalIntegrationProfile(const AzimuthalIntegrationProfile& other); // Not thread safe
|
|
AzimuthalIntegrationProfile(AzimuthalIntegrationProfile&& other) noexcept; // Not thread safe
|
|
AzimuthalIntegrationProfile& operator=(const AzimuthalIntegrationProfile& other); //Not thread safe
|
|
void SetTitle(const std::string& input);
|
|
void Add(const DeviceOutput &result);
|
|
void Add(const std::vector<float> &sum, const std::vector<uint32_t> &count);
|
|
std::vector<float> GetResult() const;
|
|
float GetMeanValueOfBins(uint16_t min_bin, uint16_t max_bin) const;
|
|
MultiLinePlot GetPlot() const;
|
|
AzimuthalIntegrationProfile& operator+=(const AzimuthalIntegrationProfile& profile);
|
|
};
|
|
|
|
#endif //JUNGFRAUJOCH_AZIMUTHALINTEGRATIONPROFILE_H
|