Few corrections have been made on calibration, in particular, for the interpolation of the fine sediments profile. The user can invert several acoustic recording with a single calibration. There remains a prolem to display the plots, in particular, when the user switches from one to another acoustic data.

This commit is contained in:
brahim committed 2024-09-19 14:54:44 +02:00
1 parent bba389ae9d
commit 8c51ebc192
5 files changed
+1106 -752

No files matched your search

+115 -60
View File
@@ -1856,9 +1856,9 @@ class AcousticDataTab(QWidget):
self.label_date_acoustic_file.setText("Date: ")
self.label_hour_acoustic_file.clear()
self.label_hour_acoustic_file.setText("Hour: ")
self.spinbox_temperature.clear()
self.spinbox_speed_of_sound.clear()
self.spinbox_sound_attenuation.clear()
self.spinbox_temperature.setValue(0)
self.spinbox_speed_of_sound.setValue(0)
self.spinbox_sound_attenuation.setValue(0)
self.combobox_frequency_information.clear()
self.label_profiles_value.clear()
self.label_profiles_per_sec_value.clear()
@@ -1867,9 +1867,9 @@ class AcousticDataTab(QWidget):
self.label_pulse_length_value.clear()
self.label_pings_per_sec_value.clear()
self.label_pings_per_profile_value.clear()
self.spinbox_kt.clear()
self.spinbox_rx.clear()
self.spinbox_tx.clear()
self.spinbox_kt.setValue(0)
self.spinbox_rx.setValue(0)
self.spinbox_tx.setValue(0)
# --- Clear display options ---
@@ -1893,18 +1893,43 @@ class AcousticDataTab(QWidget):
self.tableModel = TableModel(data)
self.tableView.setModel(self.tableModel)
# --- Clear figures ---
self.canvas_BS.figure.clear()
self.fig_BS.clf()
print("axis BS : ", self.axis_BS)
self.axis_BS.tolist().clear()
print("clear axis BS : ", self.axis_BS)
self.canvas_plot_profile.figure.clear()
self.fig_profile.clear()
self.axis_profile.clear()
# --- Clear figure : 2D plot of the acoustic recording ---
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.toolbar_BS)
self.canvas_BS = FigureCanvas()
self.toolbar_BS = NavigationToolBar(self.canvas_BS, self)
self.scroll_BS.setWidget(self.canvas_BS)
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.toolbar_BS)
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.scroll_BS)
# --- Clear figure : profile ---
self.combobox_frequency_profile.clear()
self.verticalLayout_groupbox_plot_profile.removeWidget(self.canvas_plot_profile)
self.verticalLayout_groupbox_plot_profile.removeWidget(self.toolbar_profile)
self.canvas_plot_profile = FigureCanvas()
self.toolbar_profile = NavigationToolBar(self.canvas_plot_profile, self)
self.verticalLayout_groupbox_plot_profile.addWidget(self.toolbar_profile)
self.verticalLayout_groupbox_plot_profile.addWidget(self.canvas_plot_profile)
self.slider.setValue(0)
self.slider.setMaximum(10)
# if self.line
# self.fig_BS.clf()
# print("axis BS : ", self.axis_BS)
# self.axis_BS.tolist().clear()
# print("clear axis BS : ", self.axis_BS)
# self.canvas_plot_profile.figure.clear()
# self.fig_profile.clear()
# self.axis_profile.clear()
# self.slider.setValue(0)
# self.slider.setMaximum(10)
def clear_files_from_ListWidget(self):
# if self.fileListWidget.count() > 0:
@@ -1928,9 +1953,9 @@ class AcousticDataTab(QWidget):
self.label_date_acoustic_file.setText("Date: ")
self.label_hour_acoustic_file.clear()
self.label_hour_acoustic_file.setText("Hour: ")
self.spinbox_temperature.clear()
self.spinbox_speed_of_sound.clear()
self.spinbox_sound_attenuation.clear()
self.spinbox_temperature.setValue(0)
self.spinbox_speed_of_sound.setValue(0)
self.spinbox_sound_attenuation.setValue(0)
self.combobox_frequency_information.clear()
self.label_profiles_value.clear()
self.label_profiles_per_sec_value.clear()
@@ -1939,9 +1964,9 @@ class AcousticDataTab(QWidget):
self.label_pulse_length_value.clear()
self.label_pings_per_sec_value.clear()
self.label_pings_per_profile_value.clear()
self.spinbox_kt.clear()
self.spinbox_rx.clear()
self.spinbox_tx.clear()
self.spinbox_kt.setValue(0)
self.spinbox_rx.setValue(0)
self.spinbox_tx.setValue(0)
# --- Clear display options ---
@@ -1980,7 +2005,32 @@ class AcousticDataTab(QWidget):
# print("1 fig profile : ", self.fig_profile)
# # self.axis_profile.clear()
# --- Clear figure : 2D plot of the acoustic recording ---
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.toolbar_BS)
self.canvas_BS = FigureCanvas()
self.toolbar_BS = NavigationToolBar(self.canvas_BS, self)
self.scroll_BS.setWidget(self.canvas_BS)
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.toolbar_BS)
self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.addWidget(self.scroll_BS)
# --- Clear figure : profile ---
self.combobox_frequency_profile.clear()
self.verticalLayout_groupbox_plot_profile.removeWidget(self.canvas_plot_profile)
self.verticalLayout_groupbox_plot_profile.removeWidget(self.toolbar_profile)
self.canvas_plot_profile = FigureCanvas()
self.toolbar_profile = NavigationToolBar(self.canvas_plot_profile, self)
self.verticalLayout_groupbox_plot_profile.addWidget(self.toolbar_profile)
self.verticalLayout_groupbox_plot_profile.addWidget(self.canvas_plot_profile)
self.slider.setValue(0)
self.slider.setMaximum(10)
# self.verticalLayout_groupbox_transect_2Dplot_raw_BS_data.removeWidget(self.scroll_BS)
# self.canvas_BS = FigureCanvas()
# self.scroll_BS.setWidget(self.canvas_BS)
@@ -1996,22 +2046,21 @@ class AcousticDataTab(QWidget):
# self.canvas_plot_profile = FigureCanvas()
# self.verticalLayout_groupbox_plot_profile.addWidget(self.canvas_plot_profile)
self.canvas_BS.figure.clear()
self.fig_BS.clf()
print("axis BS : ", self.axis_BS)
self.axis_BS.tolist().clear()
print("clear axis BS : ", self.axis_BS)
self.canvas_BS = FigureCanvas()
self.scroll_BS.setWidget(self.canvas_BS)
# self.canvas_BS.figure.clear()
# self.fig_BS.clf()
# print("axis BS : ", self.axis_BS)
# self.axis_BS.tolist().clear()
# print("clear axis BS : ", self.axis_BS)
# self.canvas_BS = FigureCanvas()
# self.scroll_BS.setWidget(self.canvas_BS)
#
# self.canvas_plot_profile.figure.clear()
# self.fig_profile.clear()
# self.axis_profile.clear()
# self.canvas_plot_profile = FigureCanvas()
# self.verticalLayout_groupbox_plot_profile.addWidget(self.canvas_plot_profile)
self.canvas_plot_profile.figure.clear()
self.fig_profile.clear()
self.axis_profile.clear()
self.canvas_plot_profile = FigureCanvas()
self.verticalLayout_groupbox_plot_profile.addWidget(self.canvas_plot_profile)
self.slider.setValue(0)
self.slider.setMaximum(10)
def load_BS_acoustic_raw_data(self):
@@ -2069,7 +2118,7 @@ class AcousticDataTab(QWidget):
stg.nb_pings_per_sec.append(acoustic_data._nb_pings_per_sec)
stg.nb_pings_averaged_per_profile.append(acoustic_data._nb_pings_averaged_per_profile)
stg.kt_read.append(acoustic_data._kt)
# stg.kt_corrected.append(acoustic_data._kt)
stg.kt_corrected.append([0]*len(stg.kt_read[-1]))
stg.gain_rx.append(acoustic_data._gain_rx)
stg.gain_tx.append(acoustic_data._gain_tx)
stg.temperature.append(0)
@@ -2121,15 +2170,15 @@ class AcousticDataTab(QWidget):
stg.BS_stream_bed_pre_process_average.append(np.array([]))
stg.BS_stream_bed_pre_process_SNR_average.append(np.array([]))
stg.FCB.append([])
stg.depth_real.append([])
stg.lin_reg.append(tuple())
stg.frequencies_for_calibration.append([])
stg.frequency_for_inversion.append([])
stg.fine_sample_position.append([])
stg.sand_sample_position.append([])
# stg.FCB.append([])
# stg.depth_real.append([])
# stg.lin_reg.append(tuple())
#
# stg.frequencies_for_calibration.append([])
# stg.frequency_for_inversion.append([])
#
# stg.fine_sample_position.append([])
# stg.sand_sample_position.append([])
stg.VBI_cross_section.append(np.array([]))
stg.SSC_fine.append(np.array([]))
@@ -2186,6 +2235,8 @@ class AcousticDataTab(QWidget):
self.combobox_frequency_information.addItems(stg.freq_text[self.fileListWidget.currentRow()])
self.combobox_frequency_information.currentIndexChanged.connect(self.combobox_frequency_information_update)
self.spinbox_temperature.setValue(0)
self.label_profiles_value.setText(str(stg.nb_profiles[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()]))
self.gridLayout_goupbox_info.addWidget(self.label_profiles_value, 7, 1, 1, 1)
@@ -2214,7 +2265,7 @@ class AcousticDataTab(QWidget):
[self.combobox_frequency_information.currentIndex()]))
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_profile_value, 13, 1, 1, 1)
stg.kt_corrected = deepcopy(stg.kt_read)
stg.kt_corrected[self.fileListWidget.currentRow()] = stg.kt_read[self.fileListWidget.currentRow()]
# if self.checkbox_kt.isChecked():
# self.spinbox_kt.setValue(
# stg.kt_corrected[self.fileListWidget.currentRow()][self.combobox_frequency_information.currentIndex()])
@@ -2336,43 +2387,44 @@ class AcousticDataTab(QWidget):
self.gridLayout_goupbox_info.removeWidget(self.label_profiles_value)
self.label_profiles_value.setText(str(stg.nb_profiles[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()]))
self.gridLayout_goupbox_info.addWidget(self.label_profiles_value, 6, 1, 1, 1)
self.gridLayout_goupbox_info.addWidget(self.label_profiles_value, 7, 1, 1, 1)
self.label_profiles_per_sec_value.clear()
self.label_profiles_per_sec_value.setText(
str(stg.nb_profiles_per_sec[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()]) + " Hz")
self.gridLayout_goupbox_info.addWidget(self.label_profiles_per_sec_value, 7, 1, 1, 1)
self.gridLayout_goupbox_info.addWidget(self.label_profiles_per_sec_value, 8, 1, 1, 1)
self.label_cells_value.clear()
self.label_cells_value.setText(str(stg.nb_cells[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()]))
self.gridLayout_goupbox_info.addWidget(self.label_cells_value, 8, 1, 1, 1)
self.gridLayout_goupbox_info.addWidget(self.label_cells_value, 9, 1, 1, 1)
self.label_cell_size_value.clear()
self.gridLayout_goupbox_info.removeWidget(self.label_cell_size_value)
self.label_cell_size_value.setText(
str(100 * round(stg.cell_size[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()], 3)) + " cm")
self.gridLayout_goupbox_info.addWidget(self.label_cell_size_value, 9, 1, 1, 1)
self.gridLayout_goupbox_info.addWidget(self.label_cell_size_value, 10, 1, 1, 1)
self.label_pulse_length_value.clear()
self.label_pulse_length_value.setText(
str(round(stg.pulse_length[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()], 6)) + " sec")
self.gridLayout_goupbox_info.addWidget(self.label_pulse_length_value, 10, 1, 1, 1)
self.gridLayout_goupbox_info.addWidget(self.label_pulse_length_value, 11, 1, 1, 1)
self.label_pings_per_sec_value.clear()
self.label_pings_per_sec_value.setText(str(stg.nb_pings_per_sec[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()]) + " Hz")
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_sec_value, 11, 1, 1, 1)
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_sec_value, 12, 1, 1, 1)
self.label_pings_per_profile_value.clear()
self.label_pings_per_profile_value.setText(
str(stg.nb_pings_averaged_per_profile[self.fileListWidget.currentRow()]
[self.combobox_frequency_information.currentIndex()]))
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_profile_value, 12, 1, 1, 1)
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_profile_value, 13, 1, 1, 1)
print("stg.kt_corrected ", stg.kt_corrected)
self.spinbox_kt.clear()
if self.checkbox_kt.isChecked():
# print("combobox information update : checkbox checked")
@@ -2422,20 +2474,23 @@ class AcousticDataTab(QWidget):
def kt_value(self):
# print(f"0 stg.kt_read : {stg.kt_read}")
# print(f"0 stg.kt_corrected {stg.kt_corrected}")
if self.checkbox_kt.isChecked():
stg.kt_corrected[self.fileListWidget.currentRow()][self.combobox_frequency_information.currentIndex()] = (
self.spinbox_kt.value())
if self.fileListWidget.count() > 0:
if self.checkbox_kt.isChecked():
stg.kt_corrected[self.fileListWidget.currentRow()][self.combobox_frequency_information.currentIndex()] \
= self.spinbox_kt.value()
# print(f"1 stg.kt_read : {stg.kt_read}")
# print(f"1 stg.kt_corrected {stg.kt_corrected}")
def gain_rx_value(self):
stg.gain_rx[self.fileListWidget.currentRow()][self.combobox_frequency_information.currentIndex()] =\
self.spinbox_rx.value()
if self.fileListWidget.count() > 0:
stg.gain_rx[self.fileListWidget.currentRow()][self.combobox_frequency_information.currentIndex()] = (
self.spinbox_rx.value())
# print(f"stg.rx : {stg.gain_rx}")
def gain_tx_value(self):
stg.gain_tx[self.fileListWidget.currentRow()][self.combobox_frequency_information.currentIndex()] =\
self.spinbox_tx.value()
if self.fileListWidget.count() > 0:
stg.gain_tx[self.fileListWidget.currentRow()][self.combobox_frequency_information.currentIndex()] = (
self.spinbox_tx.value())
# print(f"stg.tx : {stg.gain_tx}")
def fill_table(self):
File diff suppressed because it is too large. Load diff
+214 -133
View File
@@ -474,6 +474,7 @@ class SedimentCalibrationTab(QWidget):
def function_pushbutton_update_acoustic_file(self):
self.update_acoustic_data()
self.compute_depth_2D()
def function_pushbutton_plot_sample(self):
self.sample_choice_for_calibration()
@@ -507,18 +508,18 @@ class SedimentCalibrationTab(QWidget):
def plot_acoustic_recording(self):
# --- Record frequencies for calibration ---
stg.frequencies_for_calibration[self.combobox_acoustic_data_choice.currentIndex()].clear()
(stg.frequencies_for_calibration[self.combobox_acoustic_data_choice.currentIndex()].
append((stg.freq[self.combobox_acoustic_data_choice.currentIndex()][self.combobox_freq1.currentIndex()],
self.combobox_freq1.currentIndex())))
(stg.frequencies_for_calibration[self.combobox_acoustic_data_choice.currentIndex()].
append((stg.freq[self.combobox_acoustic_data_choice.currentIndex()][self.combobox_freq2.currentIndex()],
self.combobox_freq2.currentIndex())))
stg.frequencies_for_calibration.clear()
stg.frequencies_for_calibration.append((stg.freq[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_freq1.currentIndex()],
self.combobox_freq1.currentIndex()))
stg.frequencies_for_calibration.append((stg.freq[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_freq2.currentIndex()],
self.combobox_freq2.currentIndex()))
stg.frequency_for_inversion[self.combobox_acoustic_data_choice.currentIndex()].clear()
stg.frequency_for_inversion[self.combobox_acoustic_data_choice.currentIndex()].append((
stg.freq[self.combobox_acoustic_data_choice.currentIndex()][self.combobox_freq2.currentIndex()],
self.combobox_freq2.currentIndex()))
stg.frequency_for_inversion = tuple()
stg.frequency_for_inversion = (stg.freq[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_freq2.currentIndex()],
self.combobox_freq2.currentIndex())
# --- Plot acoustic data recording ---
self.verticalLayout_groupbox_data_plot.removeWidget(self.toolbar_BS)
@@ -1154,6 +1155,78 @@ class SedimentCalibrationTab(QWidget):
self.spinbox_zeta_freq2.clear()
self.spinbox_zeta_freq2.setValue(float(data.iloc[4][1]))
def compute_depth_2D(self):
print("self.combobox_acoustic_data_choice.count() ", self.combobox_acoustic_data_choice.count())
if self.combobox_acoustic_data_choice.count() > 0:
for k in range(self.combobox_acoustic_data_choice.count()):
if stg.depth_cross_section[k].shape != (0,):
if stg.time_cross_section[k].shape != (0,):
stg.depth_2D[k] = (
np.zeros((stg.freq[k].shape[0],
stg.depth_cross_section[k].shape[1],
stg.time_cross_section[k].shape[1])))
for f, _ in enumerate(stg.freq[k]):
stg.depth_2D[k][f, :, :] = (
np.repeat(np.transpose(stg.depth_cross_section[k]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time_cross_section[k].shape[1],
axis=1))
elif stg.time[k].shape != (0,):
stg.depth_2D[k] = (
np.zeros((stg.freq[k].shape[0],
stg.depth_cross_section[k].shape[1],
stg.time[k].shape[1])))
for f, _ in enumerate(stg.freq[k]):
stg.depth_2D[k][f, :, :] = (
np.repeat(
np.transpose(stg.depth_cross_section[k]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time[k].shape[1],
axis=1))
elif stg.depth[k].shape != (0,):
if stg.time_cross_section[k].shape != (0,):
stg.depth_2D[k] = (
np.zeros((stg.freq[k].shape[0],
stg.depth[k].shape[1],
stg.time_cross_section[k].shape[1])))
for f, _ in enumerate(stg.freq[k]):
stg.depth_2D[k][f, :, :] = (
np.repeat(
np.transpose(stg.depth[k]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time_cross_section[k].shape[1],
axis=1))
elif stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.depth_2D[k] = (
np.zeros((stg.freq[k].shape[0],
stg.depth[k].shape[1],
stg.time[k].shape[1])))
for f, _ in enumerate(stg.freq[k]):
stg.depth_2D[k][f, :, :] = (
np.repeat(
np.transpose(stg.depth[k]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time[k].shape[1],
axis=1))
print("stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()].shape ",
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()].shape)
def function_pushbutton_compute_calibration(self):
# --- Compute frequency ---
@@ -1211,6 +1284,7 @@ class SedimentCalibrationTab(QWidget):
freq2=stg.freq[self.combobox_acoustic_data_choice.currentIndex()][self.combobox_freq2.currentIndex()],
sv_freq1=sv_freq1, sv_freq2=sv_freq2)
stg.X_exponent.clear()
stg.X_exponent.append(X_exponent)
print(f"Exponent X = {X_exponent:.2f}\n")
@@ -1224,20 +1298,20 @@ class SedimentCalibrationTab(QWidget):
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
np.repeat(np.transpose(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
axis=1))
print("kt cor ", stg.kt_corrected)
print("kt read", stg.kt_read)
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
# stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
#
# for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
# np.repeat(np.transpose(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()]
# [self.combobox_freq1.currentIndex()])[:, np.newaxis],
# stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# axis=1))
#
# print("kt cor ", stg.kt_corrected)
# print("kt read", stg.kt_read)
if (stg.kt_corrected[self.combobox_acoustic_data_choice.currentIndex()] !=
stg.kt_read[self.combobox_acoustic_data_choice.currentIndex()]):
@@ -1270,18 +1344,18 @@ class SedimentCalibrationTab(QWidget):
elif stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
np.repeat(
np.transpose(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
axis=1))
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
# stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
#
# for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
# np.repeat(
# np.transpose(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()]
# [self.combobox_freq1.currentIndex()])[:, np.newaxis],
# stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# axis=1))
print("kt cor ", stg.kt_corrected)
print("kt read", stg.kt_read)
@@ -1319,18 +1393,18 @@ class SedimentCalibrationTab(QWidget):
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
stg.depth[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
np.repeat(
np.transpose(stg.depth[self.combobox_acoustic_data_choice.currentIndex()]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
axis=1))
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
# stg.depth[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
#
# for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
# np.repeat(
# np.transpose(stg.depth[self.combobox_acoustic_data_choice.currentIndex()]
# [self.combobox_freq1.currentIndex()])[:, np.newaxis],
# stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# axis=1))
print("kt cor ", stg.kt_corrected)
print("kt read", stg.kt_read)
@@ -1366,18 +1440,18 @@ class SedimentCalibrationTab(QWidget):
elif stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
stg.depth[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
np.repeat(
np.transpose(stg.depth[self.combobox_acoustic_data_choice.currentIndex()]
[self.combobox_freq1.currentIndex()])[:, np.newaxis],
stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
axis=1))
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.zeros((stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0],
# stg.depth[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1])))
#
# for f, _ in enumerate(stg.freq[self.combobox_acoustic_data_choice.currentIndex()]):
# stg.depth_2D[self.combobox_acoustic_data_choice.currentIndex()][f, :, :] = (
# np.repeat(
# np.transpose(stg.depth[self.combobox_acoustic_data_choice.currentIndex()]
# [self.combobox_freq1.currentIndex()])[:, np.newaxis],
# stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1],
# axis=1))
print("kt cor ", stg.kt_corrected)
print("kt read", stg.kt_read)
@@ -1750,8 +1824,9 @@ class SedimentCalibrationTab(QWidget):
aquascat_cell_size = []
tau = []
real_cell_size = []
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
np.zeros(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape))
# stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.zeros(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape))
stg.depth_real = np.zeros(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape)
for f in range(stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0]):
print("f = ", f)
@@ -1769,9 +1844,11 @@ class SedimentCalibrationTab(QWidget):
real_cell_size.append(stg.water_velocity[self.combobox_acoustic_data_choice.currentIndex()] * tau[f] / 2) # voir fig 2.9
# Converting to real cell profile
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][f, :] = \
(stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][f, :] /
aquascat_cell_size[f] * real_cell_size[f]) # (/ aquascat_cell_size) pour ramener BS.r entre 0 et 1
# stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][f, :] = \
# (stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][f, :] /
# aquascat_cell_size[f] * real_cell_size[f]) # (/ aquascat_cell_size) pour ramener BS.r entre 0 et 1
stg.depth_real[f, :] = (stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][f, :]
/ aquascat_cell_size[f] * real_cell_size[f])
print("stg.depth_real ", stg.depth_real)
# (* real_cell_size) pour remettre les échelles spatiales sur la taille réelle des cellules
@@ -1780,8 +1857,9 @@ class SedimentCalibrationTab(QWidget):
aquascat_cell_size = []
tau = []
real_cell_size = []
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
np.zeros(stg.depth[self.combobox_acoustic_data_choice.currentIndex()].shape))
# stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.zeros(stg.depth[self.combobox_acoustic_data_choice.currentIndex()].shape))
stg.depth_real = (np.zeros(stg.depth[self.combobox_acoustic_data_choice.currentIndex()].shape))
for f in range(stg.freq[self.combobox_acoustic_data_choice.currentIndex()].shape[0]):
@@ -1797,28 +1875,36 @@ class SedimentCalibrationTab(QWidget):
real_cell_size.append(stg.water_velocity[self.combobox_acoustic_data_choice.currentIndex()] * tau[f] / 2) # voir fig 2.9
# Converting to real cell profile
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][f, :] = \
(stg.depth[self.combobox_acoustic_data_choice.currentIndex()][f, :] /
aquascat_cell_size[f] * real_cell_size[f]) # (/ aquascat_cell_size) pour ramener BS.r entre 0 et 1
# (* real_cell_size) pour remettre les échelles spatiales sur la taille réelle des cellules
# stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][f, :] = \
# (stg.depth[self.combobox_acoustic_data_choice.currentIndex()][f, :] /
# aquascat_cell_size[f] * real_cell_size[f]) # (/ aquascat_cell_size) pour ramener BS.r entre 0 et 1
# # (* real_cell_size) pour remettre les échelles spatiales sur la taille réelle des cellules
stg.depth_real[f, :] = (stg.depth[self.combobox_acoustic_data_choice.currentIndex()][f, :] /
aquascat_cell_size[f] * real_cell_size[f])
print("R_real 2D ", stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()].shape)
print("R_real 2D ", stg.depth_real.shape)
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
np.repeat(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][:, :, np.newaxis],
stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1], axis=2))
# stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.repeat(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][:, :, np.newaxis],
# stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1], axis=2))
stg.depth_real = \
(np.repeat(stg.depth_real[:, :, np.newaxis],
stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape[1], axis=2))
print("R_real 3D ", stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()].shape)
print("R_real 3D ", stg.depth_real.shape)
else:
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
np.repeat(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][:, :, np.newaxis],
# stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()] = (
# np.repeat(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()][:, :, np.newaxis],
# stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1], axis=2))
stg.depth_real = (
np.repeat(stg.depth_real[:, :, np.newaxis],
stg.time[self.combobox_acoustic_data_choice.currentIndex()].shape[1], axis=2))
print("R_real 3D ", stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()].shape)
print("R_real 3D ", stg.depth_real.shape)
def compute_FCB(self):
# if stg.BS_stream_bed.size == 0:
@@ -1848,106 +1934,106 @@ class SedimentCalibrationTab(QWidget):
if stg.BS_stream_bed_pre_process_average[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_stream_bed_pre_process_average[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif stg.BS_stream_bed_pre_process_SNR[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_stream_bed_pre_process_SNR[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif stg.BS_stream_bed[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
print("zzzzzzzzzzzzzzzzzzzzz")
print(np.log(stg.BS_stream_bed[self.combobox_acoustic_data_choice.currentIndex()]).shape)
print(np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]).shape)
print(stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()])
print(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()].shape)
print(np.log(stg.depth_real).shape)
print(stg.water_attenuation)
print(stg.depth_real.shape)
print("zzzzzzzzzzzzzzzzzzzzz")
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_stream_bed[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif stg.BS_cross_section_pre_process_average[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_cross_section_pre_process_average[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif stg.BS_cross_section_pre_process_SNR[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_cross_section_pre_process_SNR[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif stg.BS_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
print("ttttttttttttttttttttttttt")
print(stg.BS_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape)
print(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()].shape)
print(stg.depth_real.shape)
print(stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()])
print(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()].shape)
print(stg.depth_real.shape)
print("ttttttttttttttttttttttttt")
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_cross_section[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif stg.BS_raw_data_pre_process_average[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_raw_data_pre_process_average[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif stg.BS_raw_data_pre_process_SNR[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_raw_data_pre_process_SNR[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
elif BS_raw_data[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()] = \
stg.FCB = \
(np.log(stg.BS_raw_data[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()]) +
np.log(stg.depth_real) +
2 * stg.water_attenuation[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()] *
stg.depth_real[self.combobox_acoustic_data_choice.currentIndex()])
stg.depth_real)
print("FCB ", stg.FCB[self.combobox_acoustic_data_choice.currentIndex()].shape)
print("FCB ", stg.FCB.shape)
self.plot_FCB()
def plot_FCB(self):
if stg.FCB[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
if stg.FCB.shape != (0,):
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
@@ -1976,16 +2062,14 @@ class SedimentCalibrationTab(QWidget):
self.axis_FCB.plot(
stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()],
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
stg.FCB[self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
linestyle="solid", linewidth=1, color="k")
else:
self.axis_FCB.plot(
stg.depth[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()],
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
stg.FCB[self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
linestyle="solid", linewidth=1, color="k")
self.axis_FCB.text(.95, .05,
@@ -2009,7 +2093,7 @@ class SedimentCalibrationTab(QWidget):
def update_plot_FCB(self):
if stg.FCB[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
if stg.FCB.shape != (0,):
self.axis_FCB.cla()
if stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
@@ -2017,8 +2101,7 @@ class SedimentCalibrationTab(QWidget):
self.axis_FCB.plot(
stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()],
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
stg.FCB[self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
linestyle="solid", linewidth=1, color="k")
else:
@@ -2026,8 +2109,7 @@ class SedimentCalibrationTab(QWidget):
self.axis_FCB.plot(
stg.depth[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex()],
stg.FCB[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
stg.FCB[self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1],
linestyle="solid", linewidth=1, color="k")
self.axis_FCB.text(.95, .05,
@@ -2093,11 +2175,10 @@ class SedimentCalibrationTab(QWidget):
self.update_plot_FCB()
if stg.FCB[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
if stg.FCB.shape != (0,):
# --- Identify FCB profile where value are not NaN ---
y0 = stg.FCB[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1]
y0 = stg.FCB[self.combobox_frequency_FCB.currentIndex(), :, self.slider_FCB.value() - 1]
y = y0[np.where(np.isnan(y0) == False)]
if stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
@@ -2118,17 +2199,17 @@ class SedimentCalibrationTab(QWidget):
lin_reg_compute = linregress(x[value1:value2], y[value1:value2])
print("lin_reg_compute ", lin_reg_compute)
stg.lin_reg[self.combobox_acoustic_data_choice.currentIndex()] = (lin_reg_compute.slope, lin_reg_compute.intercept)
stg.lin_reg = (lin_reg_compute.slope, lin_reg_compute.intercept)
print("stg.lin_reg ", stg.lin_reg)
# --- Plot result of linear regression ---
self.axis_FCB.plot(
stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), value1:value2],
stg.lin_reg[self.combobox_acoustic_data_choice.currentIndex()][0] *
stg.lin_reg[0] *
stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), value1:value2] +
stg.lin_reg[self.combobox_acoustic_data_choice.currentIndex()][1],
stg.lin_reg[1],
linestyle="dashed", linewidth=1, color="b")
else:
@@ -2149,24 +2230,24 @@ class SedimentCalibrationTab(QWidget):
lin_reg_compute = linregress(x[value1:value2], y[value1:value2])
print("lin_reg_compute ", lin_reg_compute)
stg.lin_reg[self.combobox_acoustic_data_choice.currentIndex()] = (
stg.lin_reg = (
lin_reg_compute.slope, lin_reg_compute.intercept)
# --- Plot result of linear regression ---
self.axis_FCB.plot(
stg.depth[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), value1:value2],
stg.lin_reg[self.combobox_acoustic_data_choice.currentIndex()][0] *
stg.lin_reg[0] *
stg.depth[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), value1:value2] +
stg.lin_reg[self.combobox_acoustic_data_choice.currentIndex()][1],
stg.lin_reg[1],
linestyle="dashed", linewidth=1, color="b")
self.fig_FCB.canvas.draw_idle()
# --- Display the value of alphaS compute with FCB ---
self.label_alphaS_FCB.clear()
self.label_alphaS_FCB.setText(f"\u03B1s = {-0.5*stg.lin_reg[self.combobox_acoustic_data_choice.currentIndex()][0]:.4f} dB/m")
self.label_alphaS_FCB.setText(f"\u03B1s = {-0.5*stg.lin_reg[0]:.4f} dB/m")
# if stg.FCB.size == 0:
# msgBox = QMessageBox()