11#ifndef FREQUENCY_DISPLAY_PLOT_HPP
12#define FREQUENCY_DISPLAY_PLOT_HPP
55 const double units = 1000.0,
56 const std::string& strunits =
"kHz");
61 const int64_t numDataPoints,
62 const double noiseFloorAmplitude,
63 const double peakFrequency,
64 const double peakAmplitude,
65 const double timeInterval);
69 const int64_t numDataPoints,
70 const double noiseFloorAmplitude,
71 const double peakFrequency,
72 const double peakAmplitude,
73 const double timeInterval);
122 void setYLabel(
const std::string& label,
const std::string& unit);
131 void _resetXAxisPoints();
132 void _autoScale(
double bottom,
double top);
134 std::vector<std::vector<double>> d_ydata;
136 QwtPlotCurve* d_min_fft_plot_curve;
137 QwtPlotCurve* d_max_fft_plot_curve;
138 QColor d_min_fft_color;
139 bool d_min_fft_visible;
140 QColor d_max_fft_color;
141 bool d_max_fft_visible;
142 QColor d_marker_lower_intensity_color;
143 bool d_marker_lower_intensity_visible;
144 QColor d_marker_upper_intensity_color;
145 bool d_marker_upper_intensity_visible;
146 QColor d_marker_peak_amplitude_color;
147 QColor d_marker_noise_floor_amplitude_color;
148 bool d_marker_noise_floor_amplitude_visible;
149 QColor d_marker_cf_color;
151 double d_start_frequency = -1;
152 double d_stop_frequency = 1;
153 double d_center_frequency;
155 double d_ymin = -120;
156 bool d_half_freq =
false;
158 QwtPlotMarker* d_lower_intensity_marker;
159 QwtPlotMarker* d_upper_intensity_marker;
161 QwtPlotMarker* d_marker_peak_amplitude;
162 QwtPlotMarker* d_marker_noise_floor_amplitude;
163 QwtPlotMarker* d_marker_cf;
165 std::vector<double> d_xdata;
166 int d_xdata_multiplier;
168 std::vector<double> d_min_fft_data;
169 std::vector<double> d_max_fft_data;
171 double d_peak_frequency;
172 double d_peak_amplitude;
174 double d_noise_floor_amplitude;
176 bool d_autoscale_shot =
false;
178 QwtPlotMarker* d_trigger_line;
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:42
QWidget for displaying frequency domain (PSD) plots.
Definition: FrequencyDisplayPlot.h:24
void setMarkerLowerIntensityColor(QColor c)
void showCFMarker(const bool)
~FrequencyDisplayPlot() override
QColor min_fft_color
Definition: FrequencyDisplayPlot.h:27
void setMarkerNoiseFloorAmplitudeVisible(bool visible)
void setMarkerCFColor(QColor c)
void setMinFFTColor(QColor c)
void setYLabel(const std::string &label, const std::string &unit)
QColor max_fft_color
Definition: FrequencyDisplayPlot.h:28
void setMarkerUpperIntensityColor(QColor c)
QColor marker_lower_intensity_color
Definition: FrequencyDisplayPlot.h:32
void setPlotPosHalf(bool half)
void setMarkerPeakAmplitudeColor(QColor c)
FrequencyDisplayPlot(int nplots, QWidget *)
void setMarkerNoiseFloorAmplitudeColor(QColor c)
void setMaxFFTVisible(const bool)
void setTriggerLine(double value)
const QColor getMaxFFTColor() const
QColor marker_CF_color
Definition: FrequencyDisplayPlot.h:47
double getStartFrequency() const
bool marker_lower_intensity_visible
Definition: FrequencyDisplayPlot.h:34
const bool getMarkerLowerIntensityVisible() const
const QColor getMarkerLowerIntensityColor() const
void setAutoScale(bool state)
void plotNewData(const double *dataPoints, const int64_t numDataPoints, const double noiseFloorAmplitude, const double peakFrequency, const double peakAmplitude, const double timeInterval)
void attachTriggerLine(bool en)
const bool getMarkerUpperIntensityVisible() const
const QColor getMarkerCFColor() const
bool marker_noise_floor_amplitude_visible
Definition: FrequencyDisplayPlot.h:46
QColor marker_peak_amplitude_color
Definition: FrequencyDisplayPlot.h:40
const QColor getMinFFTColor() const
void setMaxFFTColor(QColor c)
void setFrequencyRange(const double, const double, const double units=1000.0, const std::string &strunits="kHz")
void setBGColour(QColor c)
void setLowerIntensityLevel(const double)
const QColor getMarkerNoiseFloorAmplitudeColor() const
void setUpperIntensityLevel(const double)
void setTraceColour(QColor)
void setYaxis(double min, double max) override
QColor marker_upper_intensity_color
Definition: FrequencyDisplayPlot.h:36
const QColor getMarkerUpperIntensityColor() const
void setMarkerLowerIntensityVisible(bool visible)
double getStopFrequency() const
const bool getMarkerNoiseFloorAmplitudeVisible() const
bool min_fft_visible
Definition: FrequencyDisplayPlot.h:29
void plotNewData(const std::vector< double * > dataPoints, const int64_t numDataPoints, const double noiseFloorAmplitude, const double peakFrequency, const double peakAmplitude, const double timeInterval)
void setMinFFTVisible(const bool)
const bool getMaxFFTVisible() const
const QColor getMarkerPeakAmplitudeColor() const
QColor marker_noise_floor_amplitude_color
Definition: FrequencyDisplayPlot.h:43
void setMarkerUpperIntensityVisible(bool visible)
bool max_fft_visible
Definition: FrequencyDisplayPlot.h:30
const bool getMinFFTVisible() const
void onPickerPointSelected(const QPointF &p)
bool marker_upper_intensity_visible
Definition: FrequencyDisplayPlot.h:38
float min(float a, float b)