Compare commits
5 Commits
24f270a2a4
...
2dc6bb5f3f
| Author | SHA1 | Date |
|---|---|---|
|
|
2dc6bb5f3f | |
|
|
7d9726fbd6 | |
|
|
334390abdb | |
|
|
583da806e4 | |
|
|
ef8efd4f78 |
|
|
@ -560,7 +560,6 @@ class ReadTableForOpen:
|
|||
+ list(stg.radius_grain_sand)
|
||||
)
|
||||
|
||||
@trace
|
||||
def read_table_table_sediment_data(self):
|
||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||
|
||||
|
|
@ -618,7 +617,6 @@ class ReadTableForOpen:
|
|||
|
||||
logger.debug(f"fine: {stg.Ctot_fine}, sand: {stg.sample_sand}")
|
||||
|
||||
@trace
|
||||
def read_table_table_calibration_parameters(self):
|
||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||
|
||||
|
|
@ -681,7 +679,6 @@ class ReadTableForOpen:
|
|||
)
|
||||
)
|
||||
|
||||
@trace
|
||||
def read_table_table_calibration(self):
|
||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||
|
||||
|
|
@ -714,7 +711,6 @@ class ReadTableForOpen:
|
|||
stg.depth_real = np_f64_parse(next(it)).tolist()
|
||||
stg.lin_reg = np_f64_parse(next(it)).tolist()
|
||||
|
||||
@trace
|
||||
def read_table_table_notes(self):
|
||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ class AcousticDataTab(QWidget):
|
|||
super().__init__()
|
||||
|
||||
self._setup_icons()
|
||||
self._setup_attrs()
|
||||
|
||||
self.calib_kt = CalibrationConstantKt()
|
||||
|
||||
|
|
@ -731,10 +732,12 @@ class AcousticDataTab(QWidget):
|
|||
self.icon_between = QPixmap(path_icon("between.png"))
|
||||
self.icon_refresh = QIcon(path_icon("update.png"))
|
||||
|
||||
def _setup_attrs(self):
|
||||
self.fig_profile = None
|
||||
self.fig_BS = None
|
||||
|
||||
# -------------------- Functions for Acoustic dataTab --------------------
|
||||
|
||||
@trace
|
||||
def full_update(self):
|
||||
logger.debug(f"{__name__}: Update")
|
||||
self.blockSignals(True)
|
||||
|
|
@ -1393,6 +1396,7 @@ class AcousticDataTab(QWidget):
|
|||
|
||||
self.open_acoustic_data()
|
||||
|
||||
@trace
|
||||
def open_acoustic_data(self):
|
||||
# --- Fill lineEdit with path and file names + load acoustic data ---
|
||||
# --- fill date, hour and measurements information + fill frequency combobox for bottom detection ---
|
||||
|
|
@ -2379,6 +2383,9 @@ class AcousticDataTab(QWidget):
|
|||
layout.removeWidget(self.toolbar_BS)
|
||||
layout.removeWidget(self.scroll_BS)
|
||||
|
||||
if self.fig_BS is not None:
|
||||
self.fig_BS.clear()
|
||||
|
||||
self.fig_BS, self.axis_BS = plt.subplots(
|
||||
nrows=stg.freq[file_id].shape[0],
|
||||
ncols=1, sharex=False, sharey=False,
|
||||
|
|
@ -2465,6 +2472,9 @@ class AcousticDataTab(QWidget):
|
|||
return
|
||||
|
||||
if len(self.axis_BS.tolist()) != stg.freq[data_id].shape[0]:
|
||||
if self.fig_BS is not None:
|
||||
self.fig_BS.clear()
|
||||
|
||||
self.fig_BS, self.axis_BS = plt.subplots(
|
||||
nrows=stg.freq[data_id].shape[0],
|
||||
ncols=1,
|
||||
|
|
@ -2553,6 +2563,9 @@ class AcousticDataTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_profile.removeWidget(self.canvas_plot_profile)
|
||||
|
||||
# --- Figure to plot profiles ---
|
||||
if self.fig_profile is not None:
|
||||
self.fig_profile.clear()
|
||||
|
||||
self.fig_profile, self.axis_profile = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
self.canvas_plot_profile = FigureCanvas(self.fig_profile)
|
||||
self.toolbar_profile = NavigationToolBar(self.canvas_plot_profile, self)
|
||||
|
|
@ -2867,10 +2880,9 @@ class AcousticDataTab(QWidget):
|
|||
break
|
||||
else:
|
||||
ind_bottom = np.where(
|
||||
(BS_smooth[ind_min:ind_max, d])
|
||||
== val_bottom[d]
|
||||
(BS_smooth[ind_min:ind_max, d]) == val_bottom[d]
|
||||
)[0][0]
|
||||
np.append(stg.ind_bottom, ind_bottom)
|
||||
# np.append(stg.ind_bottom, ind_bottom)
|
||||
|
||||
r_bottom[d] = depth_data[data_id][
|
||||
freq_id, ind_bottom + ind_min
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ class AcousticInversionTab(QWidget):
|
|||
self.inv_hc = AcousticInversionMethodHighConcentration()
|
||||
|
||||
self._setup_icons()
|
||||
self._setup_attrs()
|
||||
self._setup_general_layout(widget_tab)
|
||||
self._setup_connections()
|
||||
|
||||
|
|
@ -444,7 +445,14 @@ class AcousticInversionTab(QWidget):
|
|||
self.pushbutton_plot_sand_sample_choice\
|
||||
.clicked.connect(self.plot_measured_vs_inverted_SSC_sand)
|
||||
|
||||
@trace
|
||||
def _setup_attrs(self):
|
||||
self.figure_SSC_fine = None
|
||||
self.figure_SSC_sand = None
|
||||
self.figure_vertical_profile_SSC_fine = None
|
||||
self.figure_vertical_profile_SSC_sand = None
|
||||
self.figure_measured_vs_inverted_fine = None
|
||||
self.figure_measured_vs_inverted_sand = None
|
||||
|
||||
def full_update(self):
|
||||
logger.debug(f"{__name__}: Update")
|
||||
self.blockSignals(True)
|
||||
|
|
@ -585,6 +593,9 @@ class AcousticInversionTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_SSC_fine.removeWidget(self.toolbar_SSC_fine)
|
||||
self.verticalLayout_groupbox_plot_SSC_fine.removeWidget(self.canvas_SSC_fine)
|
||||
|
||||
if self.figure_SSC_fine is not None:
|
||||
self.figure_SSC_fine.clear()
|
||||
|
||||
self.figure_SSC_fine, self.axis_SSC_fine = plt.subplots(
|
||||
nrows=1, ncols=1, layout="constrained"
|
||||
)
|
||||
|
|
@ -710,6 +721,9 @@ class AcousticInversionTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_vertical_profile_fine\
|
||||
.removeWidget(self.canvas_profile_fine)
|
||||
|
||||
if self.figure_vertical_profile_SSC_fine is not None:
|
||||
self.figure_vertical_profile_SSC_fine.clear()
|
||||
|
||||
fig, ax = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
self.figure_vertical_profile_SSC_fine = fig
|
||||
self.axis_vertical_profile_SSC_fine = ax
|
||||
|
|
@ -990,6 +1004,9 @@ class AcousticInversionTab(QWidget):
|
|||
self.canvas_inverted_vs_measured_SSC_fine, self
|
||||
)
|
||||
else:
|
||||
if self.figure_measured_vs_inverted_fine is not None:
|
||||
self.figure_measured_vs_inverted_fine.clear()
|
||||
|
||||
fig, ax = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
|
||||
self.figure_measured_vs_inverted_fine = fig
|
||||
|
|
@ -1130,6 +1147,9 @@ class AcousticInversionTab(QWidget):
|
|||
self.canvas_SSC_sand = FigureCanvas()
|
||||
self.toolbar_SSC_sand = NavigationToolBar(self.canvas_SSC_sand, self)
|
||||
else:
|
||||
if self.figure_SSC_sand is not None:
|
||||
self.figure_SSC_sand.clear()
|
||||
|
||||
self.figure_SSC_sand, self.axis_SSC_sand = plt.subplots(
|
||||
nrows=1, ncols=1, layout="constrained"
|
||||
)
|
||||
|
|
@ -1254,8 +1274,14 @@ class AcousticInversionTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_vertical_profile_sand.removeWidget(self.toolbar_profile_sand)
|
||||
self.verticalLayout_groupbox_plot_vertical_profile_sand.removeWidget(self.canvas_profile_sand)
|
||||
|
||||
self.figure_vertical_profile_SSC_sand, self.axis_vertical_profile_SSC_sand = plt.subplots(
|
||||
nrows=1, ncols=1, layout="constrained")
|
||||
if self.figure_vertical_profile_SSC_sand is not None:
|
||||
self.figure_vertical_profile_SSC_sand.clear()
|
||||
|
||||
fig, ax = plt.subplots(
|
||||
nrows=1, ncols=1, layout="constrained"
|
||||
)
|
||||
self.figure_vertical_profile_SSC_sand = fig
|
||||
self.axis_vertical_profile_SSC_sand = ax
|
||||
|
||||
self.canvas_profile_sand = FigureCanvas(self.figure_vertical_profile_SSC_sand)
|
||||
self.toolbar_profile_sand = NavigationToolBar(self.canvas_profile_sand, self)
|
||||
|
|
@ -1620,8 +1646,13 @@ class AcousticInversionTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand.removeWidget(
|
||||
self.canvas_inverted_vs_measured_SSC_sand)
|
||||
|
||||
self.figure_measured_vs_inverted_sand, self.axis_measured_vs_inverted_sand = (
|
||||
plt.subplots(nrows=1, ncols=1, layout="constrained"))
|
||||
if self.figure_measured_vs_inverted_sand is not None:
|
||||
self.figure_measured_vs_inverted_sand.clear()
|
||||
|
||||
fig, ax = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
self.figure_measured_vs_inverted_sand = fig
|
||||
self.axis_measured_vs_inverted_sand = ax
|
||||
|
||||
|
||||
self.canvas_inverted_vs_measured_SSC_sand = FigureCanvas(self.figure_measured_vs_inverted_sand)
|
||||
self.toolbar_inverted_vs_measured_SSC_sand = NavigationToolBar(self.canvas_inverted_vs_measured_SSC_sand, self)
|
||||
|
|
|
|||
|
|
@ -153,7 +153,6 @@ class NoteTab(QWidget):
|
|||
## ---------- Functions ----------
|
||||
## -------------------------------
|
||||
|
||||
@trace
|
||||
def full_update(self):
|
||||
self.blockSignals(True)
|
||||
self.textEdit.blockSignals(True)
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ class SampleDataTab(QWidget):
|
|||
super().__init__()
|
||||
|
||||
icon_folder = QIcon(os.path.join("icons", "folder.png"))
|
||||
self._setup_attrs()
|
||||
|
||||
### --- General layout of widgets ---
|
||||
|
||||
|
|
@ -257,6 +258,11 @@ class SampleDataTab(QWidget):
|
|||
|
||||
self.combobox_PSD_plot.currentTextChanged.connect(self.plot_PSD_fine_and_sand_sediments)
|
||||
|
||||
def _setup_attrs(self):
|
||||
self.figure_plot_sample_position_on_transect = None
|
||||
self.figure_total_concentration = None
|
||||
self.figure_plot_PSD = None
|
||||
|
||||
# -------------------- Functions for Sample Data Tab --------------------
|
||||
|
||||
def retranslate_data_sample_tab(self):
|
||||
|
|
@ -280,7 +286,6 @@ class SampleDataTab(QWidget):
|
|||
|
||||
self.groupbox_plot_PSD.setTitle(_translate("CONSTANT_STRING", cs.DISTRIBUTION_PLOT))
|
||||
|
||||
@trace
|
||||
def full_update(self):
|
||||
logger.debug(f"{__name__}: Update")
|
||||
self.blockSignals(True)
|
||||
|
|
@ -790,6 +795,9 @@ class SampleDataTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_transect\
|
||||
.removeWidget(self.canvas_plot_sample_position_on_transect)
|
||||
|
||||
if self.figure_plot_sample_position_on_transect is not None:
|
||||
self.figure_plot_sample_position_on_transect.clear()
|
||||
|
||||
fig, axis = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
|
||||
self.figure_plot_sample_position_on_transect = fig
|
||||
|
|
@ -1415,6 +1423,9 @@ class SampleDataTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_total_concentration.removeWidget(self.canvas_plot_total_concentration)
|
||||
self.verticalLayout_groupbox_plot_total_concentration.removeWidget(self.toolbar_plot_total_concentration)
|
||||
|
||||
if self.figure_total_concentration is not None:
|
||||
self.figure_total_concentration.clear()
|
||||
|
||||
self.figure_total_concentration, self.axis_total_concentration \
|
||||
= plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
self.canvas_plot_total_concentration = FigureCanvas(self.figure_total_concentration)
|
||||
|
|
@ -1700,6 +1711,9 @@ class SampleDataTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_PSD.removeWidget(self.canvas_plot_PSD)
|
||||
self.verticalLayout_groupbox_plot_PSD.removeWidget(self.toolbar_plot_PSD)
|
||||
|
||||
if self.figure_plot_PSD is not None:
|
||||
self.figure_plot_PSD.clear()
|
||||
|
||||
self.figure_plot_PSD, self.axis_plot_PSD \
|
||||
= plt.subplots(nrows=1, ncols=2, layout="constrained")
|
||||
self.canvas_plot_PSD = FigureCanvas(self.figure_plot_PSD)
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ class SedimentCalibrationTab(QWidget):
|
|||
self.inv_hc = AcousticInversionMethodHighConcentration()
|
||||
|
||||
self._setup_icons()
|
||||
self._setup_attrs()
|
||||
self._setup_widgets()
|
||||
|
||||
def _path_icon(self, icon):
|
||||
|
|
@ -84,6 +85,10 @@ class SedimentCalibrationTab(QWidget):
|
|||
self.icon_approved = QIcon(self._path_icon("approved.png"))
|
||||
self.icon_no_approved = QIcon(self._path_icon("no_approved.png"))
|
||||
|
||||
def _setup_attrs(self):
|
||||
self.fig_BS = None
|
||||
self.fig_Mfine = None
|
||||
self.fig_FCB = None
|
||||
|
||||
def _setup_widgets(self):
|
||||
self.verticalLayoutMain = QVBoxLayout(self._widget_tab)
|
||||
|
|
@ -859,7 +864,6 @@ class SedimentCalibrationTab(QWidget):
|
|||
self.fit_FCB_profile_with_linear_regression_and_compute_alphaS
|
||||
)
|
||||
|
||||
@trace
|
||||
def full_update(self):
|
||||
logger.debug(f"{__name__}: Update")
|
||||
self.blockSignals(True)
|
||||
|
|
@ -1030,6 +1034,10 @@ class SedimentCalibrationTab(QWidget):
|
|||
# --- Plot acoustic data recording ---
|
||||
self.verticalLayout_groupbox_data_plot.removeWidget(self.toolbar_BS)
|
||||
self.verticalLayout_groupbox_data_plot.removeWidget(self.canvas_BS)
|
||||
|
||||
if self.fig_BS is not None:
|
||||
self.fig_BS.clear()
|
||||
|
||||
self.fig_BS, self.axis_BS = plt.subplots(
|
||||
nrows=1, ncols=1, sharex=True, sharey=False,
|
||||
layout='constrained'
|
||||
|
|
@ -1393,6 +1401,10 @@ class SedimentCalibrationTab(QWidget):
|
|||
# --- Plot profile of the concentration of the fine sediments ---
|
||||
self.verticalLayout_groupbox_interpolate_plot.removeWidget(self.canvas_Mfine)
|
||||
self.verticalLayout_groupbox_interpolate_plot.removeWidget(self.toolbar_Mfine)
|
||||
|
||||
if self.fig_Mfine is not None:
|
||||
self.fig_Mfine.clear()
|
||||
|
||||
self.fig_Mfine, self.ax_Mfine = plt.subplots(1, 1, layout="constrained")
|
||||
self.canvas_Mfine = FigureCanvas(self.fig_Mfine)
|
||||
self.toolbar_Mfine = NavigationToolBar(self.canvas_Mfine, self)
|
||||
|
|
@ -2326,6 +2338,9 @@ class SedimentCalibrationTab(QWidget):
|
|||
self.verticalLayout_groupbox_FCB_plot.removeWidget(self.canvas_FCB)
|
||||
self.verticalLayout_groupbox_FCB_plot.removeWidget(self.toolbar_FCB)
|
||||
|
||||
if self.fig_FCB is not None:
|
||||
self.fig_FCB.clear()
|
||||
|
||||
self.fig_FCB, self.axis_FCB = plt.subplots(
|
||||
nrows=1, ncols=1, layout="constrained"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class SignalProcessingTab(QWidget):
|
|||
|
||||
|
||||
self._setup_icons()
|
||||
self._setup_attrs()
|
||||
|
||||
### --- General layout of widgets ---
|
||||
|
||||
|
|
@ -511,7 +512,13 @@ class SignalProcessingTab(QWidget):
|
|||
self.icon_clear = QIcon(path_icon("clear.png"))
|
||||
self.icon_apply = QIcon(path_icon("circle_green_arrow_right.png"))
|
||||
|
||||
@trace
|
||||
def _setup_attrs(self):
|
||||
self.fig_profile_tail = None
|
||||
self.fig_noise = None
|
||||
self.fig_SNR = None
|
||||
self.fig_BS = None
|
||||
self.figure_profile = None
|
||||
|
||||
def full_update(self):
|
||||
logger.debug(f"{__name__}: Update")
|
||||
self.blockSignals(True)
|
||||
|
|
@ -783,44 +790,61 @@ class SignalProcessingTab(QWidget):
|
|||
msgBox.exec()
|
||||
|
||||
else:
|
||||
data_id = self.combobox_acoustic_data_choice.currentIndex()
|
||||
freq_noise_id = self.combobox_freq_noise_from_profile_tail.currentIndex()
|
||||
|
||||
if stg.BS_mean[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
|
||||
if stg.BS_mean[data_id].shape == (0,):
|
||||
return
|
||||
|
||||
self.verticalLayout_groupbox_plot_profile_tail.removeWidget(self.canvas_profile_tail)
|
||||
|
||||
self.fig_profile_tail, self.axis_profile_tail = plt.subplots(nrows=1, ncols=1, layout='constrained')
|
||||
if self.fig_profile_tail is not None:
|
||||
self.fig_profile_tail.clear()
|
||||
|
||||
self.fig_profile_tail, self.axis_profile_tail = \
|
||||
plt.subplots(nrows=1, ncols=1, layout='constrained')
|
||||
self.canvas_profile_tail = FigureCanvas(self.fig_profile_tail)
|
||||
|
||||
self.verticalLayout_groupbox_plot_profile_tail.addWidget(self.canvas_profile_tail)
|
||||
|
||||
self.axis_profile_tail.plot(
|
||||
-stg.depth[self.combobox_acoustic_data_choice.currentIndex()][self.combobox_freq_noise_from_profile_tail.currentIndex()],
|
||||
stg.BS_mean[self.combobox_acoustic_data_choice.currentIndex()][self.combobox_freq_noise_from_profile_tail.currentIndex()],
|
||||
color="blue", linewidth=1)
|
||||
-stg.depth[data_id][freq_noise_id],
|
||||
stg.BS_mean[data_id][freq_noise_id],
|
||||
color="blue", linewidth=1
|
||||
)
|
||||
self.axis_profile_tail.plot(
|
||||
-stg.depth[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
self.combobox_freq_noise_from_profile_tail.currentIndex()],
|
||||
float(self.lineEdit_profile_tail_value.text().replace(",", ".")) *
|
||||
np.ones(stg.depth[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
self.combobox_freq_noise_from_profile_tail.currentIndex()].shape[0]),
|
||||
linestyle='dashed', linewidth=2, color='red')
|
||||
-stg.depth[data_id][freq_noise_id],
|
||||
float(self.lineEdit_profile_tail_value.text().replace(",", "."))
|
||||
* np.ones(stg.depth[data_id][freq_noise_id].shape[0]),
|
||||
linestyle='dashed', linewidth=2, color='red'
|
||||
)
|
||||
|
||||
self.axis_profile_tail.set_yscale('log')
|
||||
self.axis_profile_tail.tick_params(axis='both', labelsize=8)
|
||||
self.axis_profile_tail.text(.98, .03, "Depth (m)",
|
||||
fontsize=8, fontweight='bold', fontname="DejaVu Sans", c="black", alpha=0.9,
|
||||
horizontalalignment='right', verticalalignment='bottom', rotation='horizontal',
|
||||
transform=self.axis_profile_tail.transAxes)
|
||||
self.axis_profile_tail.text(.1, .45, "BS signal (v)",
|
||||
fontsize=8, fontweight='bold', fontname="DejaVu Sans", c="black", alpha=0.9,
|
||||
horizontalalignment='right', verticalalignment='bottom', rotation='vertical',
|
||||
transform=self.axis_profile_tail.transAxes)
|
||||
self.axis_profile_tail.text(.98, .85,
|
||||
stg.freq_text[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
self.combobox_freq_noise_from_profile_tail.currentIndex()],
|
||||
fontsize=10, fontweight='bold', fontname="DejaVu Sans", c="black", alpha=0.5,
|
||||
self.axis_profile_tail.text(
|
||||
.98, .03, "Depth (m)",
|
||||
fontsize=8, fontweight='bold',
|
||||
fontname="DejaVu Sans", c="black", alpha=0.9,
|
||||
horizontalalignment='right',
|
||||
verticalalignment='bottom', rotation='horizontal',
|
||||
transform=self.axis_profile_tail.transAxes
|
||||
)
|
||||
self.axis_profile_tail.text(
|
||||
.1, .45, "BS signal (v)",
|
||||
fontsize=8, fontweight='bold',
|
||||
fontname="DejaVu Sans", c="black", alpha=0.9,
|
||||
horizontalalignment='right',
|
||||
verticalalignment='bottom', rotation='vertical',
|
||||
transform=self.axis_profile_tail.transAxes
|
||||
)
|
||||
self.axis_profile_tail.text(
|
||||
.98, .85,
|
||||
stg.freq_text[data_id][freq_noise_id],
|
||||
fontsize=10, fontweight='bold',
|
||||
fontname="DejaVu Sans", c="black", alpha=0.5,
|
||||
horizontalalignment='right', verticalalignment='bottom',
|
||||
transform=self.axis_profile_tail.transAxes)
|
||||
transform=self.axis_profile_tail.transAxes
|
||||
)
|
||||
|
||||
self.fig_profile_tail.canvas.draw_idle()
|
||||
|
||||
|
|
@ -1142,7 +1166,12 @@ class SignalProcessingTab(QWidget):
|
|||
def plot_noise(self):
|
||||
self.horizontalLayout_groupbox_plot_noise_data.removeWidget(self.canvas_noise)
|
||||
|
||||
self.fig_noise, self.axis_noise = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
if self.fig_noise is not None:
|
||||
self.fig_noise.clear()
|
||||
|
||||
self.fig_noise, self.axis_noise = plt.subplots(
|
||||
nrows=1, ncols=1, layout="constrained"
|
||||
)
|
||||
self.canvas_noise = FigureCanvas(self.fig_noise)
|
||||
|
||||
self.horizontalLayout_groupbox_plot_noise_data.addWidget(self.canvas_noise)
|
||||
|
|
@ -1190,6 +1219,9 @@ class SignalProcessingTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_SNR.removeWidget(self.toolbar_SNR)
|
||||
self.verticalLayout_groupbox_plot_SNR.removeWidget(self.scroll_SNR)
|
||||
|
||||
if self.fig_SNR is not None:
|
||||
self.fig_SNR.clear()
|
||||
|
||||
self.fig_SNR, self.axis_SNR = plt.subplots(
|
||||
nrows=stg.freq[data_id].shape[0], ncols=1,
|
||||
sharex=True, sharey=False, layout='constrained'
|
||||
|
|
@ -1370,6 +1402,9 @@ class SignalProcessingTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_pre_processed_data_2D_field\
|
||||
.removeWidget(self.scroll_BS)
|
||||
|
||||
if self.fig_BS is not None:
|
||||
self.fig_BS.clear()
|
||||
|
||||
self.fig_BS, self.axis_BS = plt.subplots(
|
||||
nrows=stg.freq[data_id].shape[0], ncols=1,
|
||||
sharex=True, sharey=False, layout="constrained"
|
||||
|
|
@ -1601,7 +1636,12 @@ class SignalProcessingTab(QWidget):
|
|||
self.verticalLayout_groupbox_plot_profile.removeWidget(self.toolbar_profile)
|
||||
self.verticalLayout_groupbox_plot_profile.removeWidget(self.canvas_profile)
|
||||
|
||||
self.figure_profile, self.axis_profile = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
if self.figure_profile is not None:
|
||||
self.figure_profile.clear()
|
||||
|
||||
self.figure_profile, self.axis_profile = plt.subplots(
|
||||
nrows=1, ncols=1, layout="constrained"
|
||||
)
|
||||
self.canvas_profile = FigureCanvas(self.figure_profile)
|
||||
self.toolbar_profile = NavigationToolBar(self.canvas_profile, self)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue