SQL: Settings: Fix bottom detection value save/load/display.

This commit is contained in:
parouby committed 2025-04-28 10:46:28 +02:00
1 parent ff39ad0536
commit 55f03fdd83
3 files changed
+30 -15

No files matched your search

+23 -8
View File
@@ -760,7 +760,6 @@ class AcousticDataTab(QWidget):
self.water_attenuation()
self.compute_tmin_tmax()
self.compute_rmin_rmax()
self.set_range_for_spinboxes_bathymetry()
self.combobox_ABS_system_choice.blockSignals(False)
self.fileListWidget.blockSignals(False)
@@ -1688,6 +1687,9 @@ class AcousticDataTab(QWidget):
stg.val_bottom.append([])
stg.ind_bottom.append([])
stg.freq_bottom_detection.append((0, 0))
stg.depth_bottom_detection_min.append(0.0)
stg.depth_bottom_detection_max.append(0.0)
stg.depth_bottom_detection_interval.append(0.0)
stg.BS_mean.append(np.array([]))
stg.BS_noise_raw_data.append(np.array([]))
@@ -2826,28 +2828,41 @@ class AcousticDataTab(QWidget):
self.lineEdit_slider.setText(
str(stg.time[self.fileListWidget.currentRow()][self.combobox_frequency_profile.currentIndex(), self.slider.value()-1]))
@trace
def update_bottom_detection_settings(self):
data_id = max(0, self.fileListWidget.currentRow())
self.combobox_frequency_bathymetry.setCurrentIndex(
int(stg.freq_bottom_detection[data_id][0])
)
self.lineEdit_depth_min_bathy.setText(
str(stg.depth_bottom_detection_min)
str(stg.depth_bottom_detection_min[data_id])
)
self.lineEdit_depth_max_bathy.setText(
str(stg.depth_bottom_detection_max)
str(stg.depth_bottom_detection_max[data_id])
)
self.lineEdit_next_cell_bathy.setText(
str(stg.depth_bottom_detection_interval)
str(stg.depth_bottom_detection_interval[data_id])
)
def save_bottom_detection_settings(self):
stg.depth_bottom_detection_min = float(
data_id = max(0, self.fileListWidget.currentRow())
stg.freq_bottom_detection[data_id] = (
int(self.combobox_frequency_bathymetry.currentIndex()),
str(self.combobox_frequency_bathymetry.currentText()),
)
stg.depth_bottom_detection_min[data_id] = float(
self.lineEdit_depth_min_bathy.text()
)
stg.depth_bottom_detection_max = float(
stg.depth_bottom_detection_max[data_id] = float(
self.lineEdit_depth_max_bathy.text()
)
stg.depth_bottom_detection_interval = float(
stg.depth_bottom_detection_interval[data_id] = float(
self.lineEdit_next_cell_bathy.text()
)