Merge branch 'dev-parouby' into dev
commit
b80e0f3c8e
|
|
@ -39,7 +39,7 @@ from View.about_window import AboutWindow
|
||||||
import settings as stg
|
import settings as stg
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from subprocess import check_call, run
|
from subprocess import Popen
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
@ -275,24 +275,36 @@ class Ui_MainWindow(object):
|
||||||
cc_kt.exec()
|
cc_kt.exec()
|
||||||
|
|
||||||
def db_browser_for_sqlite(self):
|
def db_browser_for_sqlite(self):
|
||||||
check_call("/usr/bin/sqlitebrowser")
|
Popen(f"sqlitebrowser", shell=True)
|
||||||
|
|
||||||
def about_window(self):
|
def about_window(self):
|
||||||
print("about")
|
print("about")
|
||||||
aw = AboutWindow()
|
aw = AboutWindow()
|
||||||
aw.exec()
|
aw.exec()
|
||||||
|
|
||||||
|
def current_file_path(self, filename):
|
||||||
|
return os.path.abspath(
|
||||||
|
os.path.join(
|
||||||
|
os.path.dirname(__file__),
|
||||||
|
"..", filename
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
def open_doc_file(self, filename):
|
||||||
|
QtGui.QDesktopServices.openUrl(
|
||||||
|
QtCore.QUrl(
|
||||||
|
f"file://{self.current_file_path(filename)}"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def user_manual(self):
|
def user_manual(self):
|
||||||
open('AcouSed_UserManual.pdf')
|
self.open_doc_file('AcouSed_UserManual.pdf')
|
||||||
run(["open", 'AcouSed_UserManual.pdf'])
|
|
||||||
|
|
||||||
def inversion_acoustic_theory(self):
|
def inversion_acoustic_theory(self):
|
||||||
open('Acoustic_Inversion_theory.pdf')
|
self.open_doc_file('Acoustic_Inversion_theory.pdf')
|
||||||
run(["open", 'Acoustic_Inversion_theory.pdf'])
|
|
||||||
|
|
||||||
def tutorial_AQUAscat_software(self):
|
def tutorial_AQUAscat_software(self):
|
||||||
open('Tutorial_AQUAscat_software.pdf')
|
self.open_doc_file('Tutorial_AQUAscat_software.pdf')
|
||||||
run(["open", 'Tutorial_AQUAscat_software.pdf'])
|
|
||||||
|
|
||||||
def export_table_of_acoustic_BS_values_to_excel_or_libreOfficeCalc_file(self):
|
def export_table_of_acoustic_BS_values_to_excel_or_libreOfficeCalc_file(self):
|
||||||
|
|
||||||
|
|
|
||||||
11
main.py
11
main.py
|
|
@ -1,4 +1,5 @@
|
||||||
import sys
|
import sys
|
||||||
|
import logging
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QApplication, QMainWindow
|
from PyQt5.QtWidgets import QApplication, QMainWindow
|
||||||
|
|
@ -26,6 +27,13 @@ import matplotlib.pyplot as plt
|
||||||
PERCENT_SCREEN_SIZE = 0.85
|
PERCENT_SCREEN_SIZE = 0.85
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
|
logging.basicConfig(
|
||||||
|
level=logging.DEBUG,
|
||||||
|
format=('[AcouSed][%(levelname)s] %(message)s')
|
||||||
|
)
|
||||||
|
|
||||||
|
logger = logging.getLogger()
|
||||||
|
logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
class MainApplication(QMainWindow):
|
class MainApplication(QMainWindow):
|
||||||
|
|
||||||
|
|
@ -90,6 +98,9 @@ class MainApplication(QMainWindow):
|
||||||
# ---------------- Text File Error -----------------
|
# ---------------- Text File Error -----------------
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.error(str(e))
|
||||||
|
logger.error(traceback.format_exc())
|
||||||
|
|
||||||
with open("Error_file.txt", "w", encoding="utf-8") as sortie:
|
with open("Error_file.txt", "w", encoding="utf-8") as sortie:
|
||||||
sortie.write(str(e))
|
sortie.write(str(e))
|
||||||
sortie.write(traceback.format_exc())
|
sortie.write(traceback.format_exc())
|
||||||
|
|
|
||||||
|
|
@ -210,4 +210,4 @@ user-defined extensions).")
|
||||||
"python-scipy" "python-scikit-learn"
|
"python-scipy" "python-scikit-learn"
|
||||||
"python-pyqt@5" "python-pyqt5-sip"
|
"python-pyqt@5" "python-pyqt5-sip"
|
||||||
"python-numpy@1" "python-pandas@1.5"
|
"python-numpy@1" "python-pandas@1.5"
|
||||||
"python-matplotlib"))))
|
"python-matplotlib" "python-odfpy"))))
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
matplotlib==3.6.3
|
||||||
|
numpy==1.23.5
|
||||||
|
pandas==1.5.3
|
||||||
|
PyQt5==5.15.9
|
||||||
|
PyQt5-Qt5==5.15.2
|
||||||
|
PyQt5-sip==12.11.0
|
||||||
|
python-dateutil==2.8.2
|
||||||
|
scikit-learn==1.2.1
|
||||||
|
scipy==1.10.0
|
||||||
|
pyqt-file-list-widget==0.0.1
|
||||||
|
qtrangeslider==0.1.5
|
||||||
|
astropy==6.1.7
|
||||||
|
odfpy==1.4.1
|
||||||
Loading…
Reference in New Issue