Fixed plotting for new measurement structure.

This commit is contained in:
jupfi 2024-06-09 20:23:01 +02:00
parent 80860ddbb7
commit 1b4160afda

View file

@ -186,9 +186,9 @@ class MeasurementView(ModuleView):
if self.module.model.view_mode == self.module.model.FFT_VIEW: if self.module.model.view_mode == self.module.model.FFT_VIEW:
self.change_to_fft_view() self.change_to_fft_view()
y = self.module.model.displayed_measurement.fdy y = self.module.model.displayed_measurement.fdy[0]
x = ( x = (
self.module.model.displayed_measurement.fdx self.module.model.displayed_measurement.fdx[0]
+ float( + float(
self.module.model.displayed_measurement.target_frequency self.module.model.displayed_measurement.target_frequency
- self.module.model.displayed_measurement.IF_frequency - self.module.model.displayed_measurement.IF_frequency
@ -197,8 +197,8 @@ class MeasurementView(ModuleView):
) )
else: else:
self.change_to_time_view() self.change_to_time_view()
x = self.module.model.displayed_measurement.tdx x = self.module.model.displayed_measurement.tdx[0]
y = self.module.model.displayed_measurement.tdy y = self.module.model.displayed_measurement.tdy[0]
self._ui_form.plotter.canvas.ax.plot( self._ui_form.plotter.canvas.ax.plot(
x, y.real, label="Real", linestyle="-", alpha=0.35, color="red" x, y.real, label="Real", linestyle="-", alpha=0.35, color="red"