Compare commits
9 Commits
11ced0a263
...
c521738567
| Author | SHA1 | Date |
|---|---|---|
|
|
c521738567 | |
|
|
b5338366cf | |
|
|
752697db86 | |
|
|
b99e950a8e | |
|
|
b9669d9cbf | |
|
|
b9ca307c59 | |
|
|
f0150443e3 | |
|
|
4c024cbb42 | |
|
|
496937bde2 |
|
|
@ -1,6 +1,9 @@
|
||||||
TAGS
|
TAGS
|
||||||
Error_file.txt
|
Error_file.txt
|
||||||
|
|
||||||
|
# Windows executable file
|
||||||
|
*.exe
|
||||||
|
|
||||||
# Created by https://www.toptal.com/developers/gitignore/api/python
|
# Created by https://www.toptal.com/developers/gitignore/api/python
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=python
|
# Edit at https://www.toptal.com/developers/gitignore?templates=python
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,8 @@ class AcousticDataTab(QWidget):
|
||||||
self.groupbox_gps = QGroupBox()
|
self.groupbox_gps = QGroupBox()
|
||||||
self.groupbox_gps.setTitle("Convert recording time to distance from bank")
|
self.groupbox_gps.setTitle("Convert recording time to distance from bank")
|
||||||
self.horizontal_gps_input_data = QHBoxLayout(self.groupbox_gps)
|
self.horizontal_gps_input_data = QHBoxLayout(self.groupbox_gps)
|
||||||
|
self.groupbox_gps.setEnabled(False)
|
||||||
|
|
||||||
|
|
||||||
self.verticalLayout_groupbox_display_option.addWidget(self.groupbox_gps)
|
self.verticalLayout_groupbox_display_option.addWidget(self.groupbox_gps)
|
||||||
|
|
||||||
|
|
@ -445,34 +447,61 @@ class AcousticDataTab(QWidget):
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
|
|
||||||
self.label_distance_from_bank = QLabel("Distance from bank")
|
self.label_distance_from_bank = QLabel("Distance from bank")
|
||||||
self.gridLayout_groupbox_display_option_limits.addWidget(self.label_distance_from_bank, 3, 0, 1, 1, Qt.AlignRight)
|
self.gridLayout_groupbox_display_option_limits.addWidget(
|
||||||
|
self.label_distance_from_bank,
|
||||||
|
3, 0, 1, 1, Qt.AlignRight
|
||||||
|
)
|
||||||
|
self.label_distance_from_bank.setEnabled(False)
|
||||||
|
|
||||||
self.label_distance_from_bank_min = QLabel()
|
self.label_distance_from_bank_min = QLabel()
|
||||||
self.label_distance_from_bank_min.setText("0.00")
|
self.label_distance_from_bank_min.setText("0.00")
|
||||||
self.gridLayout_groupbox_display_option_limits.addWidget(self.label_distance_from_bank_min, 3, 1, 1, 1, Qt.AlignCenter)
|
self.gridLayout_groupbox_display_option_limits.addWidget(
|
||||||
|
self.label_distance_from_bank_min,
|
||||||
|
3, 1, 1, 1, Qt.AlignCenter
|
||||||
|
)
|
||||||
|
self.label_distance_from_bank_min.setEnabled(False)
|
||||||
|
|
||||||
self.lineEdit_distance_from_bank_min_limits = QLineEdit()
|
self.lineEdit_distance_from_bank_min_limits = QLineEdit()
|
||||||
self.lineEdit_distance_from_bank_min_limits.setText("0.00")
|
self.lineEdit_distance_from_bank_min_limits.setText("0.00")
|
||||||
self.lineEdit_distance_from_bank_min_limits.setMaximumWidth(80)
|
self.lineEdit_distance_from_bank_min_limits.setMaximumWidth(80)
|
||||||
self.gridLayout_groupbox_display_option_limits.addWidget(self.lineEdit_distance_from_bank_min_limits, 3, 2, 1, 1,
|
self.gridLayout_groupbox_display_option_limits.addWidget(
|
||||||
Qt.AlignCenter)
|
self.lineEdit_distance_from_bank_min_limits,
|
||||||
|
3, 2, 1, 1, Qt.AlignCenter
|
||||||
|
)
|
||||||
|
self.lineEdit_distance_from_bank_min_limits.setEnabled(False)
|
||||||
|
|
||||||
self.lineEdit_distance_from_bank_max_limits = QLineEdit()
|
self.lineEdit_distance_from_bank_max_limits = QLineEdit()
|
||||||
self.lineEdit_distance_from_bank_max_limits.setText("0.00")
|
self.lineEdit_distance_from_bank_max_limits.setText("0.00")
|
||||||
self.lineEdit_distance_from_bank_max_limits.setMaximumWidth(80)
|
self.lineEdit_distance_from_bank_max_limits.setMaximumWidth(80)
|
||||||
self.gridLayout_groupbox_display_option_limits.addWidget(self.lineEdit_distance_from_bank_max_limits, 3, 3, 1, 1,
|
self.gridLayout_groupbox_display_option_limits.addWidget(
|
||||||
Qt.AlignCenter)
|
self.lineEdit_distance_from_bank_max_limits,
|
||||||
|
3, 3, 1, 1, Qt.AlignCenter
|
||||||
|
)
|
||||||
|
self.lineEdit_distance_from_bank_max_limits.setEnabled(False)
|
||||||
|
|
||||||
self.label_distance_from_bank_max = QLabel()
|
self.label_distance_from_bank_max = QLabel()
|
||||||
self.label_distance_from_bank_max.setText("0.00")
|
self.label_distance_from_bank_max.setText("0.00")
|
||||||
self.gridLayout_groupbox_display_option_limits.addWidget(self.label_distance_from_bank_max, 3, 4, 1, 1, Qt.AlignCenter)
|
self.gridLayout_groupbox_display_option_limits.addWidget(
|
||||||
|
self.label_distance_from_bank_max,
|
||||||
|
3, 4, 1, 1, Qt.AlignCenter
|
||||||
|
)
|
||||||
|
self.label_distance_from_bank_max.setEnabled(False)
|
||||||
|
|
||||||
self.label_distance_from_bank_unit_meter = QLabel("meters")
|
self.label_distance_from_bank_unit_meter = QLabel("meters")
|
||||||
self.gridLayout_groupbox_display_option_limits.addWidget(self.label_distance_from_bank_unit_meter, 3, 5, 1, 1, Qt.AlignCenter)
|
self.gridLayout_groupbox_display_option_limits.addWidget(
|
||||||
|
self.label_distance_from_bank_unit_meter,
|
||||||
|
3, 5, 1, 1, Qt.AlignCenter
|
||||||
|
)
|
||||||
|
self.label_distance_from_bank_unit_meter.setEnabled(False)
|
||||||
|
|
||||||
self.pushbutton_apply_distance_from_bank_limits = QPushButton()
|
self.pushbutton_apply_distance_from_bank_limits = QPushButton()
|
||||||
self.pushbutton_apply_distance_from_bank_limits.setIcon(self.icon_apply_limits)
|
self.pushbutton_apply_distance_from_bank_limits.setIcon(self.icon_apply_limits)
|
||||||
self.gridLayout_groupbox_display_option_limits.addWidget(self.pushbutton_apply_distance_from_bank_limits, 3, 6, 1, 1)
|
self.gridLayout_groupbox_display_option_limits.addWidget(
|
||||||
|
self.pushbutton_apply_distance_from_bank_limits,
|
||||||
|
3, 6, 1, 1
|
||||||
|
)
|
||||||
|
self.pushbutton_apply_distance_from_bank_limits.setEnabled(False)
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
||||||
|
|
@ -747,6 +776,7 @@ class AcousticDataTab(QWidget):
|
||||||
self.groupbox_transect_2Dplot_raw_BS_data.setTitle(_translate("CONSTANT_STRING", cs.RAW_ACOUSTIC_DATA_2D_FIELD))
|
self.groupbox_transect_2Dplot_raw_BS_data.setTitle(_translate("CONSTANT_STRING", cs.RAW_ACOUSTIC_DATA_2D_FIELD))
|
||||||
|
|
||||||
def fileListWidget_event(self):
|
def fileListWidget_event(self):
|
||||||
|
self.fileListWidget.blockSignals(True)
|
||||||
|
|
||||||
self.print_selected_file()
|
self.print_selected_file()
|
||||||
self.fill_measurements_information_groupbox()
|
self.fill_measurements_information_groupbox()
|
||||||
|
|
@ -760,6 +790,8 @@ class AcousticDataTab(QWidget):
|
||||||
self.update_plot_profile()
|
self.update_plot_profile()
|
||||||
self.set_range_for_spinboxes_bathymetry()
|
self.set_range_for_spinboxes_bathymetry()
|
||||||
|
|
||||||
|
self.fileListWidget.blockSignals(False)
|
||||||
|
|
||||||
def print_selected_file(self):
|
def print_selected_file(self):
|
||||||
print(f"Selected file in list widget : {self.fileListWidget.selectedItems()}")
|
print(f"Selected file in list widget : {self.fileListWidget.selectedItems()}")
|
||||||
print("self.fileListWidget.selectedItems()[1:] : ", self.fileListWidget.selectedItems()[1:])
|
print("self.fileListWidget.selectedItems()[1:] : ", self.fileListWidget.selectedItems()[1:])
|
||||||
|
|
@ -1359,7 +1391,6 @@ class AcousticDataTab(QWidget):
|
||||||
self.fileListWidget.blockSignals(False)
|
self.fileListWidget.blockSignals(False)
|
||||||
|
|
||||||
def rename_file_in_ListWidget(self, event):
|
def rename_file_in_ListWidget(self, event):
|
||||||
|
|
||||||
if event == QEvent.MouseButtonPress:
|
if event == QEvent.MouseButtonPress:
|
||||||
print("c'est bon")
|
print("c'est bon")
|
||||||
if event.button == Qt.RightButton:
|
if event.button == Qt.RightButton:
|
||||||
|
|
@ -1372,144 +1403,69 @@ class AcousticDataTab(QWidget):
|
||||||
menu.addAction('Rename')
|
menu.addAction('Rename')
|
||||||
|
|
||||||
def remove_file_from_ListWidget(self):
|
def remove_file_from_ListWidget(self):
|
||||||
if self.fileListWidget.count() > 0:
|
if self.fileListWidget.count() <= 0:
|
||||||
|
return
|
||||||
|
|
||||||
# --- Clear files included in list Widget ---
|
self.fileListWidget.blockSignals(True)
|
||||||
current_row = self.fileListWidget.currentRow()
|
|
||||||
if current_row >= 0:
|
|
||||||
current_item = self.fileListWidget.takeItem(current_row)
|
|
||||||
del current_item
|
|
||||||
|
|
||||||
# --- Clear variables ---
|
# --- Clear files included in list Widget ---
|
||||||
list_to_pop1 = [
|
current_row = self.fileListWidget.currentRow()
|
||||||
"stg.acoustic_data", "stg.date", "stg.hour",
|
if current_row >= 0:
|
||||||
"stg.freq", "stg.freq_text",
|
current_item = self.fileListWidget.takeItem(current_row)
|
||||||
"stg.nb_profiles", "stg.nb_profiles_per_sec",
|
del current_item
|
||||||
"stg.nb_cells", "stg.cell_size",
|
|
||||||
"stg.pulse_length", "stg.nb_pings_per_sec",
|
|
||||||
"stg.nb_pings_averaged_per_profile",
|
|
||||||
"stg.kt_read", "stg.kt_corrected", "stg.gain_rx", "stg.gain_tx",
|
|
||||||
"stg.filename_BS_raw_data", "stg.path_BS_raw_data",
|
|
||||||
"stg.BS_raw_data", "stg.time", "stg.depth",
|
|
||||||
"stg.BS_raw_data_reshape", "stg.time_reshape", "stg.depth_reshape"
|
|
||||||
]
|
|
||||||
|
|
||||||
for p in list_to_pop1:
|
# --- Clear variables ---
|
||||||
if isinstance(eval(p), list):
|
list_to_pop1 = [
|
||||||
exec(p + ".pop(current_row)")
|
stg.acoustic_data, stg.date, stg.hour,
|
||||||
|
stg.freq, stg.freq_text,
|
||||||
if stg.BS_cross_section:
|
stg.nb_profiles, stg.nb_profiles_per_sec,
|
||||||
|
stg.nb_cells, stg.cell_size,
|
||||||
list_to_pop2 = ["stg.rmin", "stg.rmax", "stg.tmin", "stg.tmax",
|
stg.pulse_length, stg.nb_pings_per_sec,
|
||||||
"stg.time_cross_section", "stg.depth_cross_section", "stg.BS_cross_section"]
|
stg.nb_pings_averaged_per_profile,
|
||||||
|
stg.kt_read, stg.kt_corrected, stg.gain_rx, stg.gain_tx,
|
||||||
for k in list_to_pop2:
|
stg.filename_BS_raw_data, stg.path_BS_raw_data,
|
||||||
exec(k + ".pop(current_row)")
|
stg.BS_raw_data, stg.time, stg.depth,
|
||||||
|
stg.BS_raw_data_reshape, stg.time_reshape, stg.depth_reshape
|
||||||
if stg.BS_stream_bed:
|
|
||||||
|
|
||||||
list_to_pop3 = ["stg.BS_stream_bed", "stg.depth_bottom",
|
|
||||||
"stg.val_bottom", "stg.ind_bottom", "stg.freq_bottom_detection"]
|
|
||||||
|
|
||||||
for s in list_to_pop3:
|
|
||||||
exec(s + ".pop(current_row)")
|
|
||||||
|
|
||||||
if self.fileListWidget.count() == 0:
|
|
||||||
|
|
||||||
# --- Clear measurements information ---
|
|
||||||
self.label_date_acoustic_file.clear()
|
|
||||||
self.label_date_acoustic_file.setText("Date: ")
|
|
||||||
self.label_hour_acoustic_file.clear()
|
|
||||||
self.label_hour_acoustic_file.setText("Hour: ")
|
|
||||||
self.lineEdit_sound_attenuation.setText("0.00")
|
|
||||||
self.combobox_frequency_information.clear()
|
|
||||||
self.label_profiles_value.clear()
|
|
||||||
self.label_profiles_per_sec_value.clear()
|
|
||||||
self.label_cells_value.clear()
|
|
||||||
self.label_cell_size_value.clear()
|
|
||||||
self.label_pulse_length_value.clear()
|
|
||||||
self.label_pings_per_sec_value.clear()
|
|
||||||
self.label_pings_per_profile_value.clear()
|
|
||||||
self.lineEdit_kt.setText("0.00")
|
|
||||||
self.lineEdit_rx.setText("0.00")
|
|
||||||
self.lineEdit_tx.setText("0.00")
|
|
||||||
|
|
||||||
# --- Clear display options ---
|
|
||||||
|
|
||||||
self.label_time_min.setText("0.00")
|
|
||||||
self.lineEdit_time_min_limits.setText("0.00")
|
|
||||||
self.lineEdit_time_max_limits.setText("0.00")
|
|
||||||
self.label_time_max.setText("0.00")
|
|
||||||
|
|
||||||
self.label_depth_min.setText("0.00")
|
|
||||||
self.lineEdit_depth_min_limits.setText("0.00")
|
|
||||||
self.lineEdit_depth_max_limits.setText("0.00")
|
|
||||||
self.label_depth_max.setText("0.00")
|
|
||||||
|
|
||||||
self.label_distance_from_bank_min.setText("0.00")
|
|
||||||
self.lineEdit_distance_from_bank_min_limits.setText("0.00")
|
|
||||||
self.lineEdit_distance_from_bank_max_limits.setText("0.00")
|
|
||||||
self.label_distance_from_bank_max.setText("0.00")
|
|
||||||
|
|
||||||
self.combobox_frequency_bathymetry.clear()
|
|
||||||
self.lineEdit_depth_min_bathy.setText("0.00")
|
|
||||||
self.lineEdit_depth_max_bathy.setText("0.00")
|
|
||||||
self.lineEdit_next_cell_bathy.setText("0.00")
|
|
||||||
|
|
||||||
# --- Clear table of values ---
|
|
||||||
self.tableView.reset()
|
|
||||||
data = pd.DataFrame(np.zeros((10, 10)))
|
|
||||||
self.tableModel = TableModel(data)
|
|
||||||
self.tableView.setModel(self.tableModel)
|
|
||||||
|
|
||||||
# --- 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)
|
|
||||||
|
|
||||||
def clear_files_from_ListWidget(self):
|
|
||||||
|
|
||||||
list_to_clear = [
|
|
||||||
"stg.acoustic_data", "stg.date", "stg.hour",
|
|
||||||
"stg.freq", "stg.freq_text",
|
|
||||||
"stg.nb_profiles", "stg.nb_profiles_per_sec",
|
|
||||||
"stg.nb_cells", "stg.cell_size",
|
|
||||||
"stg.pulse_length", "stg.nb_pings_per_sec",
|
|
||||||
"stg.nb_pings_averaged_per_profile",
|
|
||||||
"stg.kt_read", "stg.kt_corrected", "stg.gain_rx", "stg.gain_tx",
|
|
||||||
"stg.filename_BS_raw_data", "stg.path_BS_raw_data",
|
|
||||||
"stg.BS_raw_data", "stg.time", "stg.depth",
|
|
||||||
"stg.BS_raw_data_reshape", "stg.time_reshape", "stg.depth_reshape",
|
|
||||||
"stg.rmin", "stg.rmax", "stg.tmin", "stg.tmax",
|
|
||||||
"stg.time_cross_section", "stg.depth_cross_section",
|
|
||||||
"stg.BS_cross_section", "stg.BS_stream_bed"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for k in list_to_clear:
|
for p in list_to_pop1:
|
||||||
if isinstance(eval(k), list):
|
if isinstance(p, list):
|
||||||
exec(k + ".clear()")
|
p.pop(current_row)
|
||||||
|
|
||||||
|
if stg.BS_cross_section:
|
||||||
|
list_to_pop2 = [
|
||||||
|
stg.rmin, stg.rmax, stg.tmin, stg.tmax,
|
||||||
|
stg.time_cross_section, stg.depth_cross_section,
|
||||||
|
stg.BS_cross_section
|
||||||
|
]
|
||||||
|
|
||||||
|
for k in list_to_pop2:
|
||||||
|
k.pop(current_row)
|
||||||
|
|
||||||
|
if stg.BS_stream_bed:
|
||||||
|
list_to_pop3 = [
|
||||||
|
stg.BS_stream_bed, stg.depth_bottom,
|
||||||
|
stg.val_bottom, stg.ind_bottom,
|
||||||
|
stg.freq_bottom_detection
|
||||||
|
]
|
||||||
|
|
||||||
|
for s in list_to_pop3:
|
||||||
|
s.pop(current_row)
|
||||||
|
|
||||||
|
if self.fileListWidget.count() == 0:
|
||||||
|
self.clear_files_from_ListWidget_reset()
|
||||||
|
|
||||||
|
self.fileListWidget.blockSignals(False)
|
||||||
|
|
||||||
|
def clear_files_from_ListWidget(self):
|
||||||
|
self.fileListWidget.blockSignals(True)
|
||||||
|
|
||||||
|
self.clear_files_data()
|
||||||
|
self.clear_files_from_ListWidget_reset()
|
||||||
|
|
||||||
|
self.fileListWidget.blockSignals(False)
|
||||||
|
|
||||||
|
def clear_files_from_ListWidget_reset(self):
|
||||||
self.fileListWidget.clear()
|
self.fileListWidget.clear()
|
||||||
# self.fileListWidget.takeItem(0)
|
# self.fileListWidget.takeItem(0)
|
||||||
|
|
||||||
|
|
@ -1586,6 +1542,27 @@ class AcousticDataTab(QWidget):
|
||||||
self.slider.setValue(0)
|
self.slider.setValue(0)
|
||||||
self.slider.setMaximum(10)
|
self.slider.setMaximum(10)
|
||||||
|
|
||||||
|
def clear_files_data(self):
|
||||||
|
list_to_clear = [
|
||||||
|
stg.acoustic_data, stg.date, stg.hour,
|
||||||
|
stg.freq, stg.freq_text,
|
||||||
|
stg.nb_profiles, stg.nb_profiles_per_sec,
|
||||||
|
stg.nb_cells, stg.cell_size,
|
||||||
|
stg.pulse_length, stg.nb_pings_per_sec,
|
||||||
|
stg.nb_pings_averaged_per_profile,
|
||||||
|
stg.kt_read, stg.kt_corrected, stg.gain_rx, stg.gain_tx,
|
||||||
|
stg.filename_BS_raw_data, stg.path_BS_raw_data,
|
||||||
|
stg.BS_raw_data, stg.time, stg.depth,
|
||||||
|
stg.BS_raw_data_reshape, stg.time_reshape, stg.depth_reshape,
|
||||||
|
stg.rmin, stg.rmax, stg.tmin, stg.tmax,
|
||||||
|
stg.time_cross_section, stg.depth_cross_section,
|
||||||
|
stg.BS_cross_section, stg.BS_stream_bed
|
||||||
|
]
|
||||||
|
|
||||||
|
for k in list_to_clear:
|
||||||
|
if isinstance(k, list):
|
||||||
|
k.clear()
|
||||||
|
|
||||||
def load_BS_acoustic_raw_data(self):
|
def load_BS_acoustic_raw_data(self):
|
||||||
if self.fileListWidget.count() == 0:
|
if self.fileListWidget.count() == 0:
|
||||||
for p, f in zip(stg.path_BS_raw_data,
|
for p, f in zip(stg.path_BS_raw_data,
|
||||||
|
|
@ -1972,7 +1949,7 @@ class AcousticDataTab(QWidget):
|
||||||
14, 1, 1, 1, Qt.AlignLeft
|
14, 1, 1, 1, Qt.AlignLeft
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.checkbox_kt.isChecked():
|
if self.checkbox_kt.isChecked() and len(stg.kt_corrected) > freq_id:
|
||||||
if self.combobox_frequency_information.count() > 0:
|
if self.combobox_frequency_information.count() > 0:
|
||||||
self.lineEdit_kt.setText(
|
self.lineEdit_kt.setText(
|
||||||
str("%.4f" % stg.kt_corrected[freq_id])
|
str("%.4f" % stg.kt_corrected[freq_id])
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
import os
|
import os
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
from math import isinf
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
|
|
@ -398,6 +399,16 @@ class AcousticInversionTab(QWidget):
|
||||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
msgBox.exec()
|
msgBox.exec()
|
||||||
|
|
||||||
|
elif isinf(stg.alpha_s[0]) or isinf(stg.alpha_s[1]):
|
||||||
|
|
||||||
|
msgBox = QMessageBox()
|
||||||
|
msgBox.setWindowTitle("Alpha computation error")
|
||||||
|
msgBox.setIconPixmap(
|
||||||
|
QPixmap(self.path_icon + "no_approved.png").scaledToHeight(32, Qt.SmoothTransformation))
|
||||||
|
msgBox.setText("Sediment sound attenuation is infinite !")
|
||||||
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
|
msgBox.exec()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
self.compute_VBI()
|
self.compute_VBI()
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ from scipy.stats import linregress
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
from math import isinf
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
from matplotlib.colors import LogNorm
|
from matplotlib.colors import LogNorm
|
||||||
|
|
@ -2246,6 +2247,16 @@ class SedimentCalibrationTab(QWidget):
|
||||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
msgBox.exec()
|
msgBox.exec()
|
||||||
|
|
||||||
|
elif isinf(alpha_s_freq1) or isinf(alpha_s_freq2):
|
||||||
|
|
||||||
|
msgBox = QMessageBox()
|
||||||
|
msgBox.setWindowTitle("Alpha computation error")
|
||||||
|
msgBox.setIconPixmap(
|
||||||
|
QPixmap(self._path_icon("no_approved.png")).scaledToHeight(32, Qt.SmoothTransformation))
|
||||||
|
msgBox.setText("Sediment sound attenuation is infinite !")
|
||||||
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
|
msgBox.exec()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
msgBox = QMessageBox()
|
msgBox = QMessageBox()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue