42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JFJOCH_MULTILINEPLOT_H
|
|
#define JFJOCH_MULTILINEPLOT_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
#include "Plot.h"
|
|
#include "GridScanSettings.h"
|
|
|
|
enum class MultiLinePlotUnits {ImageNumber, Angle_deg, Q_recipA, ADU, Grid_um, d_A };
|
|
|
|
struct MultiLinePlotStruct {
|
|
std::string title;
|
|
std::vector<float> x;
|
|
std::vector<float> y;
|
|
std::vector<float> z;
|
|
};
|
|
|
|
class MultiLinePlot {
|
|
std::optional<float> size_x, size_y;
|
|
std::vector<MultiLinePlotStruct> plots;
|
|
MultiLinePlotUnits units = MultiLinePlotUnits::ImageNumber;
|
|
public:
|
|
void AddPlot(const MultiLinePlotStruct &p);
|
|
void SetUnits(MultiLinePlotUnits input);
|
|
void SetSizeX(std::optional<float> input);
|
|
void SetSizeY(std::optional<float> input);
|
|
|
|
[[nodiscard]] const std::vector<MultiLinePlotStruct> &GetPlots() const;
|
|
[[nodiscard]] MultiLinePlotUnits GetUnits() const;
|
|
void Convert2D(const GridScanSettings& input);
|
|
|
|
[[nodiscard]] std::optional<float> GetSizeX() const;
|
|
[[nodiscard]] std::optional<float> GetSizeY() const;
|
|
};
|
|
|
|
|
|
#endif //JFJOCH_MULTILINEPLOT_H
|