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);
132 void _resetXAxisPoints();
133 void _autoScale(
double bottom,
double top);
135 std::vector<
std::vector<
double>> d_ydata;
137 QwtPlotCurve* d_min_fft_plot_curve;
138 QwtPlotCurve* d_max_fft_plot_curve;
139 QColor d_min_fft_color;
140 bool d_min_fft_visible;
141 QColor d_max_fft_color;
142 bool d_max_fft_visible;
143 QColor d_marker_lower_intensity_color;
144 bool d_marker_lower_intensity_visible;
145 QColor d_marker_upper_intensity_color;
146 bool d_marker_upper_intensity_visible;
147 QColor d_marker_peak_amplitude_color;
148 QColor d_marker_noise_floor_amplitude_color;
149 bool d_marker_noise_floor_amplitude_visible;
150 QColor d_marker_cf_color;
152 double d_start_frequency = -1;
153 double d_stop_frequency = 1;
154 double d_center_frequency;
156 double d_ymin = -120;
157 bool d_half_freq = false;
159 QwtPlotMarker* d_lower_intensity_marker;
160 QwtPlotMarker* d_upper_intensity_marker;
162 QwtPlotMarker* d_marker_peak_amplitude;
163 QwtPlotMarker* d_marker_noise_floor_amplitude;
164 QwtPlotMarker* d_marker_cf;
166 std::vector<
double> d_xdata;
167 int d_xdata_multiplier;
169 std::vector<
double> d_min_fft_data;
170 std::vector<
double> d_max_fft_data;
172 double d_peak_frequency;
173 double d_peak_amplitude;
175 double d_noise_floor_amplitude;
177 bool d_autoscale_shot = false;
179 QwtPlotMarker* d_trigger_line;
void setAutoScale(bool state)
void setMarkerLowerIntensityVisible(bool visible)
bool min_fft_visible
Definition: FrequencyDisplayPlot.h:29
const QColor getMinFFTColor() const
void onPickerPointSelected6(const QPointF &p)
void setFrequencyRange(const double, const double, const double units=1000.0, const std::string &strunits="kHz")
void setMarkerCFColor(QColor c)
const bool getMaxFFTVisible() const
QWidget base plot to build QTGUI plotting tools.
Definition: DisplayPlot.h:52
float min(float a, float b)
void setYaxis(double min, double max) override
double getStopFrequency() const
void plotNewData(const std::vector< double *> dataPoints, const int64_t numDataPoints, const double noiseFloorAmplitude, const double peakFrequency, const double peakAmplitude, const double timeInterval)
void setUpperIntensityLevel(const double)
void setTriggerLine(double value)
void setMaxFFTColor(QColor c)
void attachTriggerLine(bool en)
double getStartFrequency() const
const QColor getMarkerLowerIntensityColor() const
void setMarkerPeakAmplitudeColor(QColor c)
void setPlotPosHalf(bool half)
QColor min_fft_color
Definition: FrequencyDisplayPlot.h:27
bool marker_lower_intensity_visible
Definition: FrequencyDisplayPlot.h:34
QColor marker_CF_color
Definition: FrequencyDisplayPlot.h:47
QColor marker_noise_floor_amplitude_color
Definition: FrequencyDisplayPlot.h:43
void showCFMarker(const bool)
void setLowerIntensityLevel(const double)
const QColor getMarkerNoiseFloorAmplitudeColor() const
const QColor getMarkerUpperIntensityColor() const
void onPickerPointSelected(const QwtDoublePoint &p)
bool max_fft_visible
Definition: FrequencyDisplayPlot.h:30
bool marker_upper_intensity_visible
Definition: FrequencyDisplayPlot.h:38
QWidget for displaying frequency domain (PSD) plots.
Definition: FrequencyDisplayPlot.h:23
const bool getMarkerUpperIntensityVisible() const
void setMarkerNoiseFloorAmplitudeVisible(bool visible)
void setYLabel(const std::string &label, const std::string &unit)
void setMarkerUpperIntensityColor(QColor c)
void setMinFFTVisible(const bool)
void setTraceColour(QColor)
QColor marker_upper_intensity_color
Definition: FrequencyDisplayPlot.h:36
const QColor getMarkerPeakAmplitudeColor() const
const bool getMinFFTVisible() const
void setMarkerNoiseFloorAmplitudeColor(QColor c)
const QColor getMaxFFTColor() const
void setBGColour(QColor c)
const bool getMarkerLowerIntensityVisible() const
QColor max_fft_color
Definition: FrequencyDisplayPlot.h:28
void setMinFFTColor(QColor c)
void setMarkerLowerIntensityColor(QColor c)
const bool getMarkerNoiseFloorAmplitudeVisible() const
bool marker_noise_floor_amplitude_visible
Definition: FrequencyDisplayPlot.h:46
void setMaxFFTVisible(const bool)
void setMarkerUpperIntensityVisible(bool visible)
const QColor getMarkerCFColor() const
QColor marker_peak_amplitude_color
Definition: FrequencyDisplayPlot.h:40
QColor marker_lower_intensity_color
Definition: FrequencyDisplayPlot.h:32