Acoused: Use a specific logger.
parent
64230540c7
commit
99ff7c5fed
|
|
@ -32,7 +32,7 @@ from PyQt5.QtWidgets import QFileDialog, QApplication, QMessageBox
|
||||||
import settings as stg
|
import settings as stg
|
||||||
from settings import ABS_name
|
from settings import ABS_name
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
class CreateTableForSaveAs:
|
class CreateTableForSaveAs:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ from settings import BS_raw_data, acoustic_data
|
||||||
from View.acoustic_data_tab import AcousticDataTab
|
from View.acoustic_data_tab import AcousticDataTab
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
class ReadTableForOpen:
|
class ReadTableForOpen:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ locale.setlocale(locale.LC_ALL, '')
|
||||||
|
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
class AcousticDataTab(QWidget):
|
class AcousticDataTab(QWidget):
|
||||||
COMPTEUR = 1
|
COMPTEUR = 1
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ import settings as stg
|
||||||
|
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
class SampleDataTab(QWidget):
|
class SampleDataTab(QWidget):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ import settings as stg
|
||||||
from View.checkable_combobox import CheckableComboBox
|
from View.checkable_combobox import CheckableComboBox
|
||||||
from Model.acoustic_inversion_method_high_concentration import AcousticInversionMethodHighConcentration
|
from Model.acoustic_inversion_method_high_concentration import AcousticInversionMethodHighConcentration
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
class SedimentCalibrationTab(QWidget):
|
class SedimentCalibrationTab(QWidget):
|
||||||
|
|
||||||
|
|
@ -2762,4 +2762,3 @@ class SedimentCalibrationTab(QWidget):
|
||||||
self.lineEdit_slider_FCB.setText(
|
self.lineEdit_slider_FCB.setText(
|
||||||
str(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
str(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
||||||
self.combobox_frequency_FCB.currentIndex(), self.slider_FCB.value()-1]))
|
self.combobox_frequency_FCB.currentIndex(), self.slider_FCB.value()-1]))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
from cProfile import label
|
from cProfile import label
|
||||||
|
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
|
|
@ -55,6 +57,8 @@ import settings as stg
|
||||||
|
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
|
logger = logging.getLogger("acoused")
|
||||||
|
|
||||||
|
|
||||||
class SignalProcessingTab(QWidget):
|
class SignalProcessingTab(QWidget):
|
||||||
|
|
||||||
|
|
@ -502,40 +506,41 @@ class SignalProcessingTab(QWidget):
|
||||||
of data to be processed is updated,
|
of data to be processed is updated,
|
||||||
- the user change the limits of one or all the records in the first tab (Acoustic data) """
|
- 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:
|
if len(stg.filename_BS_raw_data) == 0:
|
||||||
|
|
||||||
msgBox = QMessageBox()
|
msgBox = QMessageBox()
|
||||||
msgBox.setWindowTitle("Compute noise from profile tail error")
|
msgBox.setWindowTitle("Compute noise from profile tail error")
|
||||||
msgBox.setIcon(QMessageBox.Warning)
|
msgBox.setIcon(QMessageBox.Warning)
|
||||||
msgBox.setText("Download acoustic data in previous tab before updating data")
|
msgBox.setText("Download acoustic data in previous tab before updating data")
|
||||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
msgBox.exec()
|
msgBox.exec()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
data_id = self.combobox_acoustic_data_choice.currentIndex()
|
||||||
|
|
||||||
self.combobox_acoustic_data_choice.blockSignals(True)
|
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.clear()
|
||||||
self.combobox_acoustic_data_choice.addItems(stg.filename_BS_raw_data)
|
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_download_noise_file.setChecked(True)
|
||||||
self.groupbox_compute_noise_from_profile_tail.setChecked(False)
|
self.groupbox_compute_noise_from_profile_tail.setChecked(False)
|
||||||
self.groupbox_download_noise_file_toggle()
|
self.groupbox_download_noise_file_toggle()
|
||||||
|
elif stg.noise_method[data_id] == 1:
|
||||||
elif stg.noise_method[self.combobox_acoustic_data_choice.currentIndex()] == 1:
|
|
||||||
|
|
||||||
self.groupbox_download_noise_file.setChecked(False)
|
self.groupbox_download_noise_file.setChecked(False)
|
||||||
self.groupbox_compute_noise_from_profile_tail.setChecked(True)
|
self.groupbox_compute_noise_from_profile_tail.setChecked(True)
|
||||||
self.groupbox_option_profile_tail_toggle()
|
self.groupbox_option_profile_tail_toggle()
|
||||||
|
|
||||||
self.combobox_freq_noise_from_profile_tail.clear()
|
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_freq_noise_from_profile_tail.addItems(
|
||||||
|
stg.freq_text[data_id]
|
||||||
self.combobox_acoustic_data_choice.currentIndexChanged.connect(self.combobox_acoustic_data_choice_change_index)
|
)
|
||||||
|
|
||||||
self.compute_average_profile_tail()
|
self.compute_average_profile_tail()
|
||||||
self.plot_averaged_profile_tail()
|
self.plot_averaged_profile_tail()
|
||||||
|
|
||||||
|
logger.debug("Update the Signal preprocessing tab... Done")
|
||||||
|
|
||||||
self.combobox_acoustic_data_choice.blockSignals(False)
|
self.combobox_acoustic_data_choice.blockSignals(False)
|
||||||
|
|
||||||
def activate_list_of_pre_processed_data(self):
|
def activate_list_of_pre_processed_data(self):
|
||||||
|
|
|
||||||
8
main.py
8
main.py
|
|
@ -28,13 +28,13 @@ PERCENT_SCREEN_SIZE = 0.85
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level=logging.DEBUG,
|
level=logging.INFO,
|
||||||
format=('[AcouSed][%(levelname)s] %(message)s')
|
format=('[AcouSed][%(levelname)s] %(message)s')
|
||||||
)
|
)
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger("acoused")
|
||||||
# logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
logger.setLevel(logging.INFO)
|
#logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
class MainApplication(QMainWindow):
|
class MainApplication(QMainWindow):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue