Acoustic data: Fix open study.
parent
2e20b2f464
commit
413e8fb18e
|
|
@ -733,6 +733,27 @@ class AcousticDataTab(QWidget):
|
||||||
|
|
||||||
# -------------------- Functions for Acoustic dataTab --------------------
|
# -------------------- Functions for Acoustic dataTab --------------------
|
||||||
|
|
||||||
|
def full_update(self):
|
||||||
|
logger.debug(f"{__name__}: Update")
|
||||||
|
self.blockSignals(True)
|
||||||
|
self.fileListWidget.blockSignals(True)
|
||||||
|
|
||||||
|
self.combobox_ABS_system_choice.setCurrentText(stg.ABS_name[0])
|
||||||
|
self.fileListWidget.addFilenames(stg.filename_BS_raw_data)
|
||||||
|
|
||||||
|
self.fill_measurements_information_groupbox()
|
||||||
|
self.fill_table()
|
||||||
|
self.plot_backscattered_acoustic_signal_recording()
|
||||||
|
self.plot_profile()
|
||||||
|
self.update_frequency_combobox()
|
||||||
|
self.water_attenuation()
|
||||||
|
self.compute_tmin_tmax()
|
||||||
|
self.compute_rmin_rmax()
|
||||||
|
self.set_range_for_spinboxes_bathymetry()
|
||||||
|
|
||||||
|
self.fileListWidget.blockSignals(False)
|
||||||
|
self.blockSignals(False)
|
||||||
|
|
||||||
def retranslate_acoustic_data_tab(self):
|
def retranslate_acoustic_data_tab(self):
|
||||||
|
|
||||||
self.groupbox_info.setTitle(_translate("CONSTANT_STRING", cs.MEASUREMENTS_INFORMATION))
|
self.groupbox_info.setTitle(_translate("CONSTANT_STRING", cs.MEASUREMENTS_INFORMATION))
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import logging
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from math import isinf
|
from math import isinf
|
||||||
|
|
@ -50,6 +51,7 @@ from Model.acoustic_inversion_method_high_concentration import AcousticInversion
|
||||||
|
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
class AcousticInversionTab(QWidget):
|
class AcousticInversionTab(QWidget):
|
||||||
|
|
||||||
|
|
@ -369,6 +371,14 @@ class AcousticInversionTab(QWidget):
|
||||||
# ------------------------------------ Functions for Acoustic Inversion Tab ----------------------------------------
|
# ------------------------------------ Functions for Acoustic Inversion Tab ----------------------------------------
|
||||||
# ==================================================================================================================
|
# ==================================================================================================================
|
||||||
|
|
||||||
|
def full_update(self):
|
||||||
|
logger.debug(f"{__name__}: Update")
|
||||||
|
self.blockSignals(True)
|
||||||
|
|
||||||
|
# TODO: Update all widgets
|
||||||
|
|
||||||
|
self.blockSignals(False)
|
||||||
|
|
||||||
def update_acoustic_data_choice(self):
|
def update_acoustic_data_choice(self):
|
||||||
|
|
||||||
self.combobox_acoustic_data_choice.clear()
|
self.combobox_acoustic_data_choice.clear()
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import logging
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QApplication, QWidget, QVBoxLayout, QHBoxLayout,
|
QApplication, QWidget, QVBoxLayout, QHBoxLayout,
|
||||||
QTextEdit, QPushButton, QSpacerItem, QSpinBox,
|
QTextEdit, QPushButton, QSpacerItem, QSpinBox,
|
||||||
|
|
@ -8,6 +10,8 @@ from PyQt5.QtCore import Qt
|
||||||
|
|
||||||
import settings as stg
|
import settings as stg
|
||||||
|
|
||||||
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
class NoteTab(QWidget):
|
class NoteTab(QWidget):
|
||||||
|
|
||||||
''' This class generates a enhanced notepad in Note Tab '''
|
''' This class generates a enhanced notepad in Note Tab '''
|
||||||
|
|
@ -130,6 +134,14 @@ class NoteTab(QWidget):
|
||||||
## -------------------------------
|
## -------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
def full_update(self):
|
||||||
|
logger.debug(f"{__name__}: Update")
|
||||||
|
self.blockSignals(True)
|
||||||
|
|
||||||
|
# TODO: Update all widgets
|
||||||
|
|
||||||
|
self.blockSignals(False)
|
||||||
|
|
||||||
# def new_text(self):
|
# def new_text(self):
|
||||||
# window = self.ui_mainwindow.tab5
|
# window = self.ui_mainwindow.tab5
|
||||||
# window.show()
|
# window.show()
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,17 @@ class SampleDataTab(QWidget):
|
||||||
self.groupbox_plot_PSD.setTitle(_translate("CONSTANT_STRING", cs.DISTRIBUTION_PLOT))
|
self.groupbox_plot_PSD.setTitle(_translate("CONSTANT_STRING", cs.DISTRIBUTION_PLOT))
|
||||||
|
|
||||||
|
|
||||||
|
def full_update(self):
|
||||||
|
logger.debug(f"{__name__}: Update")
|
||||||
|
self.blockSignals(True)
|
||||||
|
|
||||||
|
self.fill_comboboxes_and_plot_transect()
|
||||||
|
self.lineEdit_fine_sediment.setText(stg.filename_fine)
|
||||||
|
self.lineEdit_fine_sediment.setToolTip(stg.path_fine)
|
||||||
|
self.fill_table_fine()
|
||||||
|
|
||||||
|
self.blockSignals(False)
|
||||||
|
|
||||||
def last_opened_file_path(self, priority="sand"):
|
def last_opened_file_path(self, priority="sand"):
|
||||||
lst = []
|
lst = []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -857,6 +857,14 @@ class SedimentCalibrationTab(QWidget):
|
||||||
# ----------------------------------- Functions for Signal processing Tab --------------------------------------
|
# ----------------------------------- Functions for Signal processing Tab --------------------------------------
|
||||||
# ==============================================================================================================
|
# ==============================================================================================================
|
||||||
|
|
||||||
|
def full_update(self):
|
||||||
|
logger.debug(f"{__name__}: Update")
|
||||||
|
self.blockSignals(True)
|
||||||
|
|
||||||
|
# TODO: Update all widgets
|
||||||
|
|
||||||
|
self.blockSignals(False)
|
||||||
|
|
||||||
def function_pushbutton_update_acoustic_file(self):
|
def function_pushbutton_update_acoustic_file(self):
|
||||||
if len(stg.data_preprocessed) == 0:
|
if len(stg.data_preprocessed) == 0:
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -516,6 +516,19 @@ class SignalProcessingTab(QWidget):
|
||||||
# --------------------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------------------
|
||||||
# --------------------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def full_update(self):
|
||||||
|
logger.debug(f"{__name__}: Update")
|
||||||
|
self.blockSignals(True)
|
||||||
|
self.combobox_acoustic_data_choice.blockSignals(True)
|
||||||
|
|
||||||
|
self.combobox_acoustic_data_choice.addItems(stg.filename_BS_raw_data)
|
||||||
|
|
||||||
|
# self.recompute()
|
||||||
|
# self.replot()
|
||||||
|
|
||||||
|
self.combobox_acoustic_data_choice.blockSignals(False)
|
||||||
|
self.blockSignals(False)
|
||||||
|
|
||||||
def update_SignalPreprocessingTab(self):
|
def update_SignalPreprocessingTab(self):
|
||||||
|
|
||||||
""" The tab is updated in two cases :
|
""" The tab is updated in two cases :
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,10 @@ class UserManualTab(QWidget):
|
||||||
# self.label_picture_theory.resize(np.int(pic.width()/100), np.int(pic.height()/100))
|
# self.label_picture_theory.resize(np.int(pic.width()/100), np.int(pic.height()/100))
|
||||||
# self.verticalLayout_main.addWidget(self.label_picture_theory)
|
# self.verticalLayout_main.addWidget(self.label_picture_theory)
|
||||||
|
|
||||||
|
def full_update(self):
|
||||||
|
logger.debug(f"{__name__}: Update")
|
||||||
|
self.blockSignals(True)
|
||||||
|
|
||||||
|
# TODO: Update all widgets
|
||||||
|
|
||||||
|
self.blockSignals(False)
|
||||||
|
|
|
||||||
24
main.py
24
main.py
|
|
@ -95,6 +95,15 @@ class MainApplication(QMainWindow):
|
||||||
|
|
||||||
# self.user_manual_tab = UserManualTab(self.ui_mainwindow.tab7)
|
# self.user_manual_tab = UserManualTab(self.ui_mainwindow.tab7)
|
||||||
|
|
||||||
|
self.tabs = [
|
||||||
|
self.acoustic_data_tab,
|
||||||
|
# self.signal_processing_tab,
|
||||||
|
# self.sample_data_tab,
|
||||||
|
# self.sediment_calibration_tab,
|
||||||
|
# self.acoustic_inversion_tab,
|
||||||
|
# self.note_tab
|
||||||
|
]
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# ---------------- Text File Error -----------------
|
# ---------------- Text File Error -----------------
|
||||||
|
|
||||||
|
|
@ -108,14 +117,17 @@ class MainApplication(QMainWindow):
|
||||||
# traceback.TracebackException.from_exception(e).print(file=sortie)
|
# traceback.TracebackException.from_exception(e).print(file=sortie)
|
||||||
|
|
||||||
def open_study_update_tabs(self):
|
def open_study_update_tabs(self):
|
||||||
self.acoustic_data_tab.combobox_ABS_system_choice.setCurrentText(stg.ABS_name[0])
|
for tab in self.tabs:
|
||||||
self.acoustic_data_tab.fileListWidget.addFilenames(stg.filename_BS_raw_data)
|
tab.full_update()
|
||||||
|
|
||||||
self.signal_processing_tab.combobox_acoustic_data_choice.addItems(stg.filename_BS_raw_data)
|
# self.acoustic_data_tab.combobox_ABS_system_choice.setCurrentText(stg.ABS_name[0])
|
||||||
|
# self.acoustic_data_tab.fileListWidget.addFilenames(stg.filename_BS_raw_data)
|
||||||
|
|
||||||
self.sample_data_tab.fill_comboboxes_and_plot_transect()
|
# self.signal_processing_tab.combobox_acoustic_data_choice.addItems(stg.filename_BS_raw_data)
|
||||||
self.sample_data_tab.lineEdit_fine_sediment.setText(stg.filename_fine)
|
|
||||||
self.sample_data_tab.lineEdit_fine_sediment.setToolTip(stg.path_fine)
|
# self.sample_data_tab.fill_comboboxes_and_plot_transect()
|
||||||
|
# self.sample_data_tab.lineEdit_fine_sediment.setText(stg.filename_fine)
|
||||||
|
# self.sample_data_tab.lineEdit_fine_sediment.setToolTip(stg.path_fine)
|
||||||
# self.sample_data_tab.fill_table_fine()
|
# self.sample_data_tab.fill_table_fine()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue