Inversion: Some refactoring.

dev
Pierre-Antoine 2025-04-16 10:15:50 +02:00
parent c60db3c346
commit 6256ddd1d7
1 changed files with 200 additions and 127 deletions

View File

@ -61,18 +61,30 @@ class AcousticInversionTab(QWidget):
def __init__(self, widget_tab): def __init__(self, widget_tab):
super().__init__() super().__init__()
self.path_icon = "./icons/"
self.icon_folder = QIcon(self.path_icon + "folder.png")
self.icon_triangle_left = QIcon(self.path_icon + "triangle_left.png")
self.icon_triangle_left_to_begin = QIcon(self.path_icon + "triangle_left_to_begin.png")
self.icon_triangle_right = QIcon(self.path_icon + "triangle_right.png")
self.icon_triangle_right_to_end = QIcon(self.path_icon + "triangle_right_to_end.png")
self.icon_update = QIcon(self.path_icon + "update.png")
self.inv_hc = AcousticInversionMethodHighConcentration() self.inv_hc = AcousticInversionMethodHighConcentration()
### --- General layout of widgets --- self._setup_icons()
self._setup_general_layout(widget_tab)
self._setup_connections()
def _path_icon(self, icon):
return os.path.join("icons", icon)
def _setup_icons(self):
self.icon_folder = QIcon(self._path_icon("folder.png"))
self.icon_triangle_left = QIcon(self._path_icon("triangle_left.png"))
self.icon_triangle_left_to_begin = QIcon(
self._path_icon("triangle_left_to_begin.png")
)
self.icon_triangle_right = QIcon(
self._path_icon("triangle_right.png")
)
self.icon_triangle_right_to_end = QIcon(
self._path_icon("triangle_right_to_end.png")
)
self.icon_update = QIcon(self._path_icon("update.png"))
def _setup_general_layout(self, widget_tab):
self.verticalLayoutMain = QVBoxLayout(widget_tab) self.verticalLayoutMain = QVBoxLayout(widget_tab)
self.horizontalLayout_Run_Inversion = QHBoxLayout() self.horizontalLayout_Run_Inversion = QHBoxLayout()
@ -84,32 +96,47 @@ class AcousticInversionTab(QWidget):
self.horizontalLayoutBottom = QHBoxLayout() self.horizontalLayoutBottom = QHBoxLayout()
self.verticalLayoutMain.addLayout(self.horizontalLayoutBottom, 5) self.verticalLayoutMain.addLayout(self.horizontalLayoutBottom, 5)
self._setup_acoustic_data()
self._setup_top_layout()
self._setup_bottom_layout()
self._setup_SSC_fine()
self._setup_measured_SSC_fine()
self._setup_SSC_sand()
self._setup_measured_SSC_sand()
def _setup_acoustic_data(self):
### --- Combobox acoustic data choice + pushbutton Run Inversion --- ### --- Combobox acoustic data choice + pushbutton Run Inversion ---
self.pushbutton_update_acoustic_data_choice = QPushButton() self.pushbutton_update_acoustic_data_choice = QPushButton()
self.pushbutton_update_acoustic_data_choice.setIcon(self.icon_update) self.pushbutton_update_acoustic_data_choice.setIcon(self.icon_update)
self.pushbutton_update_acoustic_data_choice.setMaximumWidth(50) self.pushbutton_update_acoustic_data_choice.setMaximumWidth(50)
self.horizontalLayout_Run_Inversion.addWidget(self.pushbutton_update_acoustic_data_choice) self.horizontalLayout_Run_Inversion.addWidget(
self.pushbutton_update_acoustic_data_choice
)
self.combobox_acoustic_data_choice = QComboBox() self.combobox_acoustic_data_choice = QComboBox()
self.combobox_acoustic_data_choice.setMaximumWidth(300) self.combobox_acoustic_data_choice.setMaximumWidth(300)
self.horizontalLayout_Run_Inversion.addWidget(self.combobox_acoustic_data_choice) self.horizontalLayout_Run_Inversion.addWidget(
self.combobox_acoustic_data_choice
)
self.pushbutton_run_inversion = QPushButton() self.pushbutton_run_inversion = QPushButton()
self.pushbutton_run_inversion.setText("RUN INVERSION") self.pushbutton_run_inversion.setText("RUN INVERSION")
self.pushbutton_run_inversion.setMaximumWidth(110) self.pushbutton_run_inversion.setMaximumWidth(110)
self.horizontalLayout_Run_Inversion.addWidget(self.pushbutton_run_inversion) self.horizontalLayout_Run_Inversion\
.addWidget(self.pushbutton_run_inversion)
self.spacerItem_RunInversion = QSpacerItem(1000, 10)#, QSizePolicy.Expanding, QSizePolicy.Minimum) self.spacerItem_RunInversion = QSpacerItem(1000, 10)#, QSizePolicy.Expanding, QSizePolicy.Minimum)
self.horizontalLayout_Run_Inversion.addSpacerItem(self.spacerItem_RunInversion) self.horizontalLayout_Run_Inversion.addSpacerItem(
self.spacerItem_RunInversion
)
self.pushbutton_save_result = QPushButton() self.pushbutton_save_result = QPushButton()
self.pushbutton_save_result.setText("Save Results") self.pushbutton_save_result.setText("Save Results")
self.pushbutton_save_result.setMaximumWidth(110) self.pushbutton_save_result.setMaximumWidth(110)
self.horizontalLayout_Run_Inversion.addWidget(self.pushbutton_save_result) self.horizontalLayout_Run_Inversion.addWidget(self.pushbutton_save_result)
### --- Layout of groupbox in the Top horizontal layout box def _setup_top_layout(self):
# Plot SSC 2D field | SSC vertical profile | Plot SSC graph sample vs inversion ===>>> FINE # Plot SSC 2D field | SSC vertical profile | Plot SSC graph sample vs inversion ===>>> FINE
self.groupbox_plot_SSC_fine = QGroupBox() self.groupbox_plot_SSC_fine = QGroupBox()
@ -117,14 +144,17 @@ class AcousticInversionTab(QWidget):
self.groupbox_plot_SSC_fine_vertical_profile = QGroupBox() self.groupbox_plot_SSC_fine_vertical_profile = QGroupBox()
self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider = QVBoxLayout() self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider = QVBoxLayout()
self.horizontalLayoutTop.addLayout(self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider, 3) self.horizontalLayoutTop.addLayout(
self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider, 3
)
self.groupbox_plot_measured_vs_inverted_SSC_fine = QGroupBox() self.groupbox_plot_measured_vs_inverted_SSC_fine = QGroupBox()
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox = QVBoxLayout() self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox = QVBoxLayout()
self.horizontalLayoutTop.addLayout(self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox, 3) self.horizontalLayoutTop.addLayout(
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox, 3
### --- Layout of groupbox in the Bottom horizontal layout box )
def _setup_bottom_layout(self):
# Plot SSC 2D field | SSC vertical profile | Plot SSC graph sample vs inversion ===>>> SAND # Plot SSC 2D field | SSC vertical profile | Plot SSC graph sample vs inversion ===>>> SAND
self.groupbox_plot_SSC_sand = QGroupBox() self.groupbox_plot_SSC_sand = QGroupBox()
@ -132,51 +162,55 @@ class AcousticInversionTab(QWidget):
self.groupbox_plot_SSC_sand_vertical_profile = QGroupBox() self.groupbox_plot_SSC_sand_vertical_profile = QGroupBox()
self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider = QVBoxLayout() self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider = QVBoxLayout()
self.horizontalLayoutBottom.addLayout(self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider, 3) self.horizontalLayoutBottom.addLayout(
self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider, 3
)
self.groupbox_plot_measured_vs_inverted_SSC_sand = QGroupBox() self.groupbox_plot_measured_vs_inverted_SSC_sand = QGroupBox()
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox = QVBoxLayout() self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox = QVBoxLayout()
self.horizontalLayoutBottom.addLayout(self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox, self.horizontalLayoutBottom.addLayout(
3) self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox,
3
)
def _setup_SSC_fine(self):
# ===================================================== self.verticalLayout_groupbox_plot_SSC_fine = QVBoxLayout(
# TOP HORIZONTAL BOX LAYOUT self.groupbox_plot_SSC_fine
# ===================================================== )
# +++++++++++++++++++++++++++++++++++++++
# | Group box SSC 2D Field FINE |
# +++++++++++++++++++++++++++++++++++++++
self.verticalLayout_groupbox_plot_SSC_fine = QVBoxLayout(self.groupbox_plot_SSC_fine)
self.canvas_SSC_fine = FigureCanvas() self.canvas_SSC_fine = FigureCanvas()
self.toolbar_SSC_fine = NavigationToolBar(self.canvas_SSC_fine, self) self.toolbar_SSC_fine = NavigationToolBar(self.canvas_SSC_fine, self)
self.verticalLayout_groupbox_plot_SSC_fine.addWidget(self.toolbar_SSC_fine) self.verticalLayout_groupbox_plot_SSC_fine\
self.verticalLayout_groupbox_plot_SSC_fine.addWidget(self.canvas_SSC_fine) .addWidget(self.toolbar_SSC_fine)
self.verticalLayout_groupbox_plot_SSC_fine\
.addWidget(self.canvas_SSC_fine)
# +++++++++++++++++++++++++++++++++++++++++++++++ self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider\
# | Group box SSC fine vertical profile | .addWidget(self.groupbox_plot_SSC_fine_vertical_profile)
# +++++++++++++++++++++++++++++++++++++++++++++++
self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider.addWidget(self.groupbox_plot_SSC_fine_vertical_profile)
self.verticalLayout_groupbox_plot_vertical_profile_fine = QVBoxLayout( self.verticalLayout_groupbox_plot_vertical_profile_fine = QVBoxLayout(
self.groupbox_plot_SSC_fine_vertical_profile) self.groupbox_plot_SSC_fine_vertical_profile)
self.canvas_profile_fine = FigureCanvas() self.canvas_profile_fine = FigureCanvas()
self.toolbar_profile_fine = NavigationToolBar(self.canvas_profile_fine, self) self.toolbar_profile_fine = NavigationToolBar(
self.canvas_profile_fine, self
)
self.verticalLayout_groupbox_plot_vertical_profile_fine.addWidget(self.toolbar_profile_fine) self.verticalLayout_groupbox_plot_vertical_profile_fine\
self.verticalLayout_groupbox_plot_vertical_profile_fine.addWidget(self.canvas_profile_fine) .addWidget(self.toolbar_profile_fine)
self.verticalLayout_groupbox_plot_vertical_profile_fine\
.addWidget(self.canvas_profile_fine)
self.horizontalLayout_slider_fine = QHBoxLayout() self.horizontalLayout_slider_fine = QHBoxLayout()
self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider.addLayout(self.horizontalLayout_slider_fine) self.verticalLayout_groupbox_plot_SSC_fine_profile_and_slider\
.addLayout(self.horizontalLayout_slider_fine)
self.pushbutton_left_to_begin_fine = QPushButton() self.pushbutton_left_to_begin_fine = QPushButton()
self.pushbutton_left_to_begin_fine.setIcon(self.icon_triangle_left_to_begin) self.pushbutton_left_to_begin_fine\
self.horizontalLayout_slider_fine.addWidget(self.pushbutton_left_to_begin_fine) .setIcon(self.icon_triangle_left_to_begin)
self.horizontalLayout_slider_fine\
.addWidget(self.pushbutton_left_to_begin_fine)
self.pushbutton_left_fine = QPushButton() self.pushbutton_left_fine = QPushButton()
self.pushbutton_left_fine.setIcon(self.icon_triangle_left) self.pushbutton_left_fine.setIcon(self.icon_triangle_left)
@ -192,8 +226,10 @@ class AcousticInversionTab(QWidget):
self.horizontalLayout_slider_fine.addWidget(self.pushbutton_right_fine) self.horizontalLayout_slider_fine.addWidget(self.pushbutton_right_fine)
self.pushbutton_right_to_end_fine = QPushButton() self.pushbutton_right_to_end_fine = QPushButton()
self.pushbutton_right_to_end_fine.setIcon(self.icon_triangle_right_to_end) self.pushbutton_right_to_end_fine\
self.horizontalLayout_slider_fine.addWidget(self.pushbutton_right_to_end_fine) .setIcon(self.icon_triangle_right_to_end)
self.horizontalLayout_slider_fine\
.addWidget(self.pushbutton_right_to_end_fine)
self.slider_fine = QSlider() self.slider_fine = QSlider()
self.horizontalLayout_slider_fine.addWidget(self.slider_fine) self.horizontalLayout_slider_fine.addWidget(self.slider_fine)
@ -205,59 +241,62 @@ class AcousticInversionTab(QWidget):
self.slider_fine.setTickInterval(1) self.slider_fine.setTickInterval(1)
self.slider_fine.setValue(1) self.slider_fine.setValue(1)
# +++++++++++++++++++++++++++++++++++++++++++++++++++ def _setup_measured_SSC_fine(self):
# | Group box Measured VS Inverted SSC Fine | self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox\
# +++++++++++++++++++++++++++++++++++++++++++++++++++ .addWidget(
self.groupbox_plot_measured_vs_inverted_SSC_fine
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox.addWidget( )
self.groupbox_plot_measured_vs_inverted_SSC_fine)
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine = QVBoxLayout( self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine = QVBoxLayout(
self.groupbox_plot_measured_vs_inverted_SSC_fine) self.groupbox_plot_measured_vs_inverted_SSC_fine)
self.canvas_inverted_vs_measured_SSC_fine = FigureCanvas() self.canvas_inverted_vs_measured_SSC_fine = FigureCanvas()
self.toolbar_inverted_vs_measured_SSC_fine = NavigationToolBar(self.canvas_inverted_vs_measured_SSC_fine, self) self.toolbar_inverted_vs_measured_SSC_fine = NavigationToolBar(
self.canvas_inverted_vs_measured_SSC_fine, self
)
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine.addWidget(self.toolbar_inverted_vs_measured_SSC_fine) self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine.addWidget(
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine.addWidget(self.canvas_inverted_vs_measured_SSC_fine) self.toolbar_inverted_vs_measured_SSC_fine
)
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine.addWidget(
self.canvas_inverted_vs_measured_SSC_fine
)
self.horizontalLayout_combobox_fine_sample_choice = QHBoxLayout() self.horizontalLayout_combobox_fine_sample_choice = QHBoxLayout()
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox.addLayout( self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_fine_and_combobox\
self.horizontalLayout_combobox_fine_sample_choice) .addLayout(
self.horizontalLayout_combobox_fine_sample_choice
)
self.label_fine_sample_choice = QLabel() self.label_fine_sample_choice = QLabel()
self.label_fine_sample_choice.setText("Fine sample choice : ") self.label_fine_sample_choice.setText("Fine sample choice : ")
self.horizontalLayout_combobox_fine_sample_choice.addWidget(self.label_fine_sample_choice) self.horizontalLayout_combobox_fine_sample_choice\
.addWidget(self.label_fine_sample_choice)
self.combobox_fine_sample_choice = CheckableComboBox() self.combobox_fine_sample_choice = CheckableComboBox()
self.horizontalLayout_combobox_fine_sample_choice.addWidget(self.combobox_fine_sample_choice) self.horizontalLayout_combobox_fine_sample_choice\
.addWidget(self.combobox_fine_sample_choice)
self.pushbutton_plot_fine_sample_choice = QPushButton() self.pushbutton_plot_fine_sample_choice = QPushButton()
self.pushbutton_plot_fine_sample_choice.setIcon(self.icon_update) self.pushbutton_plot_fine_sample_choice.setIcon(self.icon_update)
self.pushbutton_plot_fine_sample_choice.setMaximumWidth(50) self.pushbutton_plot_fine_sample_choice.setMaximumWidth(50)
self.horizontalLayout_combobox_fine_sample_choice.addWidget(self.pushbutton_plot_fine_sample_choice) self.horizontalLayout_combobox_fine_sample_choice\
.addWidget(self.pushbutton_plot_fine_sample_choice)
self.fine_sample_to_plot = [] self.fine_sample_to_plot = []
# ===================================================== def _setup_SSC_sand(self):
# BOTTOM HORIZONTAL BOX LAYOUT self.verticalLayout_groupbox_plot_SSC_sand = QVBoxLayout(
# ===================================================== self.groupbox_plot_SSC_sand
)
# ++++++++++++++++++++++++++++++++++++++
# | Group box SSC 2D Field SAND |
# ++++++++++++++++++++++++++++++++++++++
self.verticalLayout_groupbox_plot_SSC_sand = QVBoxLayout(self.groupbox_plot_SSC_sand)
self.canvas_SSC_sand = FigureCanvas() self.canvas_SSC_sand = FigureCanvas()
self.toolbar_SSC_sand = NavigationToolBar(self.canvas_SSC_sand, self) self.toolbar_SSC_sand = NavigationToolBar(self.canvas_SSC_sand, self)
self.verticalLayout_groupbox_plot_SSC_sand.addWidget(self.toolbar_SSC_sand) self.verticalLayout_groupbox_plot_SSC_sand\
self.verticalLayout_groupbox_plot_SSC_sand.addWidget(self.canvas_SSC_sand) .addWidget(self.toolbar_SSC_sand)
self.verticalLayout_groupbox_plot_SSC_sand\
# +++++++++++++++++++++++++++++++++++++++++++++++ .addWidget(self.canvas_SSC_sand)
# | Group box SSC sand vertical profile |
# +++++++++++++++++++++++++++++++++++++++++++++++
self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider.addWidget( self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider.addWidget(
self.groupbox_plot_SSC_sand_vertical_profile) self.groupbox_plot_SSC_sand_vertical_profile)
@ -266,17 +305,24 @@ class AcousticInversionTab(QWidget):
self.groupbox_plot_SSC_sand_vertical_profile) self.groupbox_plot_SSC_sand_vertical_profile)
self.canvas_profile_sand = FigureCanvas() self.canvas_profile_sand = FigureCanvas()
self.toolbar_profile_sand = NavigationToolBar(self.canvas_profile_sand, self) self.toolbar_profile_sand = NavigationToolBar(
self.canvas_profile_sand, self
)
self.verticalLayout_groupbox_plot_vertical_profile_sand.addWidget(self.toolbar_profile_sand) self.verticalLayout_groupbox_plot_vertical_profile_sand\
self.verticalLayout_groupbox_plot_vertical_profile_sand.addWidget(self.canvas_profile_sand) .addWidget(self.toolbar_profile_sand)
self.verticalLayout_groupbox_plot_vertical_profile_sand\
.addWidget(self.canvas_profile_sand)
self.horizontalLayout_slider_sand = QHBoxLayout() self.horizontalLayout_slider_sand = QHBoxLayout()
self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider.addLayout(self.horizontalLayout_slider_sand) self.verticalLayout_groupbox_plot_SSC_sand_profile_and_slider\
.addLayout(self.horizontalLayout_slider_sand)
self.pushbutton_left_to_begin_sand = QPushButton() self.pushbutton_left_to_begin_sand = QPushButton()
self.pushbutton_left_to_begin_sand.setIcon(self.icon_triangle_left_to_begin) self.pushbutton_left_to_begin_sand\
self.horizontalLayout_slider_sand.addWidget(self.pushbutton_left_to_begin_sand) .setIcon(self.icon_triangle_left_to_begin)
self.horizontalLayout_slider_sand\
.addWidget(self.pushbutton_left_to_begin_sand)
self.pushbutton_left_sand = QPushButton() self.pushbutton_left_sand = QPushButton()
self.pushbutton_left_sand.setIcon(self.icon_triangle_left) self.pushbutton_left_sand.setIcon(self.icon_triangle_left)
@ -292,8 +338,10 @@ class AcousticInversionTab(QWidget):
self.horizontalLayout_slider_sand.addWidget(self.pushbutton_right_sand) self.horizontalLayout_slider_sand.addWidget(self.pushbutton_right_sand)
self.pushbutton_right_to_end_sand = QPushButton() self.pushbutton_right_to_end_sand = QPushButton()
self.pushbutton_right_to_end_sand.setIcon(self.icon_triangle_right_to_end) self.pushbutton_right_to_end_sand\
self.horizontalLayout_slider_sand.addWidget(self.pushbutton_right_to_end_sand) .setIcon(self.icon_triangle_right_to_end)
self.horizontalLayout_slider_sand\
.addWidget(self.pushbutton_right_to_end_sand)
self.slider_sand = QSlider() self.slider_sand = QSlider()
self.horizontalLayout_slider_sand.addWidget(self.slider_sand) self.horizontalLayout_slider_sand.addWidget(self.slider_sand)
@ -305,72 +353,97 @@ class AcousticInversionTab(QWidget):
self.slider_sand.setTickInterval(1) self.slider_sand.setTickInterval(1)
self.slider_sand.setValue(1) self.slider_sand.setValue(1)
# +++++++++++++++++++++++++++++++++++++++++++++++++++ def _setup_measured_SSC_sand(self):
# | Group box Measured VS Inverted SSC Sand | self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox\
# +++++++++++++++++++++++++++++++++++++++++++++++++++ .addWidget(
self.groupbox_plot_measured_vs_inverted_SSC_sand
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox.addWidget( )
self.groupbox_plot_measured_vs_inverted_SSC_sand)
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand = QVBoxLayout( self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand = QVBoxLayout(
self.groupbox_plot_measured_vs_inverted_SSC_sand) self.groupbox_plot_measured_vs_inverted_SSC_sand
)
self.canvas_inverted_vs_measured_SSC_sand = FigureCanvas() self.canvas_inverted_vs_measured_SSC_sand = FigureCanvas()
self.toolbar_inverted_vs_measured_SSC_sand = NavigationToolBar(self.canvas_inverted_vs_measured_SSC_sand, self) self.toolbar_inverted_vs_measured_SSC_sand = NavigationToolBar(
self.canvas_inverted_vs_measured_SSC_sand, self
)
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand.addWidget( self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand\
self.toolbar_inverted_vs_measured_SSC_sand) .addWidget(
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand.addWidget( self.toolbar_inverted_vs_measured_SSC_sand
self.canvas_inverted_vs_measured_SSC_sand) )
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand\
.addWidget(
self.canvas_inverted_vs_measured_SSC_sand
)
self.horizontalLayout_combobox_sand_sample_choice = QHBoxLayout() self.horizontalLayout_combobox_sand_sample_choice = QHBoxLayout()
self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox.addLayout( self.verticalLayout_groupbox_plot_measured_vs_inverted_SSC_sand_and_combobox\
self.horizontalLayout_combobox_sand_sample_choice) .addLayout(
self.horizontalLayout_combobox_sand_sample_choice
)
self.label_sand_sample_choice = QLabel() self.label_sand_sample_choice = QLabel()
self.label_sand_sample_choice.setText("Sand sample choice : ") self.label_sand_sample_choice.setText("Sand sample choice : ")
self.horizontalLayout_combobox_sand_sample_choice.addWidget(self.label_sand_sample_choice) self.horizontalLayout_combobox_sand_sample_choice\
.addWidget(self.label_sand_sample_choice)
self.combobox_sand_sample_choice = CheckableComboBox() self.combobox_sand_sample_choice = CheckableComboBox()
self.horizontalLayout_combobox_sand_sample_choice.addWidget(self.combobox_sand_sample_choice) self.horizontalLayout_combobox_sand_sample_choice\
.addWidget(self.combobox_sand_sample_choice)
self.pushbutton_plot_sand_sample_choice = QPushButton() self.pushbutton_plot_sand_sample_choice = QPushButton()
self.pushbutton_plot_sand_sample_choice.setIcon(self.icon_update) self.pushbutton_plot_sand_sample_choice.setIcon(self.icon_update)
self.pushbutton_plot_sand_sample_choice.setMaximumWidth(50) self.pushbutton_plot_sand_sample_choice.setMaximumWidth(50)
self.horizontalLayout_combobox_sand_sample_choice.addWidget(self.pushbutton_plot_sand_sample_choice) self.horizontalLayout_combobox_sand_sample_choice\
.addWidget(self.pushbutton_plot_sand_sample_choice)
# ============================================================================================================== def _setup_connections(self):
# ---------------------------------------- Connect signal of widget -------------------------------------------- self.pushbutton_update_acoustic_data_choice\
# ============================================================================================================== .clicked.connect(self.update_acoustic_data_choice)
self.pushbutton_update_acoustic_data_choice.clicked.connect(self.update_acoustic_data_choice) self.pushbutton_run_inversion\
.clicked.connect(self.function_run_inversion)
self.pushbutton_save_result\
.clicked.connect(self.save_result_in_excel_file)
self.pushbutton_run_inversion.clicked.connect(self.function_run_inversion) self.pushbutton_left_to_begin_fine\
self.pushbutton_save_result.clicked.connect(self.save_result_in_excel_file) .clicked.connect(self.slider_profile_number_to_begin_fine)
self.pushbutton_left_fine\
.clicked.connect(self.slider_profile_number_to_left_fine)
self.pushbutton_right_fine\
.clicked.connect(self.slider_profile_number_to_right_fine)
self.pushbutton_right_to_end_fine\
.clicked.connect(self.slider_profile_number_to_end_fine)
self.lineEdit_slider_fine\
.returnPressed.connect(self.profile_number_on_lineEdit_fine)
self.slider_fine.valueChanged\
.connect(self.update_lineEdit_by_moving_slider_fine)
self.slider_fine.valueChanged\
.connect(self.update_plot_SSC_fine_vertical_profile)
self.pushbutton_left_to_begin_fine.clicked.connect(self.slider_profile_number_to_begin_fine) self.pushbutton_plot_fine_sample_choice\
self.pushbutton_left_fine.clicked.connect(self.slider_profile_number_to_left_fine) .clicked\
self.pushbutton_right_fine.clicked.connect(self.slider_profile_number_to_right_fine) .connect(self.plot_measured_vs_inverted_SSC_fine)
self.pushbutton_right_to_end_fine.clicked.connect(self.slider_profile_number_to_end_fine)
self.lineEdit_slider_fine.returnPressed.connect(self.profile_number_on_lineEdit_fine)
self.slider_fine.valueChanged.connect(self.update_lineEdit_by_moving_slider_fine)
self.slider_fine.valueChanged.connect(self.update_plot_SSC_fine_vertical_profile)
self.pushbutton_plot_fine_sample_choice.clicked.connect(self.plot_measured_vs_inverted_SSC_fine) self.pushbutton_left_to_begin_sand\
.clicked.connect(self.slider_profile_number_to_begin_sand)
self.pushbutton_left_sand\
.clicked.connect(self.slider_profile_number_to_left_sand)
self.pushbutton_right_sand\
.clicked.connect(self.slider_profile_number_to_right_sand)
self.pushbutton_right_to_end_sand\
.clicked.connect(self.slider_profile_number_to_end_sand)
self.lineEdit_slider_sand\
.returnPressed.connect(self.profile_number_on_lineEdit_sand)
self.slider_sand.valueChanged\
.connect(self.update_lineEdit_by_moving_slider_sand)
self.slider_sand.valueChanged\
.connect(self.update_plot_SSC_sand_vertical_profile)
self.pushbutton_left_to_begin_sand.clicked.connect(self.slider_profile_number_to_begin_sand) self.pushbutton_plot_sand_sample_choice\
self.pushbutton_left_sand.clicked.connect(self.slider_profile_number_to_left_sand) .clicked.connect(self.plot_measured_vs_inverted_SSC_sand)
self.pushbutton_right_sand.clicked.connect(self.slider_profile_number_to_right_sand)
self.pushbutton_right_to_end_sand.clicked.connect(self.slider_profile_number_to_end_sand)
self.lineEdit_slider_sand.returnPressed.connect(self.profile_number_on_lineEdit_sand)
self.slider_sand.valueChanged.connect(self.update_lineEdit_by_moving_slider_sand)
self.slider_sand.valueChanged.connect(self.update_plot_SSC_sand_vertical_profile)
self.pushbutton_plot_sand_sample_choice.clicked.connect(self.plot_measured_vs_inverted_SSC_sand)
# ==================================================================================================================
# ------------------------------------ Functions for Acoustic Inversion Tab ----------------------------------------
# ==================================================================================================================
@trace @trace
def full_update(self): def full_update(self):