diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index fb8b178..084c2e8 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -12,7 +12,7 @@ script: # Copy the python application code into the AppDir - cp bin/evaluate.py $TARGET_APPDIR/usr/bin/ - cp -r src/* $TARGET_APPDIR/usr/src/ - - cp src/pkm.vogel.nmreval.desktop $TARGET_APPDIR/usr/share/applications + - cp src/resources/pkm.vogel.nmreval.desktop $TARGET_APPDIR/usr/share/applications # set current date as version info - sed -i "s/CURRENT_DATE/$(date +'%Y-%m-%d')/" $TARGET_APPDIR/usr/src/nmreval/version.py diff --git a/src/gui_qt/_py/basewindow.py b/src/gui_qt/_py/basewindow.py index df4defd..e1534f4 100644 --- a/src/gui_qt/_py/basewindow.py +++ b/src/gui_qt/_py/basewindow.py @@ -372,6 +372,8 @@ class Ui_BaseWindow(object): self.actionTNMH_model.setObjectName("actionTNMH_model") self.actionBinning = QtWidgets.QAction(BaseWindow) self.actionBinning.setObjectName("actionBinning") + self.actionTNMH = QtWidgets.QAction(BaseWindow) + self.actionTNMH.setObjectName("actionTNMH") self.menuSave.addAction(self.actionSave) self.menuSave.addAction(self.actionExportGraphic) self.menuSave.addAction(self.action_save_fit_parameter) @@ -637,8 +639,9 @@ class Ui_BaseWindow(object): self.actionShow_error_log.setText(_translate("BaseWindow", "Show error log")) self.actionCreate_starter.setText(_translate("BaseWindow", "Create starter..")) self.actionAbout.setText(_translate("BaseWindow", "About...")) - self.actionTNMH_model.setText(_translate("BaseWindow", "Tg determination,,,")) + self.actionTNMH_model.setText(_translate("BaseWindow", "Tg , Hodge, TNMH,,,")) self.actionBinning.setText(_translate("BaseWindow", "Binning...")) + self.actionTNMH.setText(_translate("BaseWindow", "TNMH...")) from ..data.datawidget.datawidget import DataWidget from ..data.integral_widget import IntegralWidget from ..data.point_select import PointSelectWidget diff --git a/src/gui_qt/_py/tnmh_dialog.py b/src/gui_qt/_py/tnmh_dialog.py index e984863..f521032 100644 --- a/src/gui_qt/_py/tnmh_dialog.py +++ b/src/gui_qt/_py/tnmh_dialog.py @@ -11,180 +11,185 @@ from PyQt5 import QtCore, QtGui, QtWidgets -class Ui_Dialog(object): - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(1042, 683) - self.gridLayout = QtWidgets.QGridLayout(Dialog) +class Ui_Wizard(object): + def setupUi(self, Wizard): + Wizard.setObjectName("Wizard") + Wizard.resize(854, 619) + self.wizardPage1 = QtWidgets.QWizardPage() + self.wizardPage1.setObjectName("wizardPage1") + self.gridLayout = QtWidgets.QGridLayout(self.wizardPage1) self.gridLayout.setObjectName("gridLayout") - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) - self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close|QtWidgets.QDialogButtonBox.Save) - self.buttonBox.setObjectName("buttonBox") - self.gridLayout.addWidget(self.buttonBox, 5, 1, 1, 1) - self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") - self.listWidget = QtWidgets.QListWidget(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth()) - self.listWidget.setSizePolicy(sizePolicy) - self.listWidget.setObjectName("listWidget") - self.verticalLayout.addWidget(self.listWidget) - self.label = QtWidgets.QLabel(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) - self.label.setSizePolicy(sizePolicy) - self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.label.setObjectName("label") - self.verticalLayout.addWidget(self.label) - self.tg_value_label = QtWidgets.QLabel(Dialog) - self.tg_value_label.setText("") - self.tg_value_label.setObjectName("tg_value_label") - self.verticalLayout.addWidget(self.tg_value_label) - self.label_4 = QtWidgets.QLabel(Dialog) - self.label_4.setObjectName("label_4") - self.verticalLayout.addWidget(self.label_4) - self.label_5 = QtWidgets.QLabel(Dialog) - self.label_5.setText("") - self.label_5.setObjectName("label_5") - self.verticalLayout.addWidget(self.label_5) - self.gridLayout.addLayout(self.verticalLayout, 0, 0, 5, 1) - self.stackedWidget = QtWidgets.QStackedWidget(Dialog) - self.stackedWidget.setFrameShape(QtWidgets.QFrame.StyledPanel) - self.stackedWidget.setFrameShadow(QtWidgets.QFrame.Raised) - self.stackedWidget.setObjectName("stackedWidget") - self.stackedWidgetPage1 = QtWidgets.QWidget() - self.stackedWidgetPage1.setObjectName("stackedWidgetPage1") - self.gridLayout_3 = QtWidgets.QGridLayout(self.stackedWidgetPage1) - self.gridLayout_3.setObjectName("gridLayout_3") - self.hodge_selection = CheckCombobox(self.stackedWidgetPage1) - self.hodge_selection.setObjectName("hodge_selection") - self.hodge_selection.addItem("") - self.hodge_selection.addItem("") - self.hodge_selection.addItem("") - self.hodge_selection.addItem("") - self.gridLayout_3.addWidget(self.hodge_selection, 4, 2, 1, 1) - self.tau_plot = PlotWidget(self.stackedWidgetPage1) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.tau_plot.sizePolicy().hasHeightForWidth()) - self.tau_plot.setSizePolicy(sizePolicy) - self.tau_plot.setObjectName("tau_plot") - self.gridLayout_3.addWidget(self.tau_plot, 0, 0, 7, 1) - self.tg_export_check = QtWidgets.QCheckBox(self.stackedWidgetPage1) + self.treeWidget = QtWidgets.QTreeWidget(self.wizardPage1) + self.treeWidget.setObjectName("treeWidget") + self.treeWidget.headerItem().setText(0, "1") + self.treeWidget.header().setVisible(False) + self.gridLayout.addWidget(self.treeWidget, 2, 0, 1, 1) + self.gridLayout_9 = QtWidgets.QGridLayout() + self.gridLayout_9.setObjectName("gridLayout_9") + self.tg_export_check = QtWidgets.QCheckBox(self.wizardPage1) self.tg_export_check.setChecked(True) self.tg_export_check.setObjectName("tg_export_check") - self.gridLayout_3.addWidget(self.tg_export_check, 2, 1, 1, 1) - self.tglines_export_check = QtWidgets.QCheckBox(self.stackedWidgetPage1) + self.gridLayout_9.addWidget(self.tg_export_check, 0, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.gridLayout_9.addItem(spacerItem, 3, 0, 1, 1) + self.tglines_export_check = QtWidgets.QCheckBox(self.wizardPage1) self.tglines_export_check.setChecked(True) self.tglines_export_check.setObjectName("tglines_export_check") - self.gridLayout_3.addWidget(self.tglines_export_check, 2, 2, 1, 1) - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout_3.addItem(spacerItem, 6, 2, 1, 1) - self.new_graph_tau_combo = QtWidgets.QComboBox(self.stackedWidgetPage1) - self.new_graph_tau_combo.setObjectName("new_graph_tau_combo") - self.gridLayout_3.addWidget(self.new_graph_tau_combo, 5, 2, 1, 1) - self.label_6 = QtWidgets.QLabel(self.stackedWidgetPage1) - self.label_6.setObjectName("label_6") - self.gridLayout_3.addWidget(self.label_6, 4, 1, 1, 1) - self.new_graph_tau_check = QtWidgets.QCheckBox(self.stackedWidgetPage1) - self.new_graph_tau_check.setChecked(True) - self.new_graph_tau_check.setObjectName("new_graph_tau_check") - self.gridLayout_3.addWidget(self.new_graph_tau_check, 5, 1, 1, 1) - self.line = QtWidgets.QFrame(self.stackedWidgetPage1) - self.line.setFrameShape(QtWidgets.QFrame.HLine) - self.line.setFrameShadow(QtWidgets.QFrame.Sunken) - self.line.setObjectName("line") - self.gridLayout_3.addWidget(self.line, 3, 1, 1, 2) - self.stackedWidget.addWidget(self.stackedWidgetPage1) - self.page = QtWidgets.QWidget() - self.page.setObjectName("page") - self.gridLayout_2 = QtWidgets.QGridLayout(self.page) - self.gridLayout_2.setObjectName("gridLayout_2") - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") - self.label_2 = QtWidgets.QLabel(self.page) - self.label_2.setObjectName("label_2") - self.horizontalLayout.addWidget(self.label_2) - self.comboBox = QtWidgets.QComboBox(self.page) - self.comboBox.setObjectName("comboBox") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.comboBox.addItem("") - self.horizontalLayout.addWidget(self.comboBox) - self.gridLayout_2.addLayout(self.horizontalLayout, 1, 1, 1, 1) - self.pushButton_3 = QtWidgets.QPushButton(self.page) - self.pushButton_3.setObjectName("pushButton_3") - self.gridLayout_2.addWidget(self.pushButton_3, 2, 1, 1, 1) - self.graphicsView_2 = PlotWidget(self.page) - self.graphicsView_2.setObjectName("graphicsView_2") - self.gridLayout_2.addWidget(self.graphicsView_2, 0, 0, 3, 1) - self.stackedWidget.addWidget(self.page) - self.gridLayout.addWidget(self.stackedWidget, 4, 1, 1, 1) - self.dsc_plot = PlotWidget(Dialog) + self.gridLayout_9.addWidget(self.tglines_export_check, 0, 1, 1, 1) + self.pushButton = QtWidgets.QPushButton(self.wizardPage1) + self.pushButton.setObjectName("pushButton") + self.gridLayout_9.addWidget(self.pushButton, 2, 0, 1, 2) + self.gridLayout.addLayout(self.gridLayout_9, 2, 1, 1, 1) + self.dsc_plot = PlotWidget(self.wizardPage1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.dsc_plot.sizePolicy().hasHeightForWidth()) self.dsc_plot.setSizePolicy(sizePolicy) self.dsc_plot.setObjectName("dsc_plot") - self.gridLayout.addWidget(self.dsc_plot, 0, 1, 1, 1) - self.horizontalLayout_2 = QtWidgets.QHBoxLayout() - self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.calctg_button = QtWidgets.QPushButton(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + self.gridLayout.addWidget(self.dsc_plot, 1, 0, 1, 2) + self.calctg_button = QtWidgets.QToolButton(self.wizardPage1) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.calctg_button.sizePolicy().hasHeightForWidth()) self.calctg_button.setSizePolicy(sizePolicy) + self.calctg_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) + self.calctg_button.setArrowType(QtCore.Qt.RightArrow) self.calctg_button.setObjectName("calctg_button") - self.horizontalLayout_2.addWidget(self.calctg_button) - self.pushButton_2 = QtWidgets.QPushButton(Dialog) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed) + self.gridLayout.addWidget(self.calctg_button, 0, 0, 1, 2) + Wizard.addPage(self.wizardPage1) + self.wizardPage2 = QtWidgets.QWizardPage() + self.wizardPage2.setObjectName("wizardPage2") + self.gridLayout_2 = QtWidgets.QGridLayout(self.wizardPage2) + self.gridLayout_2.setObjectName("gridLayout_2") + self.toolButton = QtWidgets.QToolButton(self.wizardPage2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth()) - self.pushButton_2.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.toolButton.sizePolicy().hasHeightForWidth()) + self.toolButton.setSizePolicy(sizePolicy) + self.toolButton.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) + self.toolButton.setArrowType(QtCore.Qt.RightArrow) + self.toolButton.setObjectName("toolButton") + self.gridLayout_2.addWidget(self.toolButton, 0, 0, 1, 2) + self.tghodge_graph = PlotWidget(self.wizardPage2) + self.tghodge_graph.setObjectName("tghodge_graph") + self.gridLayout_2.addWidget(self.tghodge_graph, 2, 0, 1, 1) + self.tau_plot = PlotWidget(self.wizardPage2) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tau_plot.sizePolicy().hasHeightForWidth()) + self.tau_plot.setSizePolicy(sizePolicy) + self.tau_plot.setObjectName("tau_plot") + self.gridLayout_2.addWidget(self.tau_plot, 2, 1, 1, 1) + self.gridLayout_4 = QtWidgets.QGridLayout() + self.gridLayout_4.setObjectName("gridLayout_4") + self.checkBox_6 = QtWidgets.QCheckBox(self.wizardPage2) + self.checkBox_6.setChecked(True) + self.checkBox_6.setObjectName("checkBox_6") + self.gridLayout_4.addWidget(self.checkBox_6, 2, 0, 1, 1) + self.new_graph_tau_check = QtWidgets.QCheckBox(self.wizardPage2) + self.new_graph_tau_check.setChecked(True) + self.new_graph_tau_check.setObjectName("new_graph_tau_check") + self.gridLayout_4.addWidget(self.new_graph_tau_check, 0, 1, 1, 1) + self.checkBox_7 = QtWidgets.QCheckBox(self.wizardPage2) + self.checkBox_7.setChecked(True) + self.checkBox_7.setObjectName("checkBox_7") + self.gridLayout_4.addWidget(self.checkBox_7, 4, 0, 1, 1) + self.checkBox_5 = QtWidgets.QCheckBox(self.wizardPage2) + self.checkBox_5.setChecked(True) + self.checkBox_5.setObjectName("checkBox_5") + self.gridLayout_4.addWidget(self.checkBox_5, 3, 0, 1, 1) + self.new_graph_tau_combo = QtWidgets.QComboBox(self.wizardPage2) + self.new_graph_tau_combo.setEnabled(False) + self.new_graph_tau_combo.setObjectName("new_graph_tau_combo") + self.gridLayout_4.addWidget(self.new_graph_tau_combo, 0, 2, 1, 1) + self.checkBox_4 = QtWidgets.QCheckBox(self.wizardPage2) + self.checkBox_4.setChecked(True) + self.checkBox_4.setObjectName("checkBox_4") + self.gridLayout_4.addWidget(self.checkBox_4, 1, 0, 1, 1) + self.checkBox = QtWidgets.QCheckBox(self.wizardPage2) + self.checkBox.setChecked(True) + self.checkBox.setObjectName("checkBox") + self.gridLayout_4.addWidget(self.checkBox, 0, 0, 1, 1) + self.pushButton_4 = QtWidgets.QPushButton(self.wizardPage2) + self.pushButton_4.setObjectName("pushButton_4") + self.gridLayout_4.addWidget(self.pushButton_4, 4, 1, 1, 2) + self.gridLayout_2.addLayout(self.gridLayout_4, 3, 0, 1, 2) + Wizard.addPage(self.wizardPage2) + self.wizardPage = QtWidgets.QWizardPage() + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.wizardPage.sizePolicy().hasHeightForWidth()) + self.wizardPage.setSizePolicy(sizePolicy) + self.wizardPage.setSubTitle("") + self.wizardPage.setObjectName("wizardPage") + self.gridLayout_6 = QtWidgets.QGridLayout(self.wizardPage) + self.gridLayout_6.setObjectName("gridLayout_6") + self.fit_tnhm_fitbutton = QtWidgets.QPushButton(self.wizardPage) + self.fit_tnhm_fitbutton.setObjectName("fit_tnhm_fitbutton") + self.gridLayout_6.addWidget(self.fit_tnhm_fitbutton, 0, 0, 1, 2) + self.treeWidget_2 = QtWidgets.QTreeWidget(self.wizardPage) + self.treeWidget_2.setObjectName("treeWidget_2") + self.treeWidget_2.headerItem().setText(0, "1") + self.treeWidget_2.header().setVisible(False) + self.gridLayout_6.addWidget(self.treeWidget_2, 2, 0, 1, 1) + self.gridLayout_5 = QtWidgets.QGridLayout() + self.gridLayout_5.setObjectName("gridLayout_5") + self.new_graph_tnmh_check_2 = QtWidgets.QCheckBox(self.wizardPage) + self.new_graph_tnmh_check_2.setChecked(True) + self.new_graph_tnmh_check_2.setObjectName("new_graph_tnmh_check_2") + self.gridLayout_5.addWidget(self.new_graph_tnmh_check_2, 1, 0, 1, 1) + self.checkBox_14 = QtWidgets.QCheckBox(self.wizardPage) + self.checkBox_14.setChecked(True) + self.checkBox_14.setObjectName("checkBox_14") + self.gridLayout_5.addWidget(self.checkBox_14, 0, 0, 1, 1) + self.pushButton_2 = QtWidgets.QPushButton(self.wizardPage) self.pushButton_2.setObjectName("pushButton_2") - self.horizontalLayout_2.addWidget(self.pushButton_2) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout_2.addItem(spacerItem1) - self.gridLayout.addLayout(self.horizontalLayout_2, 2, 1, 1, 1) + self.gridLayout_5.addWidget(self.pushButton_2, 2, 0, 1, 2) + self.checkBox_13 = QtWidgets.QCheckBox(self.wizardPage) + self.checkBox_13.setChecked(True) + self.checkBox_13.setObjectName("checkBox_13") + self.gridLayout_5.addWidget(self.checkBox_13, 0, 1, 1, 1) + self.new_graph_tnmh_combo_2 = QtWidgets.QComboBox(self.wizardPage) + self.new_graph_tnmh_combo_2.setEnabled(False) + self.new_graph_tnmh_combo_2.setObjectName("new_graph_tnmh_combo_2") + self.gridLayout_5.addWidget(self.new_graph_tnmh_combo_2, 1, 1, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.gridLayout_5.addItem(spacerItem1, 3, 0, 1, 1) + self.gridLayout_6.addLayout(self.gridLayout_5, 2, 1, 1, 1) + self.graphicsView_3 = PlotWidget(self.wizardPage) + self.graphicsView_3.setObjectName("graphicsView_3") + self.gridLayout_6.addWidget(self.graphicsView_3, 1, 0, 1, 2) + Wizard.addPage(self.wizardPage) - self.retranslateUi(Dialog) - self.stackedWidget.setCurrentIndex(0) - self.buttonBox.accepted.connect(Dialog.accept) # type: ignore - self.buttonBox.rejected.connect(Dialog.reject) # type: ignore - QtCore.QMetaObject.connectSlotsByName(Dialog) + self.retranslateUi(Wizard) + QtCore.QMetaObject.connectSlotsByName(Wizard) - def retranslateUi(self, Dialog): + def retranslateUi(self, Wizard): _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "SImba, everything the light touches is our kingdom")) - self.label.setText(_translate("Dialog", "

Tg values:

")) - self.label_4.setText(_translate("Dialog", "

TNMH parameter:

")) - self.hodge_selection.setItemText(0, _translate("Dialog", "Onset")) - self.hodge_selection.setItemText(1, _translate("Dialog", "Midpoint")) - self.hodge_selection.setItemText(2, _translate("Dialog", "End")) - self.hodge_selection.setItemText(3, _translate("Dialog", "Inflection")) - self.tg_export_check.setText(_translate("Dialog", "Export Tg")) - self.tglines_export_check.setText(_translate("Dialog", "Export lines")) - self.label_6.setText(_translate("Dialog", "Hodge:")) - self.new_graph_tau_check.setText(_translate("Dialog", "New graph")) - self.label_2.setText(_translate("Dialog", "Tg for TNMH")) - self.comboBox.setItemText(0, _translate("Dialog", "Fictive")) - self.comboBox.setItemText(1, _translate("Dialog", "Onset")) - self.comboBox.setItemText(2, _translate("Dialog", "Midpoint")) - self.comboBox.setItemText(3, _translate("Dialog", "End")) - self.comboBox.setItemText(4, _translate("Dialog", "Inflection")) - self.pushButton_3.setText(_translate("Dialog", "Fit TNMH model")) - self.calctg_button.setText(_translate("Dialog", "Calculate Tg")) - self.pushButton_2.setText(_translate("Dialog", "Calculate fictive Cp")) -from ..lib.forms import CheckCombobox + Wizard.setWindowTitle(_translate("Wizard", "Wizard")) + self.wizardPage1.setTitle(_translate("Wizard", "Glass transition")) + self.tg_export_check.setText(_translate("Wizard", "Export Tg")) + self.tglines_export_check.setText(_translate("Wizard", "Export lines")) + self.pushButton.setText(_translate("Wizard", "Export")) + self.calctg_button.setText(_translate("Wizard", "Calculate Tg")) + self.wizardPage2.setTitle(_translate("Wizard", "Hodge")) + self.toolButton.setText(_translate("Wizard", "Calculate Hodge")) + self.checkBox_6.setText(_translate("Wizard", "End")) + self.new_graph_tau_check.setText(_translate("Wizard", "New graph")) + self.checkBox_7.setText(_translate("Wizard", "Fictive")) + self.checkBox_5.setText(_translate("Wizard", "Inflection")) + self.checkBox_4.setText(_translate("Wizard", "Midpoint")) + self.checkBox.setText(_translate("Wizard", "Onset")) + self.pushButton_4.setText(_translate("Wizard", "Export")) + self.wizardPage.setTitle(_translate("Wizard", "TNMH")) + self.fit_tnhm_fitbutton.setText(_translate("Wizard", "Fit TNMH model")) + self.new_graph_tnmh_check_2.setText(_translate("Wizard", "New graph")) + self.checkBox_14.setText(_translate("Wizard", "Export fit")) + self.pushButton_2.setText(_translate("Wizard", "Export")) + self.checkBox_13.setText(_translate("Wizard", "Export dTf / dT")) from pyqtgraph import PlotWidget diff --git a/src/gui_qt/dsc/glass_dialog.py b/src/gui_qt/dsc/glass_dialog.py index c7b2a26..b1cb9ff 100644 --- a/src/gui_qt/dsc/glass_dialog.py +++ b/src/gui_qt/dsc/glass_dialog.py @@ -6,20 +6,27 @@ from pyqtgraph import mkPen, mkBrush, LegendItem from nmreval.dsc.hodge import tau_hodge from nmreval.lib.colors import Tab10 -from ..Qt import QtWidgets, QtCore -from .._py.tnmh_dialog import Ui_Dialog +from ..Qt import QtWidgets, QtCore, QtGui +from .._py.tnmh_dialog import Ui_Wizard +from ..lib.listwidget import QListWidgetSelect from ..lib.pg_objects import PlotItem, RegionItem from nmreval.data import DSC, Points -class TgCalculator(QtWidgets.QDialog, Ui_Dialog): - newTg = QtCore.pyqtSignal(dict, list, str) +class TgCalculator(QtWidgets.QWizard, Ui_Wizard): + newData = QtCore.pyqtSignal(dict, str) def __init__(self, management, parent=None): super().__init__(parent=parent) self.setupUi(self) + self.listWidget = QListWidgetSelect(parent=self) + self.listWidget.setSelectionMode(self.listWidget.ExtendedSelection) + self.listWidget.itemChanged.connect(self.change_visibility) + self.setSideWidget(self.listWidget) + self.listWidget.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)) + self._management = management self._colors = cycle(Tab10) @@ -27,22 +34,51 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): self._plots = {} self._tg_value = {} self._fit = {} - self._lines = {} self._hodge = { - 'onset': (PlotItem(x=[], y=[], pen=None, symbol='o', symbolBrush=Tab10.TabBlue.rgb(), name='Onset'), None), - 'midpoint': (PlotItem(x=[], y=[], pen=None, symbol='s', symbolBrush=Tab10.TabOrange.rgb(), name='Midpoint'), None), - 'end': (PlotItem(x=[], y=[], pen=None, symbol='t', symbolBrush=Tab10.TabGreen.rgb(), name='End'), None), - 'inflection': (PlotItem(x=[], y=[], pen=None, symbol='d', symbolBrush=Tab10.TabRed.rgb(), name='Inflection'), None), - # 'fictive': PlotItem(x=[], y=[], pen=None, symbol='t1', symbolBrush=Tab10.TabPurple.rgb(), name='Fictive'), - # 'TNMH': PlotItem(x=[], y=[], pen=None, symbol='star', symbolBrush=Tab10.TabPurple.rgb(), name='TNMH'), + 'onset': ( + PlotItem(x=[], y=[], pen=None, symbol='o', symbolBrush=Tab10.TabBlue.rgb(), name='Onset'), + None, + (PlotItem(x=[], y=[], pen=mkPen({'color': Tab10.TabBlue.rgb()})), + PlotItem(x=[], y=[], pen=None, symbol='o', symbolBrush=Tab10.TabBlue.rgb())), + None, + ), + 'midpoint': ( + PlotItem(x=[], y=[], pen=None, symbol='s', symbolBrush=Tab10.TabOrange.rgb(), name='Midpoint'), + None, + (PlotItem(x=[], y=[], pen=mkPen({'color': Tab10.TabOrange.rgb()})), + PlotItem(x=[], y=[], pen=None, symbol='s', symbolBrush=Tab10.TabOrange.rgb())), + None, + ), + 'end': ( + PlotItem(x=[], y=[], pen=None, symbol='t', symbolBrush=Tab10.TabGreen.rgb(), name='End'), + None, + (PlotItem(x=[], y=[], pen=mkPen({'color': Tab10.TabGreen.rgb()})), + PlotItem(x=[], y=[], pen=None, symbol='t', symbolBrush=Tab10.TabGreen.rgb())), + None, + ), + 'inflection': ( + PlotItem(x=[], y=[], pen=None, symbol='d', symbolBrush=Tab10.TabRed.rgb(), name='Inflection'), + None, + (PlotItem(x=[], y=[], pen=mkPen({'color': Tab10.TabRed.rgb()})), + PlotItem(x=[], y=[], pen=None, symbol='d', symbolBrush=Tab10.TabRed.rgb())), + None, + ), + 'fictive': ( + PlotItem(x=[], y=[], pen=None, symbol='t1', symbolBrush=Tab10.TabPurple.rgb(), name='Fictive'), + None, + (PlotItem(x=[], y=[], pen=mkPen({'color': Tab10.TabPurple.rgb()})), + PlotItem(x=[], y=[], pen=None, symbol='t1', symbolBrush=Tab10.TabPurple.rgb())), + None, + ), } + self._lines = {} self.tau_plot.getPlotItem().addLegend() - for plt, _ in self._hodge.values(): + for plt, _, fitplt, _ in self._hodge.values(): self.tau_plot.addItem(plt) + self.tghodge_graph.addItem(fitplt[0]) + self.tghodge_graph.addItem(fitplt[1]) self.tau_plot.setLogMode(y=True) - self.pushButton_2.hide() - self.label_4.hide() - self.label_5.hide() + self.tghodge_graph.setLogMode(y=True) self.limits = RegionItem(), RegionItem() for lim in self.limits: @@ -51,10 +87,8 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): self.add_sets() - self.listWidget.itemClicked.connect(self.show_tg_values) - - self.new_graph_tau_combo.setEnabled(False) self.new_graph_tau_check.stateChanged.connect(lambda state: self.new_graph_tau_combo.setEnabled(not bool(state))) + self.new_graph_tau_check.stateChanged.connect(lambda state: self.new_graph_tnmh_combo_2.setEnabled(not bool(state))) def __call__(self): self.clear() @@ -68,11 +102,12 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): for plots in self._plots.values(): for val in plots: self.dsc_plot.removeItem(val) - self.graphicsView_2.removeItem(val) for key, plt in self._hodge.items(): plt[0].setData(x=[], y=[]) - self._hodge[key] = (plt[0], None) + plt[2][0].setData(x=[], y=[]) + plt[2][1].setData(x=[], y=[]) + self._hodge[key] = (plt[0], None, plt[2], None) self._dsc = {} self._plots = {} @@ -84,6 +119,7 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): self.new_graph_tau_combo.clear() for graphs in self._management.graphs.list(): self.new_graph_tau_combo.addItem(graphs[1], userData=graphs[0]) + self.new_graph_tnmh_combo_2.addItem(graphs[1], userData=graphs[0]) min_x = 10_000_000 max_x = -10_000_000 @@ -122,14 +158,20 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): self.dsc_plot.addItem(tg_plot) fictive_cp = PlotItem(pen=mkPen(c.rgb())) - self.graphicsView_2.addItem(fictive_cp) + self.graphicsView_3.addItem(fictive_cp) tnmh_fit = PlotItem() tnmh_fit.set_line(style=2, color=c) - self.graphicsView_2.addItem(tnmh_fit) + self.graphicsView_3.addItem(tnmh_fit) self._plots[key] = (data_plot, tg_plot, glass, liquid, tangent, fictive_cp, tnmh_fit) - self._tg_value[key] = {'onset': (nan, nan), 'midpoint': (nan, nan), 'end': (nan, nan), 'inflection': (nan, nan)} # , 'fictive': (nan, nan)} + self._tg_value[key] = { + 'onset': (nan, nan), + 'midpoint': (nan, nan), + 'end': (nan, nan), + 'inflection': (nan, nan), + # 'fictive': (nan, nan), + } if self._limitless: dist = max_x - min_x @@ -162,104 +204,174 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): self._update_tg_plots() - def show_tg_values(self, item): - values = self._tg_value.get(item.data(QtCore.Qt.UserRole)) - - if values is not None: - label = '\n'.join((f'{name.capitalize()}: {pos[0]:.2f} K' for name, pos in values.items())) - self.tg_value_label.setText(label) - - fit = self._fit.get(item.data(QtCore.Qt.UserRole)) - if fit is not None: - self.label_5.setText(fit._parameter_string()) - def _update_tg_plots(self): + self.treeWidget.clear() for idx in range(self.listWidget.count()): item = self.listWidget.item(idx) + tree_item = QtWidgets.QTreeWidgetItem([item.text()]) + values = self._tg_value.get(item.data(QtCore.Qt.UserRole)) + + if values is not None: + for name, pos in values.items(): + child_item = QtWidgets.QTreeWidgetItem([f'{name.capitalize()}: {pos[0]:.2f} K']) + tree_item.addChild(child_item) + + self.treeWidget.addTopLevelItem(tree_item) + key = item.data(QtCore.Qt.UserRole) plot = self._plots[key] data, _ = self._dsc[key] plot[1].setData(array(list(self._tg_value[key].values()))) - self.hodge() + @QtCore.pyqtSlot(name='on_pushButton_clicked') + def export_tg(self): + ret_dic = {} + for key, tg in self._tg_value.items(): + tgx = [x for x, y in tg.values()] + tgy = [y for x, y in tg.values()] + if self.tg_export_check.isChecked(): + tg_pts = Points(x=tgx, y=tgy, name=self._management[key].name + ' (Tg)', value=self._management[key].value) + else: + tg_pts = None - @QtCore.pyqtSlot(QtWidgets.QListWidgetItem, name='on_listWidget_itemChanged') + if self.tglines_export_check.isChecked(): + line = self._lines[key] + else: + line = [] + + ret_dic[key] = (tg_pts, line) + + self.newData.emit(ret_dic, 'tg') + + @QtCore.pyqtSlot(QtWidgets.QListWidgetItem) def change_visibility(self, item: QtWidgets.QListWidgetItem): is_checked = bool(item.checkState()) plot = self._plots[item.data(QtCore.Qt.UserRole)] for val in plot: val.setVisible(is_checked) - @QtCore.pyqtSlot(name='on_pushButton_2_clicked') - def get_fictive(self): - baselines = tuple(lim.getRegion() for lim in self.limits) - if baselines[0][0] > baselines[1][0]: - baselines = baselines[1], baselines[0] + def get_fictive(self, key, baselines): + plot = self._plots[key] + data, _ = self._dsc[key] - for idx in range(self.listWidget.count()): - item = self.listWidget.item(idx) - if item.checkState() == QtCore.Qt.Unchecked: - continue + cp, tg = data.get_fictive_cp(*baselines) - key = item.data(QtCore.Qt.UserRole) - plot = self._plots[key] - data, _ = self._dsc[key] + plot[5].setData(cp.x, cp.y) + self._dsc[key] = (data, cp) - cp, tg = data.get_fictive_cp(*baselines) + return cp - plot[5].setData(cp.x, cp.y) - self._dsc[key] = (data, cp) - - self._tg_value[key]['fictive'] = (tg, 0) - - self._update_tg_plots() - - @QtCore.pyqtSlot(name='on_pushButton_3_clicked') + @QtCore.pyqtSlot(name='on_fit_tnhm_fitbutton_clicked') def make_tnmh(self): baselines = tuple(lim.getRegion() for lim in self.limits) if baselines[0][0] > baselines[1][0]: baselines = baselines[1], baselines[0] + self.treeWidget_2.clear() for idx in range(self.listWidget.count()): item = self.listWidget.item(idx) if item.checkState() == QtCore.Qt.Unchecked: continue key = item.data(QtCore.Qt.UserRole) - plot = self._plots[key] - _, data = self._dsc[key] - if data is None: - continue + data = self.get_fictive(key, baselines) res = data.calculate_tnmh([60, 0.5, 1, 2e5], *baselines, return_fictive=False) self._fit[key] = res + + plot = self._plots[key] plot[-1].setData(res.x, res.y) + for idx in range(self.listWidget.count()): + item = self.listWidget.item(idx) + + tree_item = QtWidgets.QTreeWidgetItem([item.text()]) + values = self._fit.get(item.data(QtCore.Qt.UserRole)) + + if values is not None: + child_item = QtWidgets.QTreeWidgetItem([values.parameter_string()]) + tree_item.addChild(child_item) + + self.treeWidget_2.addTopLevelItem(tree_item) + + @QtCore.pyqtSlot(name='on_pushButton_2_clicked') + def export_tnmh(self): + ret_dic = {} + for idx in range(self.listWidget.count()): + item = self.listWidget.item(idx) + if item.checkState() == QtCore.Qt.Unchecked: + continue + + key = item.data(QtCore.Qt.UserRole) + if self.checkBox_13.isChecked(): + _, cp = self._dsc[key] + else: + cp = None + + if self.checkBox_14.isChecked(): + line = self._fit[key] + else: + line = None + + ret_dic[key] = (cp, line) + + if self.new_graph_tnmh_check_2.isChecked(): + ret_dic['graph'] = '' + else: + ret_dic['graph'] = self.new_graph_tnmh_combo_2.currentData() + + self.newData.emit(ret_dic, 'tnmh') + + @QtCore.pyqtSlot(name='on_toolButton_clicked') def hodge(self): - for tg_type, (plot, data) in self._hodge.items(): + for tg_type, (plot, data, fitplots, fit) in self._hodge.items(): m = [] for idx in range(self.listWidget.count()): item = self.listWidget.item(idx) + if item.checkState() == QtCore.Qt.Unchecked: + continue key = item.data(QtCore.Qt.UserRole) data, _ = self._dsc[key] - - tg_value = self._tg_value[key][tg_type][0] - if isnan(tg_value): + try: + tg_value = self._tg_value[key][tg_type][0] + if isnan(tg_value): + continue + except KeyError: continue - + m.append([tg_value, data.value]) if len(m) > 1: - data = tau_hodge(*array(m).T) + data, fit = tau_hodge(*array(m).T) data.name = f'{data.name} ({tg_type.capitalize()})' plot.setData(data.x, data.y) + fitplots[0].setData(fit.x, fit.y) + fitplots[1].setData(fit.x_data, fit.y_data) - self._hodge[tg_type] = (plot, data) + self._hodge[tg_type] = (plot, data, fitplots, fit) + + @QtCore.pyqtSlot(name='on_pushButton_4_clicked') + def export_hodge(self): + ret_dic2 = {} + + for cb in (self.checkBox, self.checkBox_4, self.checkBox_6, self.checkBox_5, self.checkBox_7): + if cb.isChecked(): + item = cb.text().lower() + data = self._hodge.get(item) + if data[1] is not None: + ret_dic2[item] = data[1] + + if self.new_graph_tau_check.isChecked(): + ret_dic2['graph'] = '' + else: + ret_dic2['graph'] = self.new_graph_tau_combo.currentData() + + self.newData.emit(ret_dic2, 'hodge') def close(self) -> bool: self.clear() @@ -287,13 +399,5 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): ret_dic[key] = (tg_pts, line) - ret_dic2 = [] - - for i in range(self.hodge_selection.count()): - if self.hodge_selection.isChecked(i): - item = self.hodge_selection.itemText(i).lower() - v = self._hodge.get(item) - ret_dic2.append(v[1]) - self.newTg.emit(ret_dic, ret_dic2, graph_id) self.close() diff --git a/src/gui_qt/main/mainwindow.py b/src/gui_qt/main/mainwindow.py index a7104e0..5cefcac 100644 --- a/src/gui_qt/main/mainwindow.py +++ b/src/gui_qt/main/mainwindow.py @@ -1084,7 +1084,7 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): def report_bug(self): import webbrowser - webbrowser.open('https://gitea.pkm.physik.tu-darmstadt.de/IPKM/nmreval/issues/new') + webbrowser.open('https://gitea.pkm.physik.tu-darmstadt.de/IPKM-Public/nmreval/issues/new') @QtCore.pyqtSlot(name='on_actionUpdate_triggered') def look_for_update(self): @@ -1139,10 +1139,11 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): QtWidgets.QMessageBox.about(self, 'Version', f'Build date of AppImage: {__version__}') @QtCore.pyqtSlot(name='on_actionTNMH_model_triggered') + @QtCore.pyqtSlot(name='on_actionTNMH_triggered') def show_tg_dialog(self): if self._tg_dialog is None: self._tg_dialog = TgCalculator(self.management, parent=self) - self._tg_dialog.newTg.connect(self.management.addTg) + self._tg_dialog.newData.connect(self.management.addTg) else: self._tg_dialog() self._tg_dialog.show() diff --git a/src/gui_qt/main/management.py b/src/gui_qt/main/management.py index d62aca8..45b8339 100644 --- a/src/gui_qt/main/management.py +++ b/src/gui_qt/main/management.py @@ -773,29 +773,51 @@ class UpperManagement(QtCore.QObject): self.newData.emit(new_data, self.current_graph) - @QtCore.pyqtSlot(dict, list, str) - def addTg(self, dic1: dict, dic2: list, graph_id: str): - for k, (tg, lines) in dic1.items(): - p: ExperimentContainer = self[k] - col = p.plot_real.linecolor + @QtCore.pyqtSlot(dict, str) + def addTg(self, dic1: dict, dtype: str): + if dtype == 'tg': + for k, (tg, lines) in dic1.items(): + p: ExperimentContainer = self[k] + col = p.plot_real.linecolor - tg_data_id = [] + tg_data_id = [] - if tg is not None: - tg_data_id.append(self.add(tg, color=col)) + if tg is not None: + tg_data_id.append(self.add(tg, color=col)) - for line in lines: - set_id = self.add(line, color=col) + for line in lines: + set_id = self.add(line, color=col) + self[set_id].setLine(style=LineStyle.Dashed) + self[set_id].setSymbol(symbol=SymbolStyle.No) + tg_data_id.append(set_id) + + self.newData.emit(tg_data_id, self.current_graph) + + elif dtype == 'hodge': + set_id_list = [] + graph_id = dic1.pop('graph') + for v in dic1.values(): + set_id_list.append(self.add(v)) + self.newData.emit(set_id_list, graph_id) + + elif dtype == 'tnmh': + set_id_list = [] + graph_id = dic1.pop('graph') + for k, (tg, fit) in dic1.items(): + p: ExperimentContainer = self[k] + col = p.plot_real.linecolor + + tg_data_id = [] + + if tg is not None: + set_id_list.append(self.add(tg, color=col)) + + set_id = self.add(fit, color=col) self[set_id].setLine(style=LineStyle.Dashed) self[set_id].setSymbol(symbol=SymbolStyle.No) - tg_data_id.append(set_id) + set_id_list.append(set_id) - self.newData.emit(tg_data_id, self.current_graph) - - set_id_list = [] - for v in dic2: - set_id_list.append(self.add(v)) - self.newData.emit(set_id_list, graph_id) + self.newData.emit(set_id_list, graph_id) @QtCore.pyqtSlot(int, dict) def smooth_data(self, npoints, param_kwargs): diff --git a/src/gui_qt/math/binning.py b/src/gui_qt/math/binning.py index 2c152bb..cc38f87 100644 --- a/src/gui_qt/math/binning.py +++ b/src/gui_qt/math/binning.py @@ -7,7 +7,7 @@ class BinningWindow(QtWidgets.QDialog): layout = QtWidgets.QFormLayout() - self.label = QtWidgets.QLabel('Bin width') + self.label = QtWidgets.QLabel('Digits (negative values position left of decimal point)') self.spinbox = QtWidgets.QLineEdit() self.spinbox.setValidator(QtGui.QDoubleValidator()) self.spinbox.setText('1') diff --git a/src/nmreval/data/dsc.py b/src/nmreval/data/dsc.py index 0d2aacd..afdefb4 100644 --- a/src/nmreval/data/dsc.py +++ b/src/nmreval/data/dsc.py @@ -46,7 +46,6 @@ class DSC(Points): regress2 = linregress(region.x[liquid_regime], region.y[liquid_regime]) region.y -= glass_extrapolation - real_area = cumulative_trapezoid(region.y, region.x, initial=0) real_area -= real_area[-1] @@ -99,10 +98,7 @@ class DSC(Points): x = self.x[low_idx[0]:high_idx[1]] y = self.y[low_idx[0]:high_idx[1]] - win_len = min(len(x) // 20, 51) - if win_len % 2 == 0: - win_len += 1 - yy = savgol_filter(y, window_length=win_len, polyorder=1, deriv=1) / np.mean(np.diff(x)) + yy = savgol_filter(y, window_length=min(len(x) // 20, 50), polyorder=1, deriv=1) / np.mean(np.diff(x)) high_idx = (high_idx[0] - low_idx[0], high_idx[1] - low_idx[0]) low_idx = (0, low_idx[1] - low_idx[0]) diff --git a/src/nmreval/dsc/hodge.py b/src/nmreval/dsc/hodge.py index b2dc3ba..288f68a 100644 --- a/src/nmreval/dsc/hodge.py +++ b/src/nmreval/dsc/hodge.py @@ -3,24 +3,25 @@ from scipy.stats import linregress from nmreval.data import Points from nmreval.fit.minimizer import FitRoutine +from nmreval.fit.result import FitResult from nmreval.lib.utils import ArrayLike from nmreval.models import Arrhenius from nmreval.utils import kB -def tau_hodge(tg: ArrayLike, rate: ArrayLike) -> Points: - rate = np.asanyarray(rate) / 60 +def tau_hodge(tg: ArrayLike, rate: ArrayLike) -> (Points, FitResult): + rate = np.asanyarray(rate) tg = np.asanyarray(tg) fitter = FitRoutine() fitter.set_model(Arrhenius) - d = fitter.add_data(tg, rate) + d = fitter.add_data(1000/tg, rate, we='y') - init = linregress(1/tg, np.log(rate)) + init = linregress(1000/tg, np.log(rate)) - d.set_parameter([np.exp(init.intercept), init.slope*kB], fun_kwargs={'invt': None}) + d.set_parameter([np.exp(init.intercept), 1000*init.slope*kB], fun_kwargs={'invt': 'invt1000'}) res = fitter.run()[0] de = res.parameter['E_{A}'] - tau = kB*tg**2/np.abs(de.value)/rate + tau = kB*tg**2/np.abs(de.value)/rate*60 - return Points(x=1000/tg, y=tau, y_err=tau*de.error/np.abs(de.value), name='Hodge') + return Points(x=1000/tg, y=tau, y_err=tau*de.error/np.abs(de.value), name='Hodge'), res diff --git a/src/nmreval/fit/result.py b/src/nmreval/fit/result.py index 4d98cd8..eb03563 100644 --- a/src/nmreval/fit/result.py +++ b/src/nmreval/fit/result.py @@ -228,7 +228,7 @@ class FitResult(Points): print(' #data :', self.nobs) print(' #var :', self.nvar) print('\nParameter') - print(self._parameter_string()) + print(self.parameter_string()) if statistics: print('Statistics') @@ -240,7 +240,7 @@ class FitResult(Points): print(self._correlation_string()) print() - def _parameter_string(self): + def parameter_string(self): ret_val = '' for pval in self.parameter.values(): diff --git a/src/resources/_ui/basewindow.ui b/src/resources/_ui/basewindow.ui index 3712e76..8a5efaf 100644 --- a/src/resources/_ui/basewindow.ui +++ b/src/resources/_ui/basewindow.ui @@ -1032,7 +1032,7 @@ - Tg determination,,, + Tg , Hodge, TNMH,,, @@ -1040,6 +1040,11 @@ Binning... + + + TNMH... + + diff --git a/src/resources/_ui/tnmh_dialog.ui b/src/resources/_ui/tnmh_dialog.ui index dec99ec..d9201d6 100644 --- a/src/resources/_ui/tnmh_dialog.ui +++ b/src/resources/_ui/tnmh_dialog.ui @@ -1,299 +1,326 @@ - Dialog - + Wizard + 0 0 - 1042 - 683 + 854 + 619 - SImba, everything the light touches is our kingdom + Wizard - - - - - Qt::Horizontal - - - QDialogButtonBox::Close|QDialogButtonBox::Save - - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - + + + Glass transition + + + + + + false + + - <html><head/><body><p><span style=" font-weight:600;">Tg values:</span></p></body></html> + 1 - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - - - - - <html><head/><body><p><span style=" font-weight:600;">TNMH parameter:</span></p></body></html> - - - - - - - - - - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - 0 - - - - - - - - Onset - - - - - Midpoint - - - - - End - - - - - Inflection - - - - - - - - - 0 - 0 - - - - - - - - Export Tg - - - true - - - - - - - Export lines - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Hodge: - - - - - - - New graph - - - true - - - - - - - Qt::Horizontal - - - - + - - - - - - - - Tg for TNMH - - - - - - - - Fictive - - - - - Onset - - - - - Midpoint - - - - - End - - - - - Inflection - - - - - - - - - - Fit TNMH model - - - - - - - + + + + + + + Export Tg + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Export lines + + + true + + + + + + + Export + + + + + + + + + + 0 + 0 + + - - - - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - - + + + + + + 0 + 0 + + + + Calculate Tg + + + Qt::ToolButtonTextBesideIcon + + + Qt::RightArrow + + + + + + + + Hodge + + + + + + + 0 + 0 + + + + Calculate Hodge + + + Qt::ToolButtonTextBesideIcon + + + Qt::RightArrow + + + + + + + + + + + 0 + 0 + + + + + + + + + + End + + + true + + + + + + + New graph + + + true + + + + + + + Fictive + + + true + + + + + + + Inflection + + + true + + + + + + + false + + + + + + + Midpoint + + + true + + + + + + + Onset + + + true + + + + + + + Export + + + + + + + + + + + 0 + 0 + + + + TNMH + + + + + + + + + Fit TNMH model + + + + + + + false + + - Calculate Tg + 1 - - - - - - - 0 - 0 - - - - Calculate fictive Cp - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - + + + + + + + + + New graph + + + true + + + + + + + Export fit + + + true + + + + + + + Export + + + + + + + Export dTf / dT + + + true + + + + + + + false + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + @@ -301,45 +328,7 @@ QGraphicsView
pyqtgraph
- - CheckCombobox - QComboBox -
..lib.forms
-
- - - buttonBox - accepted() - Dialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - Dialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - +
diff --git a/src/pkm.vogel.nmreval.desktop b/src/resources/pkm.vogel.nmreval.desktop similarity index 100% rename from src/pkm.vogel.nmreval.desktop rename to src/resources/pkm.vogel.nmreval.desktop