Acoustic inversion process is updated with the new names of variables.
parent
335cef9d76
commit
d9927d5868
|
|
@ -265,10 +265,10 @@ class AcousticInversionMethodHighConcentration():
|
|||
# print(f"loc_point_lin_interp : {loc_point_lin_interp}")
|
||||
res = res0[np.where(loc_point_lin_interp0 > range_cells[0])]
|
||||
|
||||
fig, ax = plt.subplots(nrows=1, ncols=1)
|
||||
ax.plot(loc_point_lin_interp, res[:len(loc_point_lin_interp)], marker="*", mfc="blue")
|
||||
ax.plot(sample_depth, M_profile, marker="o", mfc="k", mec="k")
|
||||
plt.show()
|
||||
# fig, ax = plt.subplots(nrows=1, ncols=1)
|
||||
# ax.plot(loc_point_lin_interp, res[:len(loc_point_lin_interp)], marker="*", mfc="blue")
|
||||
# ax.plot(sample_depth, M_profile, marker="o", mfc="k", mec="k")
|
||||
# plt.show()
|
||||
|
||||
return (loc_point_lin_interp, res)
|
||||
|
||||
|
|
|
|||
|
|
@ -260,9 +260,9 @@ class AcousticDataTab(QWidget):
|
|||
|
||||
self.label_temperature = QLabel("Temperature : ")
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_temperature, 0, 0, 1, 1)
|
||||
self.lineEdit_temperature = QLineEdit()
|
||||
self.lineEdit_temperature.textChanged.connect(self.temperature)
|
||||
self.gridLayout_goupbox_info.addWidget(self.lineEdit_temperature, 0, 1, 1, 1)
|
||||
self.spinbox_temperature = QDoubleSpinBox()
|
||||
self.spinbox_temperature.valueChanged.connect(self.temperature_value)
|
||||
self.gridLayout_goupbox_info.addWidget(self.spinbox_temperature, 0, 1, 1, 1)
|
||||
self.label_degreCelsius = QLabel("°C")
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_degreCelsius, 0, 2, 1, 1)
|
||||
|
||||
|
|
@ -587,6 +587,18 @@ class AcousticDataTab(QWidget):
|
|||
self.canvas_BS = None
|
||||
self.scroll_BS = None
|
||||
|
||||
# self.fig_BS, self.axis_BS = plt.subplots(nrows=4, ncols=1, sharex=True, sharey=False,
|
||||
# layout="constrained")
|
||||
# self.canvas_BS = FigureCanvas(self.fig_BS)
|
||||
# # self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
|
||||
# self.scroll_BS = QScrollArea()
|
||||
# self.scroll_BS.setWidget(self.canvas_BS)
|
||||
# self.scroll_BS.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
||||
# self.scroll_BS.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
||||
# # self.scroll_BS.setWidgetResizable(True)
|
||||
# self.scroll_BS.setAlignment(Qt.AlignCenter)
|
||||
# self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.scroll_BS)
|
||||
|
||||
# self.fig_BS, self.axis_BS = plt.subplots(nrows=4, ncols=1, sharex=True, sharey=False, layout="constrained")
|
||||
# self.fig, self.ax = plt.subplots(4, 1)
|
||||
# self.canvas_BS = FigureCanvas(self.fig_BS)
|
||||
|
|
@ -796,8 +808,8 @@ class AcousticDataTab(QWidget):
|
|||
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_freq, 0, 0, 1, 1)
|
||||
|
||||
def temperature(self):
|
||||
stg.temperature = float(self.lineEdit_temperature.text())
|
||||
def temperature_value(self):
|
||||
stg.temperature = (self.spinbox_temperature.value())
|
||||
print(f"stg.temperature : {stg.temperature}")
|
||||
|
||||
def clicked_pushbutton_noise_level(self):
|
||||
|
|
@ -1068,13 +1080,15 @@ class AcousticDataTab(QWidget):
|
|||
|
||||
def plot_transect_with_BS_raw_data(self):
|
||||
# --- Condition if table is not filled ---
|
||||
if not self.lineEdit_acoustic_file.text():
|
||||
msgBox = QMessageBox()
|
||||
msgBox.setWindowTitle("Plot transect Error")
|
||||
msgBox.setIcon(QMessageBox.Warning)
|
||||
msgBox.setText("Load data before plot transect 2D field")
|
||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||
msgBox.exec()
|
||||
# if not self.lineEdit_acoustic_file.text():
|
||||
# if not stg.filename_BS_raw_data:
|
||||
# print(stg.filename_BS_raw_data.text())
|
||||
# msgBox = QMessageBox()
|
||||
# msgBox.setWindowTitle("Plot transect Error")
|
||||
# msgBox.setIcon(QMessageBox.Warning)
|
||||
# msgBox.setText("Load data before plot transect 2D field")
|
||||
# msgBox.setStandardButtons(QMessageBox.Ok)
|
||||
# msgBox.exec()
|
||||
# elif self.tableModel.rowCount(1) == 10:
|
||||
# msgBox = QMessageBox()
|
||||
# msgBox.setWindowTitle("Plot transect Error")
|
||||
|
|
@ -1087,87 +1101,96 @@ class AcousticDataTab(QWidget):
|
|||
# --- => Then plot transect for each frequency by pressing the button "Plot transect"
|
||||
|
||||
# elif (self.tableModel.rowCount(1) > 10) and (self.canvas_BS == None):
|
||||
elif self.canvas_BS == None:
|
||||
# elif self.canvas_BS == None:
|
||||
|
||||
self.fig_BS, self.axis_BS = plt.subplots(nrows=stg.freq.shape[0], ncols=1, sharex=True, sharey=False, layout="constrained")
|
||||
self.canvas_BS = FigureCanvas(self.fig_BS)
|
||||
# self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.canvas_BS)
|
||||
# else:
|
||||
|
||||
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
|
||||
self.scroll_BS = QScrollArea()
|
||||
self.scroll_BS.setWidget(self.canvas_BS)
|
||||
self.scroll_BS.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.scroll_BS.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
||||
# self.scroll_BS.setWidgetResizable(True)
|
||||
self.scroll_BS.setAlignment(Qt.AlignCenter)
|
||||
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.scroll_BS)
|
||||
# self.fig_BS, self.axis_BS = plt.subplots(nrows=stg.freq.shape[0], ncols=1, sharex=True, sharey=False,
|
||||
# layout="constrained")
|
||||
#
|
||||
# self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
|
||||
# self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.scroll_BS)
|
||||
|
||||
self.spinbox_tmin.setValue(np.round(np.min(stg.time[0, :]), 2))
|
||||
self.spinbox_tmax.setValue(np.round(np.max(stg.time[0, :]), 2))
|
||||
self.fig_BS, self.axis_BS = plt.subplots(nrows=stg.freq.shape[0], ncols=1, sharex=True, sharey=False, layout="constrained")
|
||||
self.canvas_BS = FigureCanvas(self.fig_BS)
|
||||
# self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.canvas_BS)
|
||||
|
||||
stg.tmin = np.array([])
|
||||
stg.tmax = np.array([])
|
||||
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
|
||||
self.scroll_BS = QScrollArea()
|
||||
self.scroll_BS.setWidget(self.canvas_BS)
|
||||
self.scroll_BS.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.scroll_BS.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
||||
# self.scroll_BS.setWidgetResizable(True)
|
||||
self.scroll_BS.setAlignment(Qt.AlignCenter)
|
||||
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.scroll_BS)
|
||||
|
||||
for f, _ in enumerate(stg.freq):
|
||||
self.spinbox_tmin.setValue(np.round(np.min(stg.time[0, :]), 2))
|
||||
self.spinbox_tmax.setValue(np.round(np.max(stg.time[0, :]), 2))
|
||||
|
||||
val_min = np.nanmin(stg.BS_raw_data[f, :, :])
|
||||
val_max = np.nanmax(stg.BS_raw_data[f, :, :])
|
||||
if val_min == 0:
|
||||
val_min = 1e-5
|
||||
stg.tmin = np.array([])
|
||||
stg.tmax = np.array([])
|
||||
|
||||
stg.tmin = (
|
||||
for f, _ in enumerate(stg.freq):
|
||||
|
||||
val_min = np.nanmin(stg.BS_raw_data[f, :, :])
|
||||
val_max = np.nanmax(stg.BS_raw_data[f, :, :])
|
||||
if val_min == 0:
|
||||
val_min = 1e-5
|
||||
|
||||
stg.tmin = (
|
||||
np.append(stg.tmin,
|
||||
np.where(np.abs(np.round(stg.time[f, :], 2) - self.spinbox_tmin.value()) ==
|
||||
np.nanmin(np.abs(np.round(stg.time[f, :], 2) - self.spinbox_tmin.value())))[0][0])
|
||||
)
|
||||
|
||||
stg.tmax = (
|
||||
stg.tmax = (
|
||||
np.append(stg.tmax,
|
||||
np.where(np.abs(np.round(stg.time[f, :], 2) - self.spinbox_tmax.value()) ==
|
||||
np.nanmin(np.abs(np.round(stg.time[f, :], 2) - self.spinbox_tmax.value())))[0][0])
|
||||
)
|
||||
|
||||
# print(f"freq = {f}")
|
||||
print(f"tmin {stg.tmin}")
|
||||
print(f"tmax {stg.tmax}")
|
||||
# print(f"freq = {f}")
|
||||
print(f"tmin {stg.tmin}")
|
||||
print(f"tmax {stg.tmax}")
|
||||
|
||||
if self.combobox_ABS_system_choice.currentIndex() == 1:
|
||||
pcm = self.axis_BS[f].pcolormesh(stg.time[f, int(stg.tmin[f]):int(stg.tmax[f])],
|
||||
if self.combobox_ABS_system_choice.currentIndex() == 1:
|
||||
pcm = self.axis_BS[f].pcolormesh(stg.time[f, int(stg.tmin[f]):int(stg.tmax[f])],
|
||||
-stg.r[f, :],
|
||||
stg.BS_raw_data[f, :, int(stg.tmin[f]):int(stg.tmax[f])],
|
||||
cmap='viridis', norm=LogNorm(vmin=val_min, vmax=val_max))
|
||||
|
||||
elif self.combobox_ABS_system_choice.currentIndex() == 2:
|
||||
pcm = self.axis_BS[f].pcolormesh(stg.time[f, int(stg.tmin[f]):int(stg.tmax[f])],
|
||||
elif self.combobox_ABS_system_choice.currentIndex() == 2:
|
||||
pcm = self.axis_BS[f].pcolormesh(stg.time[f, int(stg.tmin[f]):int(stg.tmax[f])],
|
||||
-stg.r[f, :],
|
||||
np.log(stg.BS_raw_data[f, :, int(stg.tmin[f]):int(stg.tmax[f])]),
|
||||
cmap='Blues')
|
||||
|
||||
# --- Plot red solid line on transect to visualize position of plotted profile ---
|
||||
self.axis_BS[self.combobox_frequency_profile.currentIndex()].plot(
|
||||
self.axis_BS[self.combobox_frequency_profile.currentIndex()].plot(
|
||||
stg.time[self.combobox_frequency_profile.currentIndex(), 0] * np.ones(
|
||||
stg.r.shape[1]),
|
||||
-stg.r[self.combobox_frequency_profile.currentIndex(), :],
|
||||
color='red', linestyle="solid", linewidth=2)
|
||||
|
||||
self.axis_BS[f].text(1, .70, stg.freq_text[f],
|
||||
self.axis_BS[f].text(1, .70, stg.freq_text[f],
|
||||
fontsize=14, fontweight='bold', fontname="Ubuntu", c="black", alpha=0.5,
|
||||
horizontalalignment='right', verticalalignment='bottom',
|
||||
transform=self.axis_BS[f].transAxes)
|
||||
|
||||
self.fig_BS.supxlabel('Time (sec)', fontsize=10)
|
||||
self.fig_BS.supylabel('Depth (m)', fontsize=10)
|
||||
cbar = self.fig_BS.colorbar(pcm, ax=self.axis_BS[:], shrink=1, location='right')
|
||||
cbar.set_label(label='Acoustic backscatter signal (V)', rotation=270, labelpad=10)
|
||||
self.fig_BS.canvas.draw_idle()
|
||||
self.fig_BS.supxlabel('Time (sec)', fontsize=10)
|
||||
self.fig_BS.supylabel('Depth (m)', fontsize=10)
|
||||
cbar = self.fig_BS.colorbar(pcm, ax=self.axis_BS[:], shrink=1, location='right')
|
||||
cbar.set_label(label='Acoustic backscatter signal (V)', rotation=270, labelpad=10)
|
||||
self.fig_BS.canvas.draw_idle()
|
||||
|
||||
self.plot_profile()
|
||||
self.plot_profile()
|
||||
|
||||
def update_xaxis_transect_with_BS_raw_data(self):
|
||||
|
||||
# --- Condition if table is filled but transect is not plotted
|
||||
# --- => Error message if spin box values of tmin or tmax is change
|
||||
if self.canvas_BS == None:
|
||||
# if stg.BS_raw_data.size == 0:
|
||||
msgBox = QMessageBox()
|
||||
msgBox.setWindowTitle("Plot transect Error")
|
||||
msgBox.setIcon(QMessageBox.Warning)
|
||||
|
|
@ -1215,6 +1238,9 @@ class AcousticDataTab(QWidget):
|
|||
|
||||
else:
|
||||
|
||||
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
|
||||
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.scroll_BS)
|
||||
|
||||
# --- Backscatter acoustic signal is recorded for next tab ---
|
||||
|
||||
stg.BS_cross_section = np.array([[[]]])
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import sys
|
||||
|
||||
from PyQt5.QtWidgets import QWidget, QMainWindow, QApplication, QVBoxLayout, QHBoxLayout, QGroupBox, QComboBox, \
|
||||
QGridLayout, QLabel, QPushButton, QSpinBox, QDoubleSpinBox
|
||||
QGridLayout, QLabel, QPushButton, QSpinBox, QDoubleSpinBox, QAbstractSpinBox
|
||||
from PyQt5.QtCore import QCoreApplication, Qt
|
||||
from PyQt5.QtGui import QStandardItemModel
|
||||
|
||||
|
|
@ -154,19 +154,19 @@ class AcousticInversionTab(QWidget):
|
|||
|
||||
self.gridLayout_groupbox_parameter = QGridLayout(self.groupbox_parameter)
|
||||
|
||||
self.label_temperature = QLabel()
|
||||
self.label_temperature.setText("Temperature : ")
|
||||
# self.gridLayout_groupbox_acoustic_inversion_settings_parameter.addWidget(self.label_temperature, 0, 0, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_temperature, 0, 0, 1, 1)
|
||||
self.spinbox_temperature = QDoubleSpinBox()
|
||||
# self.gridLayout_groupbox_acoustic_inversion_settings_parameter.addWidget(self.spinbox_temperature, 0, 1, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_temperature, 0, 1, 1, 1)
|
||||
self.spinbox_temperature.valueChanged.connect(self.temperature_value)
|
||||
# self.label_temperature = QLabel()
|
||||
# self.label_temperature.setText("Temperature : ")
|
||||
# # self.gridLayout_groupbox_acoustic_inversion_settings_parameter.addWidget(self.label_temperature, 0, 0, 1, 1)
|
||||
# self.gridLayout_groupbox_parameter.addWidget(self.label_temperature, 0, 0, 1, 1)
|
||||
# self.spinbox_temperature = QDoubleSpinBox()
|
||||
# # self.gridLayout_groupbox_acoustic_inversion_settings_parameter.addWidget(self.spinbox_temperature, 0, 1, 1, 1)
|
||||
# self.gridLayout_groupbox_parameter.addWidget(self.spinbox_temperature, 0, 1, 1, 1)
|
||||
# self.spinbox_temperature.valueChanged.connect(self.temperature_value)
|
||||
|
||||
self.label_frequencies_pairs_to_compute_VBI = QLabel()
|
||||
self.label_frequencies_pairs_to_compute_VBI.setText("Frequencies for VBI")
|
||||
self.gridLayout_groupbox_parameter.addWidget(
|
||||
self.label_frequencies_pairs_to_compute_VBI, 1, 1, 1, 1)
|
||||
self.label_frequencies_pairs_to_compute_VBI, 0, 1, 1, 1)
|
||||
|
||||
# self.combobox_frequencies_VBI = QComboBox()
|
||||
# self.gridLayout_groupbox_acoustic_inversion_settings_parameter.addWidget(
|
||||
|
|
@ -175,64 +175,73 @@ class AcousticInversionTab(QWidget):
|
|||
|
||||
self.label_ks = QLabel()
|
||||
self.label_ks.setText("ks")
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_ks, 1, 2, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_ks, 0, 2, 1, 1)
|
||||
|
||||
self.label_sv = QLabel()
|
||||
self.label_sv.setText("sv")
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_sv, 1, 3, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_sv, 0, 3, 1, 1)
|
||||
|
||||
self.label_X = QLabel()
|
||||
self.label_X.setText("X")
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_X, 1, 4, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_X, 0, 4, 1, 1)
|
||||
|
||||
self.label_alphas = QLabel()
|
||||
self.label_alphas.setText("\u03B1s")
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_alphas, 1, 5, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_alphas, 0, 5, 1, 1)
|
||||
|
||||
self.label_zeta = QLabel()
|
||||
self.label_zeta.setText("\u03B6")
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_zeta, 1, 6, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_zeta, 0, 6, 1, 1)
|
||||
|
||||
self.label_freq1 = QLabel()
|
||||
self.label_freq1.setText("Frequency 1 : ")
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_freq1, 2, 0, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_freq1, 1, 0, 1, 1)
|
||||
|
||||
self.label_freq2 = QLabel()
|
||||
self.label_freq2.setText("Frequency 2 : ")
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_freq2, 3, 0, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.label_freq2, 2, 0, 1, 1)
|
||||
|
||||
self.combobox_freq1 = QComboBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.combobox_freq1, 2, 1, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.combobox_freq1, 1, 1, 1, 1)
|
||||
|
||||
self.combobox_freq2 = QComboBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.combobox_freq2, 3, 1, 1, 1)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.combobox_freq2, 2, 1, 1, 1)
|
||||
|
||||
self.spinbox_ks_freq1 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_ks_freq1, 2, 2, 1, 1)
|
||||
self.spinbox_ks_freq1.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_ks_freq1, 1, 2, 1, 1)
|
||||
|
||||
self.spinbox_ks_freq2 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_ks_freq2, 3, 2, 1, 1)
|
||||
self.spinbox_ks_freq2.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_ks_freq2, 2, 2, 1, 1)
|
||||
|
||||
self.spinbox_sv_freq1 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_sv_freq1, 2, 3, 1, 1)
|
||||
self.spinbox_sv_freq1.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_sv_freq1, 1, 3, 1, 1)
|
||||
|
||||
self.spinbox_sv_freq2 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_sv_freq2, 3, 3, 1, 1)
|
||||
self.spinbox_sv_freq2.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_sv_freq2, 2, 3, 1, 1)
|
||||
|
||||
self.spinbox_X = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_X, 2, 4, 1, 1)
|
||||
self.spinbox_X.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_X, 1, 4, 1, 1)
|
||||
|
||||
self.spinbox_alphas_freq1 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_alphas_freq1, 2, 5, 1, 1)
|
||||
self.spinbox_alphas_freq1.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_alphas_freq1, 1, 5, 1, 1)
|
||||
|
||||
self.spinbox_alphas_freq2 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_alphas_freq2, 3, 5, 1, 1)
|
||||
self.spinbox_alphas_freq2.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_alphas_freq2, 2, 5, 1, 1)
|
||||
|
||||
self.spinbox_zeta_freq1 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_zeta_freq1, 2, 6, 1, 1)
|
||||
self.spinbox_zeta_freq1.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_zeta_freq1, 1, 6, 1, 1)
|
||||
|
||||
self.spinbox_zeta_freq2 = QDoubleSpinBox()
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_zeta_freq2, 3, 6, 1, 1)
|
||||
self.spinbox_zeta_freq2.setDecimals(5)
|
||||
self.gridLayout_groupbox_parameter.addWidget(self.spinbox_zeta_freq2, 2, 6, 1, 1)
|
||||
|
||||
# self.label_frequency_to_compute_SSC = QLabel()
|
||||
# self.label_frequency_to_compute_SSC.setText("frequencies for SSC : ")
|
||||
|
|
@ -254,7 +263,8 @@ class AcousticInversionTab(QWidget):
|
|||
self.pushbutton_plot = QPushButton()
|
||||
self.pushbutton_plot.setText("PLOT")
|
||||
self.gridLayout_groupbox_acoustic_inversion_settings_parameter.addWidget(self.pushbutton_plot, 1, 1, 1, 1)
|
||||
self.pushbutton_plot.clicked.connect(self.plot_SSC_2D_fields)
|
||||
self.pushbutton_plot.clicked.connect(self.plot_SSC_fine)
|
||||
self.pushbutton_plot.clicked.connect(self.plot_SSC_sand)
|
||||
self.pushbutton_plot.clicked.connect(self.plot_SSC_inverse_VS_measured)
|
||||
|
||||
# =====================================================
|
||||
|
|
@ -266,20 +276,23 @@ class AcousticInversionTab(QWidget):
|
|||
# +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
self.verticalLayout_groupbox_SSC_2D_field = QVBoxLayout(self.groupbox_SSC_2D_field)
|
||||
|
||||
self.groupbox_SSC_2D_field.setTitle("Suspended Sediment Concentration 2D plot")
|
||||
|
||||
self.canvas_SSC_2D_field = None
|
||||
self.figure_SSC_2D_field, self.axis_SSC_2D_field = plt.subplots(nrows=2, ncols=1, layout="constrained")
|
||||
self.canvas_SSC_2D_field = FigureCanvas(self.figure_SSC_2D_field)
|
||||
self.verticalLayout_groupbox_SSC_2D_field.addWidget(self.canvas_SSC_2D_field)
|
||||
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# | Group box plot samples vs inversion |
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
self.verticalLayout_groupbox_SSC_sample_vs_inversion = QVBoxLayout(self.groupbox_SSC_sample_vs_inversion)
|
||||
|
||||
self.groupbox_SSC_sample_vs_inversion.setTitle("Suspended Sediment Concentration : sample vs inversion")
|
||||
|
||||
self.canvas_SSC_sample_vs_inversion = None
|
||||
self.figure_SSC_sample_vs_inversion, self.axis_SSC_sample_vs_inversion = plt.subplots(nrows=1, ncols=1,
|
||||
layout="constrained")
|
||||
self.canvas_SSC_sample_vs_inversion = FigureCanvas(self.figure_SSC_sample_vs_inversion)
|
||||
self.verticalLayout_groupbox_SSC_sample_vs_inversion.addWidget(self.canvas_SSC_sample_vs_inversion)
|
||||
#
|
||||
# self.verticalLayout_groupbox_sediment_concentration_2Dplot = QVBoxLayout(self.groupbox_sediment_concentration_2Dplot)
|
||||
#
|
||||
|
|
@ -574,8 +587,8 @@ class AcousticInversionTab(QWidget):
|
|||
#
|
||||
# print("stg.frequency_to_compute_SSC ", stg.frequency_to_compute_SSC)
|
||||
|
||||
def temperature_value(self):
|
||||
stg.temperature = self.spinbox_temperature.value()
|
||||
# def temperature_value(self):
|
||||
# stg.temperature = self.spinbox_temperature.value()
|
||||
# print(stg.temperature)
|
||||
|
||||
def compute_sound_velocity(self):
|
||||
|
|
@ -629,38 +642,49 @@ class AcousticInversionTab(QWidget):
|
|||
def compute_J(self, freq_ind, kt):
|
||||
if stg.ABS_name == "Aquascat 1000R":
|
||||
print(f"stg.BS_stream_bed.shape : {stg.BS_stream_bed.shape}")
|
||||
if stg.BS_stream_bed.size == 0:
|
||||
|
||||
if stg.BS_cross_section_averaged.size != 0:
|
||||
print("1/ stg.BS_cross_section_averaged")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(stg.BS_cross_section_averaged[freq_ind, :, :],
|
||||
stg.r_2D[0, :, :stg.BS_cross_section_averaged.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
# stg.J_cross_section = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_cross_section_averaged[
|
||||
# [int(stg.frequencies_to_compute_VBI[0, 0]), int(stg.frequencies_to_compute_VBI[1, 0])],
|
||||
# :, :],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :, :stg.BS_cross_section_averaged.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
if stg.BS_stream_bed.size != 0:
|
||||
|
||||
elif stg.BS_cross_section_SNR_filter.size != 0:
|
||||
print("2/ stg.BS_cross_section_SNR_filter")
|
||||
if stg.BS_stream_bed_pre_process_SNR.size != 0:
|
||||
print("1/ stg.BS_stream_bed_pre_process_SNR")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_cross_section_SNR_filter[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_cross_section_SNR_filter.shape[2]],
|
||||
stg.BS_stream_bed_pre_process_SNR[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_pre_process_SNR.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
# stg.J_cross_section = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_cross_section_SNR_filter[
|
||||
# [int(stg.frequencies_to_compute_VBI[0, 0]), int(stg.frequencies_to_compute_VBI[1, 0])],
|
||||
# :, :],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :,
|
||||
# :stg.BS_cross_section_SNR_filter.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
elif stg.BS_stream_bed_pre_process_average.size != 0:
|
||||
print("2/ stg.BS_stream_bed_pre_process_average")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed_pre_process_average[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_pre_process_average.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
else:
|
||||
print("3/ stg.BS_stream_bed")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
elif stg.BS_cross_section.size != 0:
|
||||
|
||||
if stg.BS_cross_section_pre_process_SNR.size != 0:
|
||||
print("1/ stg.BS_cross_section_pre_process_SNR")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_cross_section_pre_process_SNR[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_cross_section_pre_process_SNR.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
elif stg.BS_cross_section_pre_process_average.size != 0:
|
||||
print("2/ stg.BS_cross_section_pre_process_average")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(stg.BS_cross_section_pre_process_average[freq_ind, :, :],
|
||||
stg.r_2D[0, :, :stg.BS_cross_section_pre_process_average.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
else:
|
||||
print("3/ stg.BS_cross_section")
|
||||
|
|
@ -670,6 +694,83 @@ class AcousticInversionTab(QWidget):
|
|||
stg.r_2D[freq_ind, :, :stg.BS_cross_section.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
elif stg.ABS_name == "UB-SediFlow":
|
||||
|
||||
if stg.BS_stream_bed.size != 0:
|
||||
|
||||
if stg.BS_stream_bed_pre_process_SNR.size != 0:
|
||||
print("1/ stg.BS_stream_bed_pre_process_SNR")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed_pre_process_SNR[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_pre_process_SNR.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
elif stg.BS_stream_bed_pre_process_average.size != 0:
|
||||
print("2/ stg.BS_stream_bed_pre_process_average")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed_pre_process_average[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_pre_process_average.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
|
||||
|
||||
else:
|
||||
print("3/ stg.BS_stream_bed")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
elif stg.BS_cross_section.size != 0:
|
||||
|
||||
if stg.BS_cross_section_pre_process_SNR.size != 0:
|
||||
print("2/ stg.BS_cross_section_pre_process_SNR")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_cross_section_pre_process_SNR[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_cross_section_pre_process_SNR.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
if stg.BS_cross_section_pre_process_average.size != 0:
|
||||
print("1/ stg.BS_cross_section_pre_process_average")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(stg.BS_cross_section_pre_process_average[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :,
|
||||
:stg.BS_cross_section_pre_process_average.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
|
||||
|
||||
else:
|
||||
print("3/ stg.BS_cross_section")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_cross_section[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_cross_section.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
|
||||
|
||||
# stg.J_cross_section = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_cross_section_pre_process_average[
|
||||
# [int(stg.frequencies_to_compute_VBI[0, 0]), int(stg.frequencies_to_compute_VBI[1, 0])],
|
||||
# :, :],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :, :stg.BS_cross_section_pre_process_average.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
|
||||
# stg.J_cross_section = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_cross_section_pre_process_SNR[
|
||||
# [int(stg.frequencies_to_compute_VBI[0, 0]), int(stg.frequencies_to_compute_VBI[1, 0])],
|
||||
# :, :],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :,
|
||||
# :stg.BS_cross_section_pre_process_SNR.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
|
||||
# stg.J_cross_section = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_cross_section[
|
||||
|
|
@ -679,48 +780,23 @@ class AcousticInversionTab(QWidget):
|
|||
# :stg.BS_cross_section.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
|
||||
else:
|
||||
# stg.J_stream_bed = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_stream_bed_pre_process_average[
|
||||
# [int(stg.frequencies_to_compute_VBI[0, 0]), int(stg.frequencies_to_compute_VBI[1, 0])],
|
||||
# :, :],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :, :stg.BS_stream_bed_pre_process_average.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
|
||||
if stg.BS_stream_bed_averaged.size != 0:
|
||||
print("1/ stg.BS_stream_bed_averaged")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed_averaged[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_averaged.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
# stg.J_stream_bed = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_stream_bed_averaged[
|
||||
# stg.BS_stream_bed_pre_process_SNR[
|
||||
# [int(stg.frequencies_to_compute_VBI[0, 0]), int(stg.frequencies_to_compute_VBI[1, 0])],
|
||||
# :, :],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :, :stg.BS_stream_bed_averaged.shape[2]],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :, :stg.BS_stream_bed_pre_process_SNR.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
|
||||
elif stg.BS_stream_bed_SNR_filter.size != 0:
|
||||
print("2/ stg.BS_stream_bed_SNR_filter")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed_SNR_filter[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_SNR_filter.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
# stg.J_stream_bed = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_stream_bed_SNR_filter[
|
||||
# [int(stg.frequencies_to_compute_VBI[0, 0]), int(stg.frequencies_to_compute_VBI[1, 0])],
|
||||
# :, :],
|
||||
# stg.r_2D[int(stg.frequency_to_compute_SSC[0]), :, :stg.BS_stream_bed_SNR_filter.shape[2]],
|
||||
# stg.kt_corrected_3D))
|
||||
|
||||
else:
|
||||
print("3/ stg.BS_stream_bed")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
# stg.J_stream_bed = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
# stg.BS_stream_bed[
|
||||
|
|
@ -760,60 +836,6 @@ class AcousticInversionTab(QWidget):
|
|||
# print("J ", stg.J_cross_section)
|
||||
# print("J sahpe ", stg.J_cross_section.shape)
|
||||
|
||||
elif stg.ABS_name == "UB-SediFlow":
|
||||
|
||||
if stg.BS_stream_bed.size == 0:
|
||||
|
||||
if stg.BS_cross_section_averaged.size != 0:
|
||||
print("1/ stg.BS_cross_section_averaged")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(stg.BS_cross_section_averaged[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_cross_section_averaged.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
elif stg.BS_cross_section_SNR_filter.size != 0:
|
||||
print("2/ stg.BS_cross_section_SNR_filter")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_cross_section_SNR_filter[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_cross_section_SNR_filter.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
else:
|
||||
print("3/ stg.BS_cross_section")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_cross_section[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_cross_section.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
else:
|
||||
|
||||
if stg.BS_stream_bed_averaged.size != 0:
|
||||
print("1/ stg.BS_stream_bed_averaged")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed_averaged[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_averaged.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
elif stg.BS_stream_bed_SNR_filter.size != 0:
|
||||
print("2/ stg.BS_stream_bed_SNR_filter")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed_SNR_filter[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed_SNR_filter.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
else:
|
||||
print("3/ stg.BS_stream_bed")
|
||||
stg.J_cross_section = (
|
||||
self.inv_hc.j_cross_section(
|
||||
stg.BS_stream_bed[freq_ind, :, :],
|
||||
stg.r_2D[freq_ind, :, :stg.BS_stream_bed.shape[2]],
|
||||
kt[freq_ind, :, :]))
|
||||
|
||||
|
||||
# if stg.BS_data_section.size == 0:
|
||||
# stg.J_cross_section = (
|
||||
# self.inv_hc.j_cross_section(
|
||||
|
|
@ -922,7 +944,6 @@ class AcousticInversionTab(QWidget):
|
|||
|
||||
def compute_acoustic_inversion_method_high_concentration(self):
|
||||
|
||||
self.temperature_value()
|
||||
# --- List selected sand and fine samples ---
|
||||
sand_position_list, fine_position_list = self.sample_choice()
|
||||
|
||||
|
|
@ -1044,13 +1065,13 @@ class AcousticInversionTab(QWidget):
|
|||
# ind_t_max = int(ind_r_max_around_sample[p, k])
|
||||
# print(f"ind_t_max = {ind_t_max}")
|
||||
|
||||
print(f"stg.BS freq1 = {stg.BS_stream_bed_averaged[freq1, r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
print(f"stg.BS freq2 = {stg.BS_stream_bed_averaged[freq2, r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
|
||||
print(f"J_freq1[r_sample_ind[-1], t_sample_ind[-1]] {J_freq1[r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
print(f"J_freq2[r_sample_ind[-1], t_sample_ind[-1]] {J_freq2[r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
|
||||
print(f"stg.r[0, r_sample_ind[-1]] {stg.r[2, r_sample_ind[-1]]}")
|
||||
# print(f"stg.BS freq1 = {stg.BS_stream_bed_pre_process_average[freq1, r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
# print(f"stg.BS freq2 = {stg.BS_stream_bed_pre_process_average[freq2, r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
#
|
||||
# print(f"J_freq1[r_sample_ind[-1], t_sample_ind[-1]] {J_freq1[r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
# print(f"J_freq2[r_sample_ind[-1], t_sample_ind[-1]] {J_freq2[r_sample_ind[-1], t_sample_ind[-1]]}")
|
||||
#
|
||||
# print(f"stg.r[0, r_sample_ind[-1]] {stg.r[2, r_sample_ind[-1]]}")
|
||||
|
||||
|
||||
alpha_s_freq1, alpha_s_freq2 = (
|
||||
|
|
@ -1237,14 +1258,14 @@ class AcousticInversionTab(QWidget):
|
|||
# if stg.BS_stream_bed.size == 0:
|
||||
# stg.FCB = (np.log(stg.BS_cross_section[[freq1, freq2], :, :]) + np.log(R_real[[freq1, freq2], :, :]) +
|
||||
# 2 * water_attenuation * R_real[[freq1, freq2], :, :])
|
||||
# elif (stg.BS_stream_bed_averaged.size == 0) and (stg.BS_stream_bed_SNR_filter.size == 0):
|
||||
# elif (stg.BS_stream_bed_pre_process_average.size == 0) and (stg.BS_stream_bed_pre_process_SNR.size == 0):
|
||||
# stg.FCB = (np.log(stg.BS_stream_bed[[freq1, freq2], :, :]) + np.log(R_real[[freq1, freq2], :, :]) +
|
||||
# 2 * water_attenuation * R_real[[freq1, freq2], :, :])
|
||||
# elif stg.BS_stream_bed_SNR_filter.size == 0:
|
||||
# stg.FCB = (np.log(stg.BS_stream_bed_averaged[[freq1, freq2], :, :]) + np.log(R_real[[freq1, freq2], :, :]) +
|
||||
# elif stg.BS_stream_bed_pre_process_SNR.size == 0:
|
||||
# stg.FCB = (np.log(stg.BS_stream_bed_pre_process_average[[freq1, freq2], :, :]) + np.log(R_real[[freq1, freq2], :, :]) +
|
||||
# 2 * water_attenuation * R_real[[freq1, freq2], :, :])
|
||||
# else:
|
||||
# stg.FCB = (np.log(stg.BS_stream_bed_SNR_filter[[freq1, freq2], :, :]) + np.log(R_real[[freq1, freq2], :, :]) +
|
||||
# stg.FCB = (np.log(stg.BS_stream_bed_pre_process_SNR[[freq1, freq2], :, :]) + np.log(R_real[[freq1, freq2], :, :]) +
|
||||
# 2 * water_attenuation * R_real[[freq1, freq2], :, :])
|
||||
#
|
||||
# print(f"FCB shape : {stg.FCB.shape}")
|
||||
|
|
@ -1355,24 +1376,24 @@ class AcousticInversionTab(QWidget):
|
|||
|
||||
# print("SSC sand shape ", stg.SSC_sand.shape)
|
||||
|
||||
def plot_SSC_2D_fields(self):
|
||||
|
||||
if self.canvas_SSC_2D_field == None:
|
||||
|
||||
self.figure_SSC_2D_field, self.axis_SSC_2D_field = plt.subplots(nrows=2, ncols=1, layout="constrained")
|
||||
self.canvas_SSC_2D_field = FigureCanvas(self.figure_SSC_2D_field)
|
||||
self.verticalLayout_groupbox_SSC_2D_field.addWidget(self.canvas_SSC_2D_field)
|
||||
|
||||
self.plot_SSC_fine()
|
||||
self.plot_SSC_sand()
|
||||
|
||||
else:
|
||||
|
||||
self.verticalLayout_groupbox_SSC_2D_field.removeWidget(self.canvas_SSC_2D_field)
|
||||
self.verticalLayout_groupbox_SSC_2D_field.addWidget(self.canvas_SSC_2D_field)
|
||||
|
||||
self.plot_SSC_fine()
|
||||
self.plot_SSC_sand()
|
||||
# def plot_SSC_2D_fields(self):
|
||||
#
|
||||
# if self.canvas_SSC_2D_field == None:
|
||||
#
|
||||
# self.figure_SSC_2D_field, self.axis_SSC_2D_field = plt.subplots(nrows=2, ncols=1, layout="constrained")
|
||||
# self.canvas_SSC_2D_field = FigureCanvas(self.figure_SSC_2D_field)
|
||||
# self.verticalLayout_groupbox_SSC_2D_field.addWidget(self.canvas_SSC_2D_field)
|
||||
#
|
||||
# self.plot_SSC_fine()
|
||||
# self.plot_SSC_sand()
|
||||
#
|
||||
# else:
|
||||
#
|
||||
# self.verticalLayout_groupbox_SSC_2D_field.removeWidget(self.canvas_SSC_2D_field)
|
||||
# self.verticalLayout_groupbox_SSC_2D_field.addWidget(self.canvas_SSC_2D_field)
|
||||
#
|
||||
# self.plot_SSC_fine()
|
||||
# self.plot_SSC_sand()
|
||||
|
||||
def plot_SSC_fine(self):
|
||||
|
||||
|
|
@ -1398,12 +1419,20 @@ class AcousticInversionTab(QWidget):
|
|||
# norm=LogNorm(vmin=1e-1, vmax=15))
|
||||
# # shading='gouraud')
|
||||
if stg.ABS_name == "Aquascat 1000R":
|
||||
|
||||
self.verticalLayout_groupbox_SSC_2D_field.removeWidget(self.canvas_SSC_2D_field)
|
||||
self.verticalLayout_groupbox_SSC_2D_field.addWidget(self.canvas_SSC_2D_field)
|
||||
|
||||
pcm_SSC_fine = self.axis_SSC_2D_field[0].pcolormesh(stg.t[0, :],
|
||||
-stg.r[0, :],
|
||||
stg.SSC_fine,
|
||||
cmap='rainbow',
|
||||
norm=LogNorm(vmin=1e0, vmax=15),
|
||||
shading='gouraud')
|
||||
|
||||
cbar_SSC_fine = self.figure_SSC_2D_field.colorbar(pcm_SSC_fine, ax=self.axis_SSC_2D_field[0], shrink=1,
|
||||
location='right')
|
||||
cbar_SSC_fine.set_label(label='Fine SSC (g/L', rotation=270, labelpad=15)
|
||||
# pcm_SSC_fine = self.axis_SSC_2D_field[0].pcolormesh(stg.t[int(stg.frequency_to_compute_SSC[0]), :],
|
||||
# -stg.r[int(stg.frequency_to_compute_SSC[0]), :],
|
||||
# stg.SSC_fine,
|
||||
|
|
@ -1427,14 +1456,6 @@ class AcousticInversionTab(QWidget):
|
|||
# -stg.r_bottom,
|
||||
# color='black', linewidth=1, linestyle="solid")
|
||||
|
||||
self.figure_SSC_2D_field.supxlabel("Time (sec)", fontsize=10)
|
||||
self.figure_SSC_2D_field.supylabel("Depth (m)", fontsize=10)
|
||||
|
||||
cbar_SSC_fine = self.figure_SSC_2D_field.colorbar(pcm_SSC_fine, ax=self.axis_SSC_2D_field[0], shrink=1, location='right')
|
||||
cbar_SSC_fine.set_label(label='Fine SSC (g/L', rotation=270, labelpad=15)
|
||||
|
||||
self.figure_SSC_2D_field.canvas.draw_idle()
|
||||
|
||||
def plot_SSC_sand(self):
|
||||
|
||||
val_min = 1e-2
|
||||
|
|
@ -1454,6 +1475,10 @@ class AcousticInversionTab(QWidget):
|
|||
# print(stg.SSC_sand)
|
||||
|
||||
if stg.ABS_name == "Aquascat 1000R":
|
||||
|
||||
self.verticalLayout_groupbox_SSC_2D_field.removeWidget(self.canvas_SSC_2D_field)
|
||||
self.verticalLayout_groupbox_SSC_2D_field.addWidget(self.canvas_SSC_2D_field)
|
||||
|
||||
pcm_SSC_sand = self.axis_SSC_2D_field[1].pcolormesh(stg.t[0, :],
|
||||
-stg.r[0, :],
|
||||
(stg.SSC_sand),
|
||||
|
|
@ -1464,6 +1489,10 @@ class AcousticInversionTab(QWidget):
|
|||
norm=LogNorm(vmin=1e-2, vmax=2),
|
||||
shading='gouraud')
|
||||
|
||||
cbar_SSC_sand = self.figure_SSC_2D_field.colorbar(pcm_SSC_sand, ax=self.axis_SSC_2D_field[1], shrink=1,
|
||||
location='right')
|
||||
cbar_SSC_sand.set_label(label='Sand SSC (g/L', rotation=270, labelpad=15)
|
||||
|
||||
elif stg.ABS_name == "UB-SediFlow":
|
||||
pcm_SSC_sand = self.axis_SSC_2D_field[1].pcolormesh(stg.t[0, :],
|
||||
-stg.r[0, 5:155],
|
||||
|
|
@ -1500,9 +1529,6 @@ class AcousticInversionTab(QWidget):
|
|||
|
||||
self.figure_SSC_2D_field.supxlabel("Time (sec)", fontsize=10)
|
||||
self.figure_SSC_2D_field.supylabel("Depth (m)", fontsize=10)
|
||||
|
||||
cbar_SSC_sand = self.figure_SSC_2D_field.colorbar(pcm_SSC_sand, ax=self.axis_SSC_2D_field[1], shrink=1, location='right')
|
||||
cbar_SSC_sand.set_label(label='Sand SSC (g/L', rotation=270, labelpad=15)
|
||||
self.figure_SSC_2D_field.canvas.draw_idle()
|
||||
|
||||
def plot_SSC_inverse_VS_measured(self):
|
||||
|
|
@ -1519,31 +1545,13 @@ class AcousticInversionTab(QWidget):
|
|||
np.where(np.abs(stg.t[0, :] - stg.sample_time[j]) ==
|
||||
np.min(np.abs(stg.t[0, :] - stg.sample_time[j])))[0][0])
|
||||
|
||||
if self.canvas_SSC_sample_vs_inversion == None:
|
||||
|
||||
print("Ctot fine : ", stg.Ctot_fine)
|
||||
print("SCC fine : ", stg.SSC_fine[sample_depth_position, sample_time_position])
|
||||
print("Ctot sand : ", stg.Ctot_sand)
|
||||
print("SCC sand : ", stg.SSC_sand[sample_depth_position, sample_time_position])
|
||||
|
||||
self.figure_SSC_sample_vs_inversion, self.axis_SSC_sample_vs_inversion = plt.subplots(nrows=1, ncols=1, layout="constrained")
|
||||
self.canvas_SSC_sample_vs_inversion = FigureCanvas(self.figure_SSC_sample_vs_inversion)
|
||||
self.verticalLayout_groupbox_SSC_sample_vs_inversion.addWidget(self.canvas_SSC_sample_vs_inversion)
|
||||
|
||||
else:
|
||||
|
||||
self.verticalLayout_groupbox_SSC_sample_vs_inversion.removeWidget(self.canvas_SSC_sample_vs_inversion)
|
||||
|
||||
print("Ctot fine : ", stg.Ctot_fine)
|
||||
print("SCC fine : ", stg.SSC_fine[sample_depth_position, sample_time_position])
|
||||
print("Ctot sand : ", stg.Ctot_sand)
|
||||
print("SCC sand : ", stg.SSC_sand[sample_depth_position, sample_time_position])
|
||||
|
||||
self.figure_SSC_sample_vs_inversion, self.axis_SSC_sample_vs_inversion = plt.subplots(nrows=1, ncols=1,
|
||||
layout="constrained")
|
||||
self.canvas_SSC_sample_vs_inversion = FigureCanvas(self.figure_SSC_sample_vs_inversion)
|
||||
self.verticalLayout_groupbox_SSC_sample_vs_inversion.addWidget(self.canvas_SSC_sample_vs_inversion)
|
||||
self.verticalLayout_groupbox_SSC_sample_vs_inversion.removeWidget(self.canvas_SSC_sample_vs_inversion)
|
||||
self.verticalLayout_groupbox_SSC_sample_vs_inversion.addWidget(self.canvas_SSC_sample_vs_inversion)
|
||||
|
||||
print("Ctot fine : ", stg.Ctot_fine)
|
||||
print("SCC fine : ", stg.SSC_fine[sample_depth_position, sample_time_position])
|
||||
print("Ctot sand : ", stg.Ctot_sand)
|
||||
print("SCC sand : ", stg.SSC_sand[sample_depth_position, sample_time_position])
|
||||
|
||||
if stg.ABS_name == "Aquascat 1000R":
|
||||
self.axis_SSC_sample_vs_inversion.plot(stg.Ctot_fine, stg.SSC_fine[sample_depth_position, sample_time_position], ls=" ", marker='v', color='black', label='Fine SSC')
|
||||
|
|
@ -1583,6 +1591,8 @@ class AcousticInversionTab(QWidget):
|
|||
self.axis_SSC_sample_vs_inversion.set_xlabel('Depth (m)', weight='bold')
|
||||
self.axis_SSC_sample_vs_inversion.set_ylabel('Sand concentration (g/l)', weight='bold')
|
||||
|
||||
self.figure_SSC_sample_vs_inversion.canvas.draw_idle()
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,10 +68,11 @@ freq_bottom_detection = 0
|
|||
|
||||
# --- Processed data in Signal Processing Tab ---
|
||||
# BS_cross_section_SNR_filter = np.array([[[]]]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is not detected
|
||||
# BS_stream_bed_SNR_filter = np.array([]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is detected
|
||||
# BS_cross_section_averaged = np.array([[[]]]) # BS data averaged - bottom is not detected
|
||||
# BS_stream_bed_averaged = np.array([]) # BS data averaged - bottom is detected
|
||||
# BS_cross_section_averaged_SNR = np.array([[[]]]) # BS data averaged and filtered with SNR - bottom is not detected
|
||||
|
||||
# BS_stream_bed_SNR_filter = np.array([]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is detected
|
||||
# BS_stream_bed_averaged = np.array([]) # BS data averaged - bottom is detected
|
||||
# BS_stream_bed_averaged_SNR = np.array([]) # BS data averaged and filtered with SNR - bottom is detected
|
||||
|
||||
BS_cross_section_pre_process_SNR = np.array([[[]]]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is not detected
|
||||
|
|
@ -80,7 +81,7 @@ BS_cross_section_pre_process_SNR_average = np.array([[[]]]) # BS data ave
|
|||
|
||||
BS_stream_bed_pre_process_SNR = np.array([]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is detected
|
||||
BS_stream_bed_pre_process_average = np.array([]) # BS data averaged - bottom is detected
|
||||
BS_stream_bed_pre_process_SNR_averaged = np.array([]) # BS data averaged and filtered with SNR - bottom is detected
|
||||
BS_stream_bed_pre_process_SNR_average = np.array([]) # BS data averaged and filtered with SNR - bottom is detected
|
||||
|
||||
time_average = np.array([])
|
||||
SNR_data_average = np.array([]) # SNR data computed with BS signal averaged (not with BS raw signal)
|
||||
|
|
|
|||
Loading…
Reference in New Issue