resolve conflict

dev-brahim
brahim 2025-03-11 17:10:56 +01:00
commit 372d002277
3 changed files with 17 additions and 8 deletions

View File

@ -87,11 +87,13 @@ class SedimentCalibrationTab(QWidget):
# 1O units is 100% , 1 units is 10%
self.horizontalLayoutTop = QHBoxLayout()
self.verticalLayoutMain.addLayout(self.horizontalLayoutTop, 5)
self.verticalLayoutMain.addLayout(self.horizontalLayoutTop, 5) # 1O units is 100% , 1 units is 10%
self.horizontalLayoutBottom = QHBoxLayout()
self.verticalLayoutMain.addLayout(self.horizontalLayoutBottom, 5)
# --------------------------------------------------------------------------------------------------------------
self.groupbox_acoustic_data = QGroupBox()
self.horizontalLayoutTop.addWidget(self.groupbox_acoustic_data, 6)
@ -118,6 +120,7 @@ class SedimentCalibrationTab(QWidget):
self.groupbox_data_plot = QGroupBox()
self.horizontalLayout_groupbox_acoustic_data.addWidget(self.groupbox_data_plot, 7)
# --- Groupbox data choice ---
self.verticalLayout_groupbox_data_choice = QVBoxLayout(self.groupbox_data_choice)
self._setup_widgets_acoustic_data_1()
@ -347,6 +350,9 @@ class SedimentCalibrationTab(QWidget):
self.groupbox_FCB = QGroupBox()
self.horizontalLayoutBottom.addWidget(self.groupbox_FCB, 6)
# +++++++++++++++++++++++++++++++++++++
# +++ Groupbox sediment calibration +++
self.groupbox_sediment_calibration.setTitle("Step 3 : Compute Calibration")
self.verticalLayout_groupbox_sediment_calibration = QVBoxLayout(self.groupbox_sediment_calibration)
@ -1911,9 +1917,6 @@ class SedimentCalibrationTab(QWidget):
axis=1))
def function_pushbutton_compute_calibration(self):
if len(stg.sand_sample_target_indice) == 0:
self._data_validity_message_box()
return
self.label_temperature.clear()
self.label_temperature.setText("T = " + str(stg.temperature) + " °C")
@ -1928,6 +1931,8 @@ class SedimentCalibrationTab(QWidget):
self.compute_zeta()
def compute_ks(self):
# --- Compute ks ---
psd_number_of_particles = (
self.inv_hc.compute_particle_size_distribution_in_number_of_particles(
num_sample=stg.sand_sample_target[0][1],
@ -2742,3 +2747,4 @@ class SedimentCalibrationTab(QWidget):
self.lineEdit_slider_FCB.setText(
str(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
self.combobox_frequency_FCB.currentIndex(), self.slider_FCB.value()-1]))

View File

@ -647,6 +647,9 @@ class SignalProcessingTab(QWidget):
stg.BS_mean[self.combobox_acoustic_data_choice.currentIndex()] = (
np.nanmean(stg.BS_raw_data[self.combobox_acoustic_data_choice.currentIndex()][:, :, val1:val2], axis=2))
if stg.BS_noise_raw_data[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
self.compute_noise_from_profile_tail_value()
def plot_averaged_profile_tail(self):
# --- Plot averaged signal ---
@ -932,7 +935,7 @@ class SignalProcessingTab(QWidget):
# --- Compute noise from value and compute SNR ---
if stg.BS_stream_bed[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
stg.BS_noise_raw_data[self.combobox_acoustic_data_choice.currentIndex()] = np.array([])
stg.BS_noise_raw_data[self.combobox_acoustic_data_choice.currentIndex()] = (
np.full(stg.BS_stream_bed[self.combobox_acoustic_data_choice.currentIndex()].shape,
float(self.lineEdit_profile_tail_value.text().replace(",", "."))))
@ -992,7 +995,7 @@ class SignalProcessingTab(QWidget):
self.plot_pre_processed_BS_signal()
self.plot_pre_processed_profile()
self.activate_list_of_pre_processed_data()
# self.activate_list_of_pre_processed_data()
def plot_noise(self):
self.horizontalLayout_groupbox_plot_noise_data.removeWidget(self.canvas_noise)

View File

@ -33,7 +33,8 @@ logging.basicConfig(
)
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
# logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)
class MainApplication(QMainWindow):
@ -53,7 +54,6 @@ class MainApplication(QMainWindow):
# -------------- Acoustic data tab ---------------
self.acoustic_data_tab = AcousticDataTab(self.ui_mainwindow.tab1)
print("0 AcousticDataTab ", id(AcousticDataTab))
self.acoustic_data_tab\
.combobox_ABS_system_choice\