Compare commits
No commits in common. "817be645586fd4312faae9689f576a3362ac221a" and "a6e81b332987f8d8764c4fe9a1fe0ee67d3a02fd" have entirely different histories.
817be64558
...
a6e81b3329
|
|
@ -21,17 +21,18 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (QWidget, QVBoxLayout, QDialog, QTabWidget, QGridLayout, QScrollArea,
|
||||||
QWidget, QVBoxLayout, QDialog, QTabWidget, QGridLayout,
|
QFileDialog, QMessageBox, QLabel)
|
||||||
QScrollArea, QFileDialog, QMessageBox, QLabel
|
|
||||||
)
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
|
|
||||||
class CalibrationConstantKt(QDialog):
|
class CalibrationConstantKt(QDialog):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
|
|
||||||
super(CalibrationConstantKt, self).__init__(parent)
|
super(CalibrationConstantKt, self).__init__(parent)
|
||||||
|
|
||||||
self.setGeometry(400, 200, 300, 400)
|
self.setGeometry(400, 200, 300, 400)
|
||||||
|
|
||||||
self.setWindowTitle("Calibration constant kt")
|
self.setWindowTitle("Calibration constant kt")
|
||||||
|
|
||||||
self.verticalLayout_Main = QVBoxLayout()
|
self.verticalLayout_Main = QVBoxLayout()
|
||||||
|
|
@ -40,18 +41,15 @@ class CalibrationConstantKt(QDialog):
|
||||||
self.verticalLayout_Main.addWidget(self.tab)
|
self.verticalLayout_Main.addWidget(self.tab)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.data_ABS = pd.read_excel(
|
self.data_ABS = pd.read_excel("ABS_calibration_constant_kt.xlsx", header=0, sheet_name=None)
|
||||||
"ABS_calibration_constant_kt.xlsx",
|
|
||||||
header=0, sheet_name=None
|
|
||||||
)
|
|
||||||
except FileNotFoundError as e:
|
except FileNotFoundError as e:
|
||||||
|
|
||||||
msgBox = QMessageBox()
|
msgBox = QMessageBox()
|
||||||
msgBox.setWindowTitle("File Not Found Error")
|
msgBox.setWindowTitle("File Not Found Error")
|
||||||
msgBox.setIcon(QMessageBox.Warning)
|
msgBox.setIcon(QMessageBox.Warning)
|
||||||
msgBox.setText(
|
msgBox.setText("Please check Excel file name for the calibration constant kt \n"
|
||||||
"Please check Excel file name for the calibration constant kt \n"
|
"It should be an excel file named : 'ABS_calibration_constant_kt.xlsx'")
|
||||||
"It should be an excel file named : 'ABS_calibration_constant_kt.xlsx'"
|
|
||||||
)
|
|
||||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
msgBox.exec()
|
msgBox.exec()
|
||||||
|
|
||||||
|
|
@ -59,11 +57,9 @@ class CalibrationConstantKt(QDialog):
|
||||||
self.load_freq_and_kt_values()
|
self.load_freq_and_kt_values()
|
||||||
|
|
||||||
def open_dialog_box(self):
|
def open_dialog_box(self):
|
||||||
filename = QFileDialog.getOpenFileNames(
|
filename = QFileDialog.getOpenFileNames(self, "Calibration file", "", "Calibration file (*.xlsx)",
|
||||||
self, "Calibration file", "", "Calibration file (*.xlsx)",
|
options=QFileDialog.DontUseNativeDialog)
|
||||||
options=QFileDialog.DontUseNativeDialog
|
print(filename)
|
||||||
)
|
|
||||||
|
|
||||||
dir_name = os.path.dirname(filename[0][0])
|
dir_name = os.path.dirname(filename[0][0])
|
||||||
file_name = os.path.basename(filename[0][0])
|
file_name = os.path.basename(filename[0][0])
|
||||||
print(f"dir name : {dir_name} & file name : {file_name}")
|
print(f"dir name : {dir_name} & file name : {file_name}")
|
||||||
|
|
@ -75,58 +71,43 @@ class CalibrationConstantKt(QDialog):
|
||||||
self.load_freq_and_kt_values()
|
self.load_freq_and_kt_values()
|
||||||
|
|
||||||
def load_freq_and_kt_values(self):
|
def load_freq_and_kt_values(self):
|
||||||
|
|
||||||
for t in range(len(self.data_ABS.keys())):
|
for t in range(len(self.data_ABS.keys())):
|
||||||
self.tab.removeTab(t)
|
self.tab.removeTab(t)
|
||||||
|
|
||||||
for t_index, t_value in enumerate(list(self.data_ABS.keys())):
|
for t_index, t_value in enumerate(list(self.data_ABS.keys())):
|
||||||
tab_calib = QWidget()
|
|
||||||
self.tab.addTab(tab_calib, t_value)
|
|
||||||
|
|
||||||
verticalLayout = QVBoxLayout(tab_calib)
|
exec("self.tab_calib_" + str(t_index) + "= QWidget()")
|
||||||
|
eval("self.tab.addTab(self.tab_calib_" + str(t_index) + ", '" + str(t_value) + "')")
|
||||||
|
|
||||||
scrollarea = QScrollArea(tab_calib)
|
exec("self.verticalLayout_tab_" + str(t_index) + "= QVBoxLayout(self.tab_calib_" + str(t_index) + ")")
|
||||||
scrollarea.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
|
||||||
scrollarea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
|
||||||
scrollarea.setWidgetResizable(True)
|
|
||||||
|
|
||||||
verticalLayout.addWidget(scrollarea)
|
exec("self.scrollarea_tab_" + str(t_index) + " = QScrollArea(self.tab_calib_" + str(t_index) + ")")
|
||||||
gridLayout = QGridLayout(scrollarea)
|
eval("self.scrollarea_tab_" + str(t_index) + ".setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)")
|
||||||
|
eval("self.scrollarea_tab_" + str(t_index) + ".setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)")
|
||||||
|
eval("self.scrollarea_tab_" + str(t_index) + ".setWidgetResizable(True)")
|
||||||
|
|
||||||
|
eval("self.verticalLayout_tab_" + str(t_index) + ".addWidget(self.scrollarea_tab_" + str(t_index) + ")")
|
||||||
|
|
||||||
|
exec("self.gridLayout_tab_" + str(t_index) + " = QGridLayout(self.scrollarea_tab_" + str(t_index) + ")")
|
||||||
if [*self.data_ABS.values()][t_index].columns.any():
|
if [*self.data_ABS.values()][t_index].columns.any():
|
||||||
label_freq = QLabel(
|
exec("self.label_freq_" + str(t_index) + " = QLabel('" + str([*self.data_ABS.values()][t_index].columns[0]) + " (MHz)')")
|
||||||
f"{[*self.data_ABS.values()][t_index].columns[0]} (MHz)"
|
exec("self.label_kt_" + str(t_index) + " = QLabel('" + str([*self.data_ABS.values()][t_index].columns[1]) + " (V.m<sup>1.5</sup>)')")
|
||||||
)
|
|
||||||
label_kt = QLabel(
|
|
||||||
f"{[*self.data_ABS.values()][t_index].columns[1]} "
|
|
||||||
+ "(V.m<sup>1.5</sup>)"
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
label_freq = QLabel('Frequency (MHz)')
|
exec("self.label_freq_" + str(t_index) + " = QLabel('Frequency (MHz)')")
|
||||||
label_kt = QLabel('kt (V.m<sup>1.5</sup>)')
|
exec("self.label_kt_" + str(t_index) + " = QLabel('kt (V.m<sup>1.5</sup>)')")
|
||||||
|
eval("self.gridLayout_tab_" + str(t_index) + ".addWidget(self.label_freq_" + str(t_index) + ", 0, 0, 1, 1, Qt.AlignCenter)")
|
||||||
gridLayout.addWidget(
|
eval("self.gridLayout_tab_" + str(t_index) + ".addWidget(self.label_kt_" + str(t_index) + ", 0, 1, 1, 1, Qt.AlignCenter)")
|
||||||
label_freq, 0, 0, 1, 1, Qt.AlignCenter
|
|
||||||
)
|
|
||||||
gridLayout.addWidget(
|
|
||||||
label_kt, 0, 1, 1, 1, Qt.AlignCenter
|
|
||||||
)
|
|
||||||
|
|
||||||
for x in range(self.data_ABS[t_value].shape[0]):
|
for x in range(self.data_ABS[t_value].shape[0]):
|
||||||
label_freq_ABS = QLabel()
|
exec("self.label_freq_" + str(x) + "_ABS_" + str(t_index) + " = QLabel()")
|
||||||
|
# print(eval("self.label_freq_" + str(x) + "_ABS_" + str(t_index) + ".setText('" + str(self.data_ABS[t_value].iloc[x][0]*1e-6) + " MHz')"))
|
||||||
label_freq_ABS.setText(
|
eval("self.label_freq_" + str(x) + "_ABS_" + str(t_index) + ".setText('" + str(self.data_ABS[t_value].iloc[x][0]*1e-6) + " (MHz)')")
|
||||||
f"{self.data_ABS[t_value].iloc[x][0]*1e-6}" + "(MHz)"
|
# eval("self.label_freq_" + str(x) + "_ABS_" + str(t_index) + ".setDisabled(True)")
|
||||||
)
|
eval("self.gridLayout_tab_" + str(t_index) + ".addWidget(self.label_freq_" + str(x) + "_ABS_" + str(t_index) +
|
||||||
gridLayout.addWidget(
|
", " + str(x + 1) + ", 0, 1, 1,Qt.AlignCenter)")
|
||||||
label_freq_ABS, x + 1, 0, 1, 1,Qt.AlignCenter
|
exec("self.label_kt_" + str(x) + "_ABS_" + str(t_index) + " = QLabel()")
|
||||||
)
|
exec("self.label_kt_" + str(x) + "_ABS_" + str(t_index) + ".setText('" + str(self.data_ABS[t_value].iloc[x][1]) + "V.m<sup>1.5</sup>')")
|
||||||
|
eval("self.label_kt_" + str(x) + "_ABS_" + str(t_index) + ".setStyleSheet('border: 1px solid black;')")
|
||||||
label_kt_ABS = QLabel()
|
eval("self.gridLayout_tab_" + str(t_index) + ".addWidget(self.label_kt_" + str(x) + "_ABS_" + str(t_index) +
|
||||||
|
", " + str(x+1) + ", 1, 1, 1, Qt.AlignCenter)")
|
||||||
label_kt_ABS.setText(
|
|
||||||
f"{self.data_ABS[t_value].iloc[x][1]} V.m<sup>1.5</sup>"
|
|
||||||
)
|
|
||||||
label_kt_ABS.setStyleSheet('border: 1px solid black;')
|
|
||||||
gridLayout.addWidget(
|
|
||||||
label_kt_ABS, x + 1 , 1, 1, 1, Qt.AlignCenter
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -27,24 +27,20 @@ import os
|
||||||
|
|
||||||
|
|
||||||
class Logos():
|
class Logos():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
def path_logo(icon):
|
self.logo_AcouSed = os.path.join('logos', "AcouSed.png")
|
||||||
return os.path.join(
|
|
||||||
os.path.dirname(__file__), "..", "logos", icon
|
|
||||||
)
|
|
||||||
|
|
||||||
self.logo_AcouSed = path_logo("AcouSed.png")
|
self.logo_INRAE = os.path.join('logos', "BlocMarque-INRAE-Inter.jpg")
|
||||||
|
|
||||||
self.logo_INRAE = path_logo("BlocMarque-INRAE-Inter.jpg")
|
self.logo_OSR = os.path.join('logos', "OSR.png")
|
||||||
|
self.logo_europe = os.path.join('logos', "Europe.png")
|
||||||
|
self.logo_saone_rhone = os.path.join('logos', "plan_Rhone_Saone.png")
|
||||||
|
self.logo_carnot = os.path.join('logos', "Carnot_EE.png")
|
||||||
|
|
||||||
self.logo_OSR = path_logo("OSR.png")
|
self.logo_CNR = os.path.join('logos', "CNR.png")
|
||||||
self.logo_europe = path_logo("Europe.png")
|
self.logo_EDF = os.path.join('logos', "EDF.png")
|
||||||
self.logo_saone_rhone = path_logo("plan_Rhone_Saone.png")
|
self.logo_Ubertone = os.path.join('logos', "Ubertone.jpg")
|
||||||
self.logo_carnot = path_logo("Carnot_EE.png")
|
|
||||||
|
|
||||||
self.logo_CNR = path_logo("CNR.png")
|
|
||||||
self.logo_EDF = path_logo("EDF.png")
|
|
||||||
self.logo_Ubertone = path_logo("Ubertone.jpg")
|
|
||||||
|
|
||||||
logos_inst = Logos()
|
logos_inst = Logos()
|
||||||
|
|
||||||
|
|
@ -295,7 +291,7 @@ class Authors(QDialog):
|
||||||
self.gridLayout.addWidget(self.label_brahim, 4, 0, 1, 1)
|
self.gridLayout.addWidget(self.label_brahim, 4, 0, 1, 1)
|
||||||
|
|
||||||
self.label_PA = QLabel()
|
self.label_PA = QLabel()
|
||||||
self.label_PA.setText("TECC company (< a href = https://parouby.fr/ > https://parouby.fr/ </a>) was involved in 2025 to debugging the program.")
|
self.label_PA.setText("TECC company (< a href = https://parouby.fr/ > https://parouby.fr/ </a>) was involved in 2025 to improve program architecture.")
|
||||||
self.gridLayout.addWidget(self.label_PA, 5, 0, 1, 1)
|
self.gridLayout.addWidget(self.label_PA, 5, 0, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -718,7 +718,7 @@ class AcousticDataTab(QWidget):
|
||||||
def _setup_icons(self):
|
def _setup_icons(self):
|
||||||
def path_icon(icon):
|
def path_icon(icon):
|
||||||
return os.path.join(
|
return os.path.join(
|
||||||
os.path.dirname(__file__), "..", "icons", icon
|
"icons", icon
|
||||||
)
|
)
|
||||||
|
|
||||||
self.icon_folder = QIcon(path_icon("folder.png"))
|
self.icon_folder = QIcon(path_icon("folder.png"))
|
||||||
|
|
|
||||||
|
|
@ -69,9 +69,7 @@ class AcousticInversionTab(QWidget):
|
||||||
self._setup_connections()
|
self._setup_connections()
|
||||||
|
|
||||||
def _path_icon(self, icon):
|
def _path_icon(self, icon):
|
||||||
return os.path.join(
|
return os.path.join("icons", icon)
|
||||||
os.path.dirname(__file__), "..", "icons", icon
|
|
||||||
)
|
|
||||||
|
|
||||||
def _setup_icons(self):
|
def _setup_icons(self):
|
||||||
self.icon_folder = QIcon(self._path_icon("folder.png"))
|
self.icon_folder = QIcon(self._path_icon("folder.png"))
|
||||||
|
|
|
||||||
|
|
@ -132,33 +132,28 @@ class Ui_MainWindow(object):
|
||||||
self.toolBar.setObjectName("toolBar")
|
self.toolBar.setObjectName("toolBar")
|
||||||
self.mainwindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
|
self.mainwindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
|
||||||
|
|
||||||
def path_icon(icon):
|
|
||||||
return os.path.join(
|
|
||||||
os.path.dirname(__file__), "..", "icons", icon
|
|
||||||
)
|
|
||||||
|
|
||||||
self.actionOpen = QtWidgets.QAction(self.mainwindow)
|
self.actionOpen = QtWidgets.QAction(self.mainwindow)
|
||||||
icon1 = QtGui.QIcon()
|
icon1 = QtGui.QIcon()
|
||||||
icon1.addPixmap(QtGui.QPixmap(path_icon("icon_folder.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon1.addPixmap(QtGui.QPixmap("icons/icon_folder.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.actionOpen.setIcon(icon1)
|
self.actionOpen.setIcon(icon1)
|
||||||
self.actionOpen.setObjectName("actionOpen")
|
self.actionOpen.setObjectName("actionOpen")
|
||||||
|
|
||||||
self.actionSave = QtWidgets.QAction(self.mainwindow)
|
self.actionSave = QtWidgets.QAction(self.mainwindow)
|
||||||
icon2 = QtGui.QIcon()
|
icon2 = QtGui.QIcon()
|
||||||
icon2.addPixmap(QtGui.QPixmap(path_icon("save.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon2.addPixmap(QtGui.QPixmap("icons/save.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.actionSave.setIcon(icon2)
|
self.actionSave.setIcon(icon2)
|
||||||
self.actionSave.setObjectName("actionSave")
|
self.actionSave.setObjectName("actionSave")
|
||||||
|
|
||||||
self.actionEnglish = QtWidgets.QAction(self.mainwindow)
|
self.actionEnglish = QtWidgets.QAction(self.mainwindow)
|
||||||
icon6 = QtGui.QIcon()
|
icon6 = QtGui.QIcon()
|
||||||
icon6.addPixmap(QtGui.QPixmap(path_icon("en.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon6.addPixmap(QtGui.QPixmap("icons/en.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.actionEnglish.setIcon(icon6)
|
self.actionEnglish.setIcon(icon6)
|
||||||
self.actionEnglish.setObjectName("actionEnglish")
|
self.actionEnglish.setObjectName("actionEnglish")
|
||||||
self.actionEnglish.setEnabled(False)
|
self.actionEnglish.setEnabled(False)
|
||||||
|
|
||||||
self.actionFrench = QtWidgets.QAction(self.mainwindow)
|
self.actionFrench = QtWidgets.QAction(self.mainwindow)
|
||||||
icon7 = QtGui.QIcon()
|
icon7 = QtGui.QIcon()
|
||||||
icon7.addPixmap(QtGui.QPixmap(path_icon("fr.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon7.addPixmap(QtGui.QPixmap("icons/fr.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.actionFrench.setIcon(icon7)
|
self.actionFrench.setIcon(icon7)
|
||||||
self.actionFrench.setObjectName("actionFrench")
|
self.actionFrench.setObjectName("actionFrench")
|
||||||
self.actionFrench.setEnabled(False)
|
self.actionFrench.setEnabled(False)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
|
|
||||||
from PyQt5.QtGui import QIcon, QPixmap
|
from PyQt5.QtGui import QIcon, QPixmap
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (QWidget, QLabel, QHBoxLayout, QVBoxLayout, QApplication, QMainWindow, QGridLayout,
|
||||||
QWidget, QLabel, QHBoxLayout, QVBoxLayout, QApplication,
|
QDialog, QFrame, QTabWidget, QScrollArea)
|
||||||
QMainWindow, QGridLayout, QDialog, QFrame, QTabWidget,
|
|
||||||
QScrollArea
|
|
||||||
)
|
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
@ -17,7 +14,9 @@ import settings as stg
|
||||||
|
|
||||||
|
|
||||||
class PlotNoiseWindow(QDialog):
|
class PlotNoiseWindow(QDialog):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
|
|
||||||
super(PlotNoiseWindow, self).__init__(parent)
|
super(PlotNoiseWindow, self).__init__(parent)
|
||||||
|
|
||||||
self.setGeometry(400, 200, 700, 500)
|
self.setGeometry(400, 200, 700, 500)
|
||||||
|
|
@ -30,60 +29,65 @@ class PlotNoiseWindow(QDialog):
|
||||||
self.tab = QTabWidget()
|
self.tab = QTabWidget()
|
||||||
self.verticalLayout_Main.addWidget(self.tab)
|
self.verticalLayout_Main.addWidget(self.tab)
|
||||||
|
|
||||||
self.tabs = []
|
|
||||||
|
|
||||||
for i in range(len(stg.filename_BS_raw_data)):
|
for i in range(len(stg.filename_BS_raw_data)):
|
||||||
self.tabs.append(QWidget())
|
|
||||||
|
|
||||||
self.tab.addTab(self.tabs[i], stg.filename_BS_raw_data[i])
|
exec("self.tab" + str(i) + "= QWidget()")
|
||||||
|
exec("self.tab.addTab(self.tab" + str(i) + ", stg.filename_BS_raw_data[" + str(i) + "])")
|
||||||
|
|
||||||
verticalLayout = QVBoxLayout()
|
exec("self.verticalLayout_tab" + str(i) + "= QVBoxLayout()")
|
||||||
self.tabs[i].setLayout(verticalLayout)
|
exec("self.tab" + str(i) + ".setLayout(self.verticalLayout_tab" + str(i) + ")")
|
||||||
|
|
||||||
fig, ax = plt.subplots(
|
exec("self.fig" + str(i) + ", self.ax" + str(i) +
|
||||||
nrows=stg.freq[i].shape[0], ncols=1, layout='constrained'
|
"= plt.subplots(nrows=stg.freq[" + str(i) + "].shape[0], ncols=1, layout='constrained')")
|
||||||
)
|
|
||||||
|
|
||||||
if stg.BS_noise_raw_data[i].shape != (0,):
|
if stg.BS_noise_raw_data[i].shape != (0,):
|
||||||
|
|
||||||
for freq_ind, freq_val in enumerate(stg.freq[i]):
|
for freq_ind, freq_val in enumerate(stg.freq[i]):
|
||||||
ax[freq_ind].cla()
|
|
||||||
|
eval("self.ax" + str(i) + "[" + str(freq_ind) + "]" + ".cla()")
|
||||||
|
|
||||||
val_min = np.nanmin(stg.BS_noise_raw_data[i][freq_ind, :, :])
|
val_min = np.nanmin(stg.BS_noise_raw_data[i][freq_ind, :, :])
|
||||||
val_max = np.nanmax(stg.BS_noise_raw_data[i][freq_ind, :, :])
|
val_max = np.nanmax(stg.BS_noise_raw_data[i][freq_ind, :, :])
|
||||||
|
|
||||||
if val_min != val_max:
|
if val_min == val_max:
|
||||||
|
exec("pcm = self.ax" + str(i) + "[" + str(freq_ind) + "]" + ".pcolormesh(" +
|
||||||
|
"stg.time_noise[" + str(i) + "][" + str(freq_ind) + ", :]," +
|
||||||
|
"-stg.depth_noise[" + str(i) + "][" + str(freq_ind) + ", :]," +
|
||||||
|
"stg.BS_noise_raw_data[" + str(i) + "][" + str(freq_ind) + ", :, :]," +
|
||||||
|
"cmap='hsv')")
|
||||||
|
else:
|
||||||
val_min = 0
|
val_min = 0
|
||||||
val_max = 1e-5
|
val_max = 1e-5
|
||||||
|
exec("pcm = self.ax" + str(i) + "[" + str(freq_ind) + "]" + ".pcolormesh(" +
|
||||||
|
"stg.time_noise[" + str(i) + "][" + str(freq_ind) + ", :]," +
|
||||||
|
"-stg.depth_noise[" + str(i) + "][" + str(freq_ind) + ", :]," +
|
||||||
|
"stg.BS_noise_raw_data[" + str(i) + "][" + str(freq_ind) + ", :, :]," +
|
||||||
|
"cmap='hsv')")
|
||||||
|
|
||||||
pcm = ax[freq_ind].pcolormesh(
|
eval("self.ax" + str(i) + "[" + str(freq_ind) + "]" + ".text(1, .70, stg.freq_text[" + str(i) +
|
||||||
stg.time_noise[i][freq_ind, :],
|
"][" + str(freq_ind) + "]," +
|
||||||
-stg.depth_noise[i][freq_ind, :],
|
"fontsize=10, fontweight='bold', fontname='DejaVu Sans', c='black', alpha=0.5," +
|
||||||
stg.BS_noise_raw_data[i][freq_ind, :, :],
|
"horizontalalignment='right', verticalalignment='bottom'," +
|
||||||
cmap='hsv'
|
"transform=self.ax" + str(i) + "[" + str(freq_ind) + "].transAxes)")
|
||||||
)
|
|
||||||
|
|
||||||
ax[freq_ind].text(
|
exec("self.fig" + str(i) + ".supxlabel('Time (sec)', fontsize=10)")
|
||||||
1, .70, stg.freq_text[i][freq_ind],
|
exec("self.fig" + str(i) + ".supylabel('Depth (m)', fontsize=10)")
|
||||||
fontsize=10, fontweight='bold',
|
|
||||||
fontname='DejaVu Sans', c='black', alpha=0.5,
|
|
||||||
horizontalalignment='right', verticalalignment='bottom',
|
|
||||||
transform=ax[freq_ind].transAxes
|
|
||||||
)
|
|
||||||
|
|
||||||
fig.supxlabel('Time (sec)', fontsize=10)
|
exec("cbar = self.fig" + str(i) + ".colorbar(pcm, ax=self.ax" + str(i) + "[:] ," +
|
||||||
fig.supylabel('Depth (m)', fontsize=10)
|
"shrink=1, location='right')")
|
||||||
|
eval("cbar.set_label(label='Noise signal (V)', rotation=270, labelpad=8)")
|
||||||
|
|
||||||
cbar = fig.colorbar(
|
exec("self.fig" + str(i) + ".canvas.draw_idle()")
|
||||||
pcm, ax=ax[:], shrink=1, location='right'
|
|
||||||
)
|
|
||||||
cbar.set_label(label='Noise signal (V)', rotation=270, labelpad=8)
|
|
||||||
fig.canvas.draw_idle()
|
|
||||||
|
|
||||||
canvas = FigureCanvas(fig)
|
else:
|
||||||
toolbar = NavigationToolBar(canvas, self)
|
|
||||||
|
|
||||||
scroll = QScrollArea()
|
pass
|
||||||
scroll.setWidget(canvas)
|
|
||||||
|
|
||||||
verticalLayout.addWidget(toolbar)
|
exec("self.canvas" + str(i) + "= FigureCanvas(self.fig" + str(i) + ")")
|
||||||
verticalLayout.addWidget(scroll)
|
exec("self.toolbar" + str(i) + "= NavigationToolBar(self.canvas" + str(i) + ", self)")
|
||||||
|
|
||||||
|
exec("self.scroll" + str(i) + "= QScrollArea()")
|
||||||
|
exec("self.scroll" + str(i) + ".setWidget(self.canvas" + str(i) + ")")
|
||||||
|
|
||||||
|
exec("self.verticalLayout_tab" + str(i) + ".addWidget(self.toolbar" + str(i) + ")")
|
||||||
|
exec("self.verticalLayout_tab" + str(i) + ".addWidget(self.scroll" + str(i) + ")")
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,7 @@ class SampleDataTab(QWidget):
|
||||||
def __init__(self, widget_tab):
|
def __init__(self, widget_tab):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
icon_folder = QIcon(os.path.join(
|
icon_folder = QIcon(os.path.join("icons", "folder.png"))
|
||||||
os.path.dirname(__file__), "..", "icons", "folder.png"
|
|
||||||
))
|
|
||||||
self._setup_attrs()
|
self._setup_attrs()
|
||||||
|
|
||||||
### --- General layout of widgets ---
|
### --- General layout of widgets ---
|
||||||
|
|
|
||||||
|
|
@ -498,7 +498,7 @@ class SignalProcessingTab(QWidget):
|
||||||
def _setup_icons(self):
|
def _setup_icons(self):
|
||||||
def path_icon(icon):
|
def path_icon(icon):
|
||||||
return os.path.join(
|
return os.path.join(
|
||||||
os.path.dirname(__file__), "..", "icons", icon
|
"icons", icon
|
||||||
)
|
)
|
||||||
|
|
||||||
self.icon_folder = QIcon(path_icon("folder.png"))
|
self.icon_folder = QIcon(path_icon("folder.png"))
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
#/bin/sh
|
|
||||||
|
|
||||||
export WINEPREFIX=$PWD/wine
|
|
||||||
export WINEDEBUG=-all
|
|
||||||
|
|
||||||
wine $@
|
|
||||||
|
|
@ -8,6 +8,20 @@ rem Build windows version
|
||||||
mkdir acoused_packaging
|
mkdir acoused_packaging
|
||||||
pyinstaller --name "acoused" ..\main.py -y
|
pyinstaller --name "acoused" ..\main.py -y
|
||||||
|
|
||||||
|
rem Icons
|
||||||
|
mkdir acoused_packaging\icons
|
||||||
|
copy /y ..\icons\*.png acoused_packaging\icons
|
||||||
|
|
||||||
|
rem Logos
|
||||||
|
mkdir acoused_packaging\logos
|
||||||
|
copy /y ..\logos\* acoused_packaging\logos
|
||||||
|
|
||||||
|
rem Doc
|
||||||
|
copy /y ..\ABS_calibration_constant_kt.xlsx acoused_packaging
|
||||||
|
copy /y ..\AcouSed_UserManual.pdf acoused_packaging
|
||||||
|
copy /y ..\Acoustic_Inversion_theory.pdf acoused_packaging
|
||||||
|
copy /y ..\Tutorial_AQUAscat_software.pdf acoused_packaging
|
||||||
|
|
||||||
rem move exe
|
rem move exe
|
||||||
move /y dist\AcouSed\acoused.exe acoused_packaging
|
move /y dist\AcouSed\acoused.exe acoused_packaging
|
||||||
move /y dist\acoused\_internal acoused_packaging
|
move /y dist\acoused\_internal acoused_packaging
|
||||||
|
|
@ -16,21 +30,6 @@ rmdir /s /q build
|
||||||
rmdir /s /q dist
|
rmdir /s /q dist
|
||||||
del /q AcouSed.spec
|
del /q AcouSed.spec
|
||||||
|
|
||||||
rem Icons
|
|
||||||
mkdir acoused_packaging\_internal\icons
|
|
||||||
copy /y ..\icons\*.png acoused_packaging\_internal\icons
|
|
||||||
|
|
||||||
rem Logos
|
|
||||||
mkdir acoused_packaging\_internal\logos
|
|
||||||
copy /y ..\logos\* acoused_packaging\_internal\logos
|
|
||||||
|
|
||||||
rem Doc
|
|
||||||
copy /y ..\ABS_calibration_constant_kt.xlsx acoused_packaging
|
|
||||||
copy /y ..\AcouSed_UserManual.pdf acoused_packaging
|
|
||||||
copy /y ..\Acoustic_Inversion_theory.pdf acoused_packaging
|
|
||||||
copy /y ..\Tutorial_AQUAscat_software.pdf acoused_packaging
|
|
||||||
|
|
||||||
set PATH=%PATH%;C:\Program Files (x86)/7-Zip
|
set PATH=%PATH%;C:\Program Files (x86)/7-Zip
|
||||||
7z a -tzip acoused_packaging.zip acoused_packaging
|
7z a -tzip acoused_packaging.zip acoused_packaging
|
||||||
|
|
||||||
pause
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue