diff --git a/Model/read_table_for_open.py b/Model/read_table_for_open.py index 85673c3..3d6c448 100644 --- a/Model/read_table_for_open.py +++ b/Model/read_table_for_open.py @@ -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) diff --git a/View/acoustic_data_tab.py b/View/acoustic_data_tab.py index 01cccd3..d4fb8cc 100644 --- a/View/acoustic_data_tab.py +++ b/View/acoustic_data_tab.py @@ -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 diff --git a/View/acoustic_inversion_tab.py b/View/acoustic_inversion_tab.py index d832341..35a75f0 100644 --- a/View/acoustic_inversion_tab.py +++ b/View/acoustic_inversion_tab.py @@ -444,7 +444,6 @@ class AcousticInversionTab(QWidget): self.pushbutton_plot_sand_sample_choice\ .clicked.connect(self.plot_measured_vs_inverted_SSC_sand) - @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True) diff --git a/View/note_tab.py b/View/note_tab.py index 636018d..f900262 100644 --- a/View/note_tab.py +++ b/View/note_tab.py @@ -153,7 +153,6 @@ class NoteTab(QWidget): ## ---------- Functions ---------- ## ------------------------------- - @trace def full_update(self): self.blockSignals(True) self.textEdit.blockSignals(True) diff --git a/View/sample_data_tab.py b/View/sample_data_tab.py index f9e4b96..7177e3b 100644 --- a/View/sample_data_tab.py +++ b/View/sample_data_tab.py @@ -280,7 +280,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) diff --git a/View/sediment_calibration_tab.py b/View/sediment_calibration_tab.py index 9ecaf6b..57985c7 100644 --- a/View/sediment_calibration_tab.py +++ b/View/sediment_calibration_tab.py @@ -859,7 +859,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) diff --git a/View/signal_processing_tab.py b/View/signal_processing_tab.py index a5cef86..931fd15 100644 --- a/View/signal_processing_tab.py +++ b/View/signal_processing_tab.py @@ -511,7 +511,6 @@ class SignalProcessingTab(QWidget): self.icon_clear = QIcon(path_icon("clear.png")) self.icon_apply = QIcon(path_icon("circle_green_arrow_right.png")) - @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True)