Acoustic data: Clear plots and remove some debug trace.
parent
24f270a2a4
commit
ef8efd4f78
|
|
@ -560,7 +560,6 @@ class ReadTableForOpen:
|
||||||
+ list(stg.radius_grain_sand)
|
+ list(stg.radius_grain_sand)
|
||||||
)
|
)
|
||||||
|
|
||||||
@trace
|
|
||||||
def read_table_table_sediment_data(self):
|
def read_table_table_sediment_data(self):
|
||||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
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}")
|
logger.debug(f"fine: {stg.Ctot_fine}, sand: {stg.sample_sand}")
|
||||||
|
|
||||||
@trace
|
|
||||||
def read_table_table_calibration_parameters(self):
|
def read_table_table_calibration_parameters(self):
|
||||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||||
|
|
||||||
|
|
@ -681,7 +679,6 @@ class ReadTableForOpen:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@trace
|
|
||||||
def read_table_table_calibration(self):
|
def read_table_table_calibration(self):
|
||||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
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.depth_real = np_f64_parse(next(it)).tolist()
|
||||||
stg.lin_reg = np_f64_parse(next(it)).tolist()
|
stg.lin_reg = np_f64_parse(next(it)).tolist()
|
||||||
|
|
||||||
@trace
|
|
||||||
def read_table_table_notes(self):
|
def read_table_table_notes(self):
|
||||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ class AcousticDataTab(QWidget):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self._setup_icons()
|
self._setup_icons()
|
||||||
|
self._setup_attrs()
|
||||||
|
|
||||||
self.calib_kt = CalibrationConstantKt()
|
self.calib_kt = CalibrationConstantKt()
|
||||||
|
|
||||||
|
|
@ -731,10 +732,12 @@ class AcousticDataTab(QWidget):
|
||||||
self.icon_between = QPixmap(path_icon("between.png"))
|
self.icon_between = QPixmap(path_icon("between.png"))
|
||||||
self.icon_refresh = QIcon(path_icon("update.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 --------------------
|
# -------------------- Functions for Acoustic dataTab --------------------
|
||||||
|
|
||||||
@trace
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
logger.debug(f"{__name__}: Update")
|
logger.debug(f"{__name__}: Update")
|
||||||
self.blockSignals(True)
|
self.blockSignals(True)
|
||||||
|
|
@ -1393,6 +1396,7 @@ class AcousticDataTab(QWidget):
|
||||||
|
|
||||||
self.open_acoustic_data()
|
self.open_acoustic_data()
|
||||||
|
|
||||||
|
@trace
|
||||||
def open_acoustic_data(self):
|
def open_acoustic_data(self):
|
||||||
# --- Fill lineEdit with path and file names + load acoustic data ---
|
# --- Fill lineEdit with path and file names + load acoustic data ---
|
||||||
# --- fill date, hour and measurements information + fill frequency combobox for bottom detection ---
|
# --- 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.toolbar_BS)
|
||||||
layout.removeWidget(self.scroll_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(
|
self.fig_BS, self.axis_BS = plt.subplots(
|
||||||
nrows=stg.freq[file_id].shape[0],
|
nrows=stg.freq[file_id].shape[0],
|
||||||
ncols=1, sharex=False, sharey=False,
|
ncols=1, sharex=False, sharey=False,
|
||||||
|
|
@ -2465,6 +2472,9 @@ class AcousticDataTab(QWidget):
|
||||||
return
|
return
|
||||||
|
|
||||||
if len(self.axis_BS.tolist()) != stg.freq[data_id].shape[0]:
|
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(
|
self.fig_BS, self.axis_BS = plt.subplots(
|
||||||
nrows=stg.freq[data_id].shape[0],
|
nrows=stg.freq[data_id].shape[0],
|
||||||
ncols=1,
|
ncols=1,
|
||||||
|
|
@ -2553,6 +2563,9 @@ class AcousticDataTab(QWidget):
|
||||||
self.verticalLayout_groupbox_plot_profile.removeWidget(self.canvas_plot_profile)
|
self.verticalLayout_groupbox_plot_profile.removeWidget(self.canvas_plot_profile)
|
||||||
|
|
||||||
# --- Figure to plot profiles ---
|
# --- 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.fig_profile, self.axis_profile = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||||
self.canvas_plot_profile = FigureCanvas(self.fig_profile)
|
self.canvas_plot_profile = FigureCanvas(self.fig_profile)
|
||||||
self.toolbar_profile = NavigationToolBar(self.canvas_plot_profile, self)
|
self.toolbar_profile = NavigationToolBar(self.canvas_plot_profile, self)
|
||||||
|
|
@ -2867,10 +2880,9 @@ class AcousticDataTab(QWidget):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
ind_bottom = np.where(
|
ind_bottom = np.where(
|
||||||
(BS_smooth[ind_min:ind_max, d])
|
(BS_smooth[ind_min:ind_max, d]) == val_bottom[d]
|
||||||
== val_bottom[d]
|
|
||||||
)[0][0]
|
)[0][0]
|
||||||
np.append(stg.ind_bottom, ind_bottom)
|
# np.append(stg.ind_bottom, ind_bottom)
|
||||||
|
|
||||||
r_bottom[d] = depth_data[data_id][
|
r_bottom[d] = depth_data[data_id][
|
||||||
freq_id, ind_bottom + ind_min
|
freq_id, ind_bottom + ind_min
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,6 @@ class AcousticInversionTab(QWidget):
|
||||||
self.pushbutton_plot_sand_sample_choice\
|
self.pushbutton_plot_sand_sample_choice\
|
||||||
.clicked.connect(self.plot_measured_vs_inverted_SSC_sand)
|
.clicked.connect(self.plot_measured_vs_inverted_SSC_sand)
|
||||||
|
|
||||||
@trace
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
logger.debug(f"{__name__}: Update")
|
logger.debug(f"{__name__}: Update")
|
||||||
self.blockSignals(True)
|
self.blockSignals(True)
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,6 @@ class NoteTab(QWidget):
|
||||||
## ---------- Functions ----------
|
## ---------- Functions ----------
|
||||||
## -------------------------------
|
## -------------------------------
|
||||||
|
|
||||||
@trace
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
self.blockSignals(True)
|
self.blockSignals(True)
|
||||||
self.textEdit.blockSignals(True)
|
self.textEdit.blockSignals(True)
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,6 @@ class SampleDataTab(QWidget):
|
||||||
|
|
||||||
self.groupbox_plot_PSD.setTitle(_translate("CONSTANT_STRING", cs.DISTRIBUTION_PLOT))
|
self.groupbox_plot_PSD.setTitle(_translate("CONSTANT_STRING", cs.DISTRIBUTION_PLOT))
|
||||||
|
|
||||||
@trace
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
logger.debug(f"{__name__}: Update")
|
logger.debug(f"{__name__}: Update")
|
||||||
self.blockSignals(True)
|
self.blockSignals(True)
|
||||||
|
|
|
||||||
|
|
@ -859,7 +859,6 @@ class SedimentCalibrationTab(QWidget):
|
||||||
self.fit_FCB_profile_with_linear_regression_and_compute_alphaS
|
self.fit_FCB_profile_with_linear_regression_and_compute_alphaS
|
||||||
)
|
)
|
||||||
|
|
||||||
@trace
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
logger.debug(f"{__name__}: Update")
|
logger.debug(f"{__name__}: Update")
|
||||||
self.blockSignals(True)
|
self.blockSignals(True)
|
||||||
|
|
|
||||||
|
|
@ -511,7 +511,6 @@ class SignalProcessingTab(QWidget):
|
||||||
self.icon_clear = QIcon(path_icon("clear.png"))
|
self.icon_clear = QIcon(path_icon("clear.png"))
|
||||||
self.icon_apply = QIcon(path_icon("circle_green_arrow_right.png"))
|
self.icon_apply = QIcon(path_icon("circle_green_arrow_right.png"))
|
||||||
|
|
||||||
@trace
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
logger.debug(f"{__name__}: Update")
|
logger.debug(f"{__name__}: Update")
|
||||||
self.blockSignals(True)
|
self.blockSignals(True)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue