mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-30 03:10:40 +01:00
The signal processing tab is updated. The noise is uploaded and graphs are automatically plot: noise, SNR and filtered Vbs (SNR, average) 2D fields, and averaged profile (for one frequency).
This commit is contained in:
1 parent
e204ddba0e
commit
85a816d922
3 files changed
+1390
-574
No files matched your search
+51
-46
@@ -130,11 +130,6 @@ class AcousticDataTab(QWidget):
|
||||
self.lineEdit_acoustic_file = QLineEdit()
|
||||
self.gridLayout_groupbox_acoustic_file.addWidget(self.lineEdit_acoustic_file, 0, 2, 1, 1)
|
||||
|
||||
self.label_date_groupbox_acoustic_file = QLabel()
|
||||
self.gridLayout_groupbox_acoustic_file.addWidget(self.label_date_groupbox_acoustic_file, 1, 0, 1, 2)
|
||||
self.label_hour_groupbox_acoustic_file = QLabel()
|
||||
self.gridLayout_groupbox_acoustic_file.addWidget(self.label_hour_groupbox_acoustic_file, 1, 2, 1, 1)
|
||||
|
||||
# Download Push Button event : connect button clicked signal to open file slot
|
||||
self.pushbutton_acoustic_file.clicked.connect(self.open_dialog_box)
|
||||
|
||||
@@ -266,10 +261,16 @@ class AcousticDataTab(QWidget):
|
||||
self.label_temperature = QLabel("Temperature : ")
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_temperature, 0, 0, 1, 1)
|
||||
self.lineEdit_temperature = QLineEdit()
|
||||
self.lineEdit_temperature.textChanged.connect(self.temperature)
|
||||
self.gridLayout_goupbox_info.addWidget(self.lineEdit_temperature, 0, 1, 1, 1)
|
||||
self.label_degreCelsius = QLabel("°C")
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_degreCelsius, 0, 2, 1, 1)
|
||||
|
||||
self.label_date_acoustic_file = QLabel()
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_date_acoustic_file, 1, 0, 1, 2)
|
||||
self.label_hour_acoustic_file = QLabel()
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_hour_acoustic_file, 1, 1, 1, 1)
|
||||
|
||||
self.label_profiles = QLabel()
|
||||
self.label_profiles_per_sec = QLabel()
|
||||
self.label_cells = QLabel() # n_cell in UBSediFlow parameters
|
||||
@@ -388,23 +389,23 @@ class AcousticDataTab(QWidget):
|
||||
|
||||
# --- Push buttons to trigger plot of transect with Backscatter acoustic raw data and SNR ---
|
||||
|
||||
self.gridLayout_plot_transect_frequency_profile = QGridLayout()
|
||||
self.verticalLayout_display_option.addLayout(self.gridLayout_plot_transect_frequency_profile)
|
||||
# self.horizontalLayout_pushbutton_plot_BS_SNR_data = QHBoxLayout()
|
||||
# self.verticalLayout_display_option.addLayout(self.horizontalLayout_pushbutton_plot_BS_SNR_data)
|
||||
# self.gridLayout_plot_transect_frequency_profile = QGridLayout()
|
||||
# self.verticalLayout_display_option.addLayout(self.gridLayout_plot_transect_frequency_profile)
|
||||
# # self.horizontalLayout_pushbutton_plot_BS_SNR_data = QHBoxLayout()
|
||||
# # self.verticalLayout_display_option.addLayout(self.horizontalLayout_pushbutton_plot_BS_SNR_data)
|
||||
#
|
||||
# self.pushbutton_plot_transect_with_BS_raw_data = QPushButton()
|
||||
# self.gridLayout_plot_transect_frequency_profile.addWidget(self.pushbutton_plot_transect_with_BS_raw_data, 0, 0, 1, 3)
|
||||
# # self.horizontalLayout_pushbutton_plot_BS_SNR_data.addWidget(self.pushbutton_plot_transect_with_BS_raw_data)
|
||||
#
|
||||
# self.pushbutton_plot_transect_with_BS_raw_data.clicked.connect(self.plot_transect_with_BS_raw_data)
|
||||
|
||||
self.pushbutton_plot_transect_with_BS_raw_data = QPushButton()
|
||||
self.gridLayout_plot_transect_frequency_profile.addWidget(self.pushbutton_plot_transect_with_BS_raw_data, 0, 0, 1, 3)
|
||||
# self.horizontalLayout_pushbutton_plot_BS_SNR_data.addWidget(self.pushbutton_plot_transect_with_BS_raw_data)
|
||||
# self.label_profile_frequency = QLabel()
|
||||
# self.label_profile_frequency.setText("Profile frequency : ")
|
||||
# self.gridLayout_plot_transect_frequency_profile.addWidget(self.label_profile_frequency, 0, 4, 1, 1)
|
||||
|
||||
self.pushbutton_plot_transect_with_BS_raw_data.clicked.connect(self.plot_transect_with_BS_raw_data)
|
||||
|
||||
self.label_profile_frequency = QLabel()
|
||||
self.label_profile_frequency.setText("Profile frequency : ")
|
||||
self.gridLayout_plot_transect_frequency_profile.addWidget(self.label_profile_frequency, 0, 4, 1, 1)
|
||||
|
||||
self.combobox_frequency_profile = QComboBox()
|
||||
self.gridLayout_plot_transect_frequency_profile.addWidget(self.combobox_frequency_profile, 0, 5, 1, 1)
|
||||
# self.combobox_frequency_profile = QComboBox()
|
||||
# self.gridLayout_plot_transect_frequency_profile.addWidget(self.combobox_frequency_profile, 0, 5, 1, 1)
|
||||
|
||||
# self.pushbutton_plot_transect_with_SNR_data = QPushButton()
|
||||
# self.horizontalLayout_pushbutton_plot_BS_SNR_data.addWidget(self.pushbutton_plot_transect_with_SNR_data)
|
||||
@@ -622,8 +623,14 @@ class AcousticDataTab(QWidget):
|
||||
self.verticalLayout_groupbox_plot_profile = QVBoxLayout(self.groupbox_plot_profile)
|
||||
self.groupbox_plot_profile.setTitle("Profiles")
|
||||
|
||||
self.canvas_plot_profile = None
|
||||
self.horizontalLayout_spacerItem_combobox_frequency_profile = QHBoxLayout()
|
||||
self.verticalLayout_groupbox_plot_profile.addLayout(self.horizontalLayout_spacerItem_combobox_frequency_profile)
|
||||
self.spacerItem_frequency_profile = QSpacerItem(50, 10, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
self.horizontalLayout_spacerItem_combobox_frequency_profile.addSpacerItem(self.spacerItem_frequency_profile)
|
||||
self.combobox_frequency_profile = QComboBox()
|
||||
self.horizontalLayout_spacerItem_combobox_frequency_profile.addWidget(self.combobox_frequency_profile)
|
||||
|
||||
self.canvas_plot_profile = None
|
||||
|
||||
self.retranslate_acoustic_data_tab()
|
||||
|
||||
@@ -634,8 +641,8 @@ class AcousticDataTab(QWidget):
|
||||
self.groupbox_download.setTitle(_translate("CONSTANT_STRING", cs.DOWNLOAD))
|
||||
|
||||
self.groupbox_acoustic_file.setTitle(_translate("CONSTANT_STRING", cs.ACOUSTIC_FILE))
|
||||
self.label_date_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.DATE) + ":")
|
||||
self.label_hour_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.HOUR) + ":")
|
||||
self.label_date_acoustic_file.setText(_translate("CONSTANT_STRING", cs.DATE) + ":")
|
||||
self.label_hour_acoustic_file.setText(_translate("CONSTANT_STRING", cs.HOUR) + ":")
|
||||
|
||||
# self.groupbox_noise_file.setTitle(_translate("CONSTANT_STRING", cs.NOISE_FILE))
|
||||
# self.pushbutton_noise_level_with_tail_of_mean_profile.setText(_translate("CONSTANT_STRING", cs.NOISE_LEVEL))
|
||||
@@ -690,7 +697,7 @@ class AcousticDataTab(QWidget):
|
||||
|
||||
self.groupbox_display_option.setTitle(_translate("CONSTANT_STRING", cs.DISPLAY_OPTIONS))
|
||||
|
||||
self.pushbutton_plot_transect_with_BS_raw_data.setText(_translate("CONSTANT_STRING", cs.PLOT_TRANSECT))
|
||||
# self.pushbutton_plot_transect_with_BS_raw_data.setText(_translate("CONSTANT_STRING", cs.PLOT_TRANSECT))
|
||||
# self.pushbutton_plot_transect_with_SNR_data.setText(_translate("CONSTANT_STRING", cs.PLOT_SNR))
|
||||
|
||||
self.groupbox_xaxis_time.setTitle(_translate("CONSTANT_STRING", cs.PLOT_XAXIS_IN_TIME))
|
||||
@@ -728,17 +735,13 @@ class AcousticDataTab(QWidget):
|
||||
if self.combobox_ABS_system_choice.currentText() == "Aquascat 1000R":
|
||||
self.groupbox_measurement_information_Aquascat()
|
||||
self.lineEdit_acoustic_file.clear()
|
||||
self.label_date_groupbox_acoustic_file.clear()
|
||||
self.label_date_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.DATE) + ": ")
|
||||
self.label_hour_groupbox_acoustic_file.clear()
|
||||
self.label_hour_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.HOUR) + ": ")
|
||||
elif self.combobox_ABS_system_choice.currentText() == "UB-SediFlow":
|
||||
self.groupbox_measurement_information_UBSediFlow()
|
||||
self.lineEdit_acoustic_file.clear()
|
||||
self.label_date_groupbox_acoustic_file.clear()
|
||||
self.label_date_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.DATE) + ": ")
|
||||
self.label_hour_groupbox_acoustic_file.clear()
|
||||
self.label_hour_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.HOUR) + ": ")
|
||||
# self.label_date_groupbox_acoustic_file.clear()
|
||||
# self.label_date_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.DATE) + ": ")
|
||||
# self.label_hour_groupbox_acoustic_file.clear()
|
||||
# self.label_hour_groupbox_acoustic_file.setText(_translate("CONSTANT_STRING", cs.HOUR) + ": ")
|
||||
|
||||
def groupbox_measurement_information_Aquascat(self):
|
||||
# self.gridLayout_goupbox_info.itemAt(0).widget().deleteLater()
|
||||
@@ -758,17 +761,17 @@ class AcousticDataTab(QWidget):
|
||||
self.label_rx.show()
|
||||
self.label_tx.show()
|
||||
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_profiles, 1, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_profiles_per_sec, 1, 1, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_cells, 2, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_cell_size, 2, 1, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_pulse_length, 3, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_sec, 4, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_profile, 4, 1, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_freq, 5, 0, 1, 2)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_kt, 6, 0, 1, 2)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_rx, 7, 0, 1, 2)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_tx, 8, 0, 1, 2)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_profiles, 2, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_profiles_per_sec, 2, 1, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_cells, 3, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_cell_size, 3, 1, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_pulse_length, 4, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_sec, 5, 0, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_pings_per_profile, 5, 1, 1, 1)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_freq, 6, 0, 1, 2)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_kt, 7, 0, 1, 2)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_rx, 8, 0, 1, 2)
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_tx, 9, 0, 1, 2)
|
||||
|
||||
def groupbox_measurement_information_UBSediFlow(self):
|
||||
# self.gridLayout_goupbox_info.itemAt(0).widget().deleteLater()
|
||||
@@ -793,7 +796,9 @@ class AcousticDataTab(QWidget):
|
||||
|
||||
self.gridLayout_goupbox_info.addWidget(self.label_freq, 0, 0, 1, 1)
|
||||
|
||||
|
||||
def temperature(self):
|
||||
stg.temperature = float(self.lineEdit_temperature.text())
|
||||
print(f"stg.temperature : {stg.temperature}")
|
||||
|
||||
def clicked_pushbutton_noise_level(self):
|
||||
self.WindowNoiseLevelTailAveragedProfile().show()
|
||||
@@ -849,9 +854,9 @@ class AcousticDataTab(QWidget):
|
||||
else:
|
||||
self.lineEdit_acoustic_file.setText(stg.filename_BS_raw_data)
|
||||
self.lineEdit_acoustic_file.setToolTip(stg.path_BS_raw_data)
|
||||
self.label_date_groupbox_acoustic_file.setText(
|
||||
self.label_date_acoustic_file.setText(
|
||||
_translate("CONSTANT_STRING", cs.DATE) + ": " + str(stg.date))
|
||||
self.label_hour_groupbox_acoustic_file.setText(
|
||||
self.label_hour_acoustic_file.setText(
|
||||
_translate("CONSTANT_STRING", cs.HOUR) + ": " + str(stg.hour))
|
||||
self.fill_measurements_information_groupbox()
|
||||
self.plot_transect_with_BS_raw_data()
|
||||
|
||||
+1336
-528
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user