Acoused: Use a specific logger.

dev-brahim
Pierre-Antoine 2025-03-19 14:12:35 +01:00
parent 64230540c7
commit 99ff7c5fed
7 changed files with 24 additions and 20 deletions

View File

@ -32,7 +32,7 @@ from PyQt5.QtWidgets import QFileDialog, QApplication, QMessageBox
import settings as stg
from settings import ABS_name
logger = logging.getLogger()
logger = logging.getLogger("acoused")
class CreateTableForSaveAs:

View File

@ -34,7 +34,7 @@ from settings import BS_raw_data, acoustic_data
from View.acoustic_data_tab import AcousticDataTab
logger = logging.getLogger()
logger = logging.getLogger("acoused")
class ReadTableForOpen:

View File

@ -64,7 +64,7 @@ locale.setlocale(locale.LC_ALL, '')
_translate = QCoreApplication.translate
logger = logging.getLogger()
logger = logging.getLogger("acoused")
class AcousticDataTab(QWidget):
COMPTEUR = 1

View File

@ -50,7 +50,7 @@ import settings as stg
_translate = QCoreApplication.translate
logger = logging.getLogger()
logger = logging.getLogger("acoused")
class SampleDataTab(QWidget):

View File

@ -48,7 +48,7 @@ import settings as stg
from View.checkable_combobox import CheckableComboBox
from Model.acoustic_inversion_method_high_concentration import AcousticInversionMethodHighConcentration
logger = logging.getLogger()
logger = logging.getLogger("acoused")
class SedimentCalibrationTab(QWidget):
@ -2762,4 +2762,3 @@ 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

@ -20,6 +20,8 @@
# -*- coding: utf-8 -*-
import logging
from cProfile import label
from PyQt5.QtWidgets import (
@ -55,6 +57,8 @@ import settings as stg
_translate = QCoreApplication.translate
logger = logging.getLogger("acoused")
class SignalProcessingTab(QWidget):
@ -502,40 +506,41 @@ class SignalProcessingTab(QWidget):
of data to be processed is updated,
- the user change the limits of one or all the records in the first tab (Acoustic data) """
if len(stg.filename_BS_raw_data) == 0:
msgBox = QMessageBox()
msgBox.setWindowTitle("Compute noise from profile tail error")
msgBox.setIcon(QMessageBox.Warning)
msgBox.setText("Download acoustic data in previous tab before updating data")
msgBox.setStandardButtons(QMessageBox.Ok)
msgBox.exec()
else:
data_id = self.combobox_acoustic_data_choice.currentIndex()
self.combobox_acoustic_data_choice.blockSignals(True)
logger.debug("Update the Signal preprocessing tab...")
self.combobox_acoustic_data_choice.clear()
self.combobox_acoustic_data_choice.addItems(stg.filename_BS_raw_data)
if stg.noise_method[self.combobox_acoustic_data_choice.currentIndex()] == 0:
if stg.noise_method[data_id] == 0:
self.groupbox_download_noise_file.setChecked(True)
self.groupbox_compute_noise_from_profile_tail.setChecked(False)
self.groupbox_download_noise_file_toggle()
elif stg.noise_method[self.combobox_acoustic_data_choice.currentIndex()] == 1:
elif stg.noise_method[data_id] == 1:
self.groupbox_download_noise_file.setChecked(False)
self.groupbox_compute_noise_from_profile_tail.setChecked(True)
self.groupbox_option_profile_tail_toggle()
self.combobox_freq_noise_from_profile_tail.clear()
self.combobox_freq_noise_from_profile_tail.addItems(stg.freq_text[self.combobox_acoustic_data_choice.currentIndex()])
self.combobox_acoustic_data_choice.currentIndexChanged.connect(self.combobox_acoustic_data_choice_change_index)
self.combobox_freq_noise_from_profile_tail.addItems(
stg.freq_text[data_id]
)
self.compute_average_profile_tail()
self.plot_averaged_profile_tail()
logger.debug("Update the Signal preprocessing tab... Done")
self.combobox_acoustic_data_choice.blockSignals(False)
def activate_list_of_pre_processed_data(self):

View File

@ -28,13 +28,13 @@ PERCENT_SCREEN_SIZE = 0.85
_translate = QCoreApplication.translate
logging.basicConfig(
level=logging.DEBUG,
level=logging.INFO,
format=('[AcouSed][%(levelname)s] %(message)s')
)
logger = logging.getLogger()
# logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)
logger = logging.getLogger("acoused")
logger.setLevel(logging.DEBUG)
#logger.setLevel(logging.INFO)
class MainApplication(QMainWindow):