Compare commits

...

6 Commits

Author SHA1 Message Date
11fe47bef1 add sigmoid function to basic models (#307)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 2m13s
fixes #306

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #307
2025-02-11 17:31:00 +00:00
f33643955b 304-fitparameter (#305)
Some checks failed
Build AppImage / Explore-Gitea-Actions (push) Has been cancelled
fixes #304

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #305
2025-01-23 18:11:45 +00:00
41353b9a54 wide-line spectra handle missing x values better (#303)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 2m37s
see issue #302

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #303
2024-12-09 13:45:07 +00:00
90084e3481 dev (#297)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 2m35s
this time it will not break!

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #297
2024-11-14 17:20:31 +00:00
91b2594b90 Revert "dev (#295)"
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 2m17s
This reverts commit 7145f9e3cd6b8802e5f2d3c941ba008e20b17f5f.
2024-11-14 12:14:17 +01:00
7145f9e3cd dev (#295)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 2m58s
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #295
2024-11-13 13:02:05 +00:00
15 changed files with 561 additions and 379 deletions

View File

@ -360,7 +360,7 @@ class Ui_ascii_reader(object):
self.x_label.setText(_translate("ascii_reader", "x")) self.x_label.setText(_translate("ascii_reader", "x"))
self.dsdfsf.setText(_translate("ascii_reader", "Numerical value")) self.dsdfsf.setText(_translate("ascii_reader", "Numerical value"))
self.label_9.setText(_translate("ascii_reader", "Match index")) self.label_9.setText(_translate("ascii_reader", "Match index"))
self.regex_input.setToolTip(_translate("ascii_reader", "<html><head/><body><p>Token:<br/>[abc]: Matches any of a, b, or c<br/>[a-z]: Matches any digit in the range a-z<br/>\\d: Matches any digit in the range 0-9 (equal to [0-9}</p><p>Quantifiers:<br/>a*: 0 or more of a<br/>a*: 1 or more of a<br/>a?: 0 or 1 of a</p></body></html>")) self.regex_input.setToolTip(_translate("ascii_reader", "<html><head/><body><p>Token:<br/>[abc]: Matches any of a, b, or c<br/>[a-z]: Matches any digit in the range a-z<br/>\\d: Matches any digit in the range 0-9 (equal to [0-9}</p><p>Quantifiers:<br/>a*: 0 or more of a<br/>a+: 1 or more of a<br/>a?: 0 or 1 of a</p></body></html>"))
self.re_button.setText(_translate("ascii_reader", "Regex")) self.re_button.setText(_translate("ascii_reader", "Regex"))
self.custom_button.setText(_translate("ascii_reader", "Custom value")) self.custom_button.setText(_translate("ascii_reader", "Custom value"))
self.label_8.setText(_translate("ascii_reader", "Filename")) self.label_8.setText(_translate("ascii_reader", "Filename"))

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './nmreval/src/resources/_ui/ptstab.ui' # Form implementation generated from reading ui file 'nmreval/src/resources/_ui/ptstab.ui'
# #
# Created by: PyQt5 UI code generator 5.15.10 # Created by: PyQt5 UI code generator 5.15.10
# #
@ -14,29 +14,50 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object): class Ui_Form(object):
def setupUi(self, Form): def setupUi(self, Form):
Form.setObjectName("Form") Form.setObjectName("Form")
Form.resize(316, 747) Form.resize(417, 746)
self.verticalLayout = QtWidgets.QVBoxLayout(Form) self.gridLayout = QtWidgets.QGridLayout(Form)
self.verticalLayout.setContentsMargins(3, 3, 3, 3) self.gridLayout.setObjectName("gridLayout")
self.verticalLayout.setObjectName("verticalLayout") self.label_2 = QtWidgets.QLabel(Form)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 0, 0, 1, 2)
self.peaktable = QtWidgets.QListWidget(Form) self.peaktable = QtWidgets.QListWidget(Form)
self.peaktable.setEditTriggers(QtWidgets.QAbstractItemView.DoubleClicked|QtWidgets.QAbstractItemView.EditKeyPressed) self.peaktable.setEditTriggers(QtWidgets.QAbstractItemView.DoubleClicked|QtWidgets.QAbstractItemView.EditKeyPressed)
self.peaktable.setObjectName("peaktable") self.peaktable.setObjectName("peaktable")
self.verticalLayout.addWidget(self.peaktable) self.gridLayout.addWidget(self.peaktable, 1, 0, 1, 2)
self.groupBox = QtWidgets.QGroupBox(Form) self.special_checkbox = QtWidgets.QCheckBox(Form)
self.groupBox.setObjectName("groupBox") self.special_checkbox.setObjectName("special_checkbox")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox) self.gridLayout.addWidget(self.special_checkbox, 3, 0, 1, 1)
self.horizontalLayout.setContentsMargins(3, 3, 3, 3) self.special_comboBox = QtWidgets.QComboBox(Form)
self.horizontalLayout.setSpacing(3) self.special_comboBox.setEnabled(False)
self.horizontalLayout.setObjectName("horizontalLayout") self.special_comboBox.setObjectName("special_comboBox")
self.left_pt = QtWidgets.QSpinBox(self.groupBox) self.special_comboBox.addItem("")
self.left_pt.setMaximum(999) self.special_comboBox.addItem("")
self.left_pt.setObjectName("left_pt") self.special_comboBox.addItem("")
self.horizontalLayout.addWidget(self.left_pt) self.special_comboBox.addItem("")
self.right_pt = QtWidgets.QSpinBox(self.groupBox) self.gridLayout.addWidget(self.special_comboBox, 3, 1, 1, 1)
self.right_pt.setMaximum(999) spacerItem = QtWidgets.QSpacerItem(20, 30, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.right_pt.setObjectName("right_pt") self.gridLayout.addItem(spacerItem, 4, 0, 1, 1)
self.horizontalLayout.addWidget(self.right_pt) self.label_3 = QtWidgets.QLabel(Form)
self.average_combobox = QtWidgets.QComboBox(self.groupBox) self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.left_limit = QtWidgets.QLineEdit(Form)
self.left_limit.setObjectName("left_limit")
self.horizontalLayout_2.addWidget(self.left_limit)
self.right_limit = QtWidgets.QLineEdit(Form)
self.right_limit.setObjectName("right_limit")
self.horizontalLayout_2.addWidget(self.right_limit)
self.limit_combobox = QtWidgets.QComboBox(Form)
self.limit_combobox.setObjectName("limit_combobox")
self.limit_combobox.addItem("")
self.limit_combobox.addItem("")
self.horizontalLayout_2.addWidget(self.limit_combobox)
self.gridLayout.addLayout(self.horizontalLayout_2, 5, 1, 1, 1)
self.label_5 = QtWidgets.QLabel(Form)
self.label_5.setObjectName("label_5")
self.gridLayout.addWidget(self.label_5, 6, 0, 1, 1)
self.average_combobox = QtWidgets.QComboBox(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
@ -47,90 +68,93 @@ class Ui_Form(object):
self.average_combobox.addItem("") self.average_combobox.addItem("")
self.average_combobox.addItem("") self.average_combobox.addItem("")
self.average_combobox.addItem("") self.average_combobox.addItem("")
self.horizontalLayout.addWidget(self.average_combobox) self.gridLayout.addWidget(self.average_combobox, 6, 1, 1, 1)
self.verticalLayout.addWidget(self.groupBox) self.label_4 = QtWidgets.QLabel(Form)
self.groupBox_2 = QtWidgets.QGroupBox(Form) self.label_4.setObjectName("label_4")
self.groupBox_2.setCheckable(True) self.gridLayout.addWidget(self.label_4, 7, 0, 1, 1)
self.groupBox_2.setChecked(False) self.horizontalLayout = QtWidgets.QHBoxLayout()
self.groupBox_2.setObjectName("groupBox_2") self.horizontalLayout.setObjectName("horizontalLayout")
self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.groupBox_2) self.xbutton = QtWidgets.QCheckBox(Form)
self.horizontalLayout_5.setContentsMargins(3, 3, 3, 3)
self.horizontalLayout_5.setSpacing(2)
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.special_comboBox = QtWidgets.QComboBox(self.groupBox_2)
self.special_comboBox.setObjectName("special_comboBox")
self.special_comboBox.addItem("")
self.special_comboBox.addItem("")
self.special_comboBox.addItem("")
self.special_comboBox.addItem("")
self.horizontalLayout_5.addWidget(self.special_comboBox)
self.verticalLayout.addWidget(self.groupBox_2)
self.groupBox_3 = QtWidgets.QGroupBox(Form)
self.groupBox_3.setObjectName("groupBox_3")
self.gridLayout = QtWidgets.QGridLayout(self.groupBox_3)
self.gridLayout.setContentsMargins(3, 3, 3, 3)
self.gridLayout.setSpacing(3)
self.gridLayout.setObjectName("gridLayout")
self.xbutton = QtWidgets.QCheckBox(self.groupBox_3)
self.xbutton.setObjectName("xbutton") self.xbutton.setObjectName("xbutton")
self.gridLayout.addWidget(self.xbutton, 0, 0, 1, 1) self.horizontalLayout.addWidget(self.xbutton)
self.ybutton = QtWidgets.QCheckBox(self.groupBox_3) self.ybutton = QtWidgets.QCheckBox(Form)
self.ybutton.setChecked(True) self.ybutton.setChecked(True)
self.ybutton.setObjectName("ybutton") self.ybutton.setObjectName("ybutton")
self.gridLayout.addWidget(self.ybutton, 0, 1, 1, 1) self.horizontalLayout.addWidget(self.ybutton)
self.graph_checkbox = QtWidgets.QCheckBox(self.groupBox_3) self.gridLayout.addLayout(self.horizontalLayout, 7, 1, 1, 1)
self.label = QtWidgets.QLabel(Form)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 8, 0, 1, 1)
self.group_box = QtWidgets.QComboBox(Form)
self.group_box.setObjectName("group_box")
self.group_box.addItem("")
self.group_box.addItem("")
self.gridLayout.addWidget(self.group_box, 8, 1, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.gridLayout.addItem(spacerItem1, 9, 0, 1, 1)
self.graph_checkbox = QtWidgets.QCheckBox(Form)
self.graph_checkbox.setChecked(True) self.graph_checkbox.setChecked(True)
self.graph_checkbox.setObjectName("graph_checkbox") self.graph_checkbox.setObjectName("graph_checkbox")
self.gridLayout.addWidget(self.graph_checkbox, 1, 0, 1, 1) self.gridLayout.addWidget(self.graph_checkbox, 10, 0, 1, 1)
self.graph_combobox = QtWidgets.QComboBox(self.groupBox_3) self.graph_combobox = QtWidgets.QComboBox(Form)
self.graph_combobox.setEnabled(False) self.graph_combobox.setEnabled(False)
self.graph_combobox.setObjectName("graph_combobox") self.graph_combobox.setObjectName("graph_combobox")
self.gridLayout.addWidget(self.graph_combobox, 1, 1, 1, 1) self.gridLayout.addWidget(self.graph_combobox, 10, 1, 1, 1)
self.verticalLayout.addWidget(self.groupBox_3) spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.gridLayout.addItem(spacerItem2, 12, 0, 1, 1)
self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout_2.setSpacing(2)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.okButton = QtWidgets.QPushButton(Form) self.okButton = QtWidgets.QPushButton(Form)
icon = QtGui.QIcon.fromTheme("dialog-ok") icon = QtGui.QIcon.fromTheme("dialog-ok")
self.okButton.setIcon(icon) self.okButton.setIcon(icon)
self.okButton.setObjectName("okButton") self.okButton.setObjectName("okButton")
self.horizontalLayout_2.addWidget(self.okButton) self.gridLayout.addWidget(self.okButton, 11, 0, 1, 2)
self.deleteButton = QtWidgets.QPushButton(Form) self.deleteButton = QtWidgets.QPushButton(Form)
icon = QtGui.QIcon.fromTheme("dialog-cancel") icon = QtGui.QIcon.fromTheme("dialog-cancel")
self.deleteButton.setIcon(icon) self.deleteButton.setIcon(icon)
self.deleteButton.setObjectName("deleteButton") self.deleteButton.setObjectName("deleteButton")
self.horizontalLayout_2.addWidget(self.deleteButton) self.gridLayout.addWidget(self.deleteButton, 2, 0, 1, 2)
self.verticalLayout.addLayout(self.horizontalLayout_2) self.label_2.setBuddy(self.peaktable)
self.label_5.setBuddy(self.average_combobox)
self.label_4.setBuddy(self.xbutton)
self.label.setBuddy(self.group_box)
self.retranslateUi(Form) self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Form.setTabOrder(self.peaktable, self.limit_combobox)
Form.setTabOrder(self.limit_combobox, self.average_combobox)
Form.setTabOrder(self.average_combobox, self.xbutton)
Form.setTabOrder(self.xbutton, self.ybutton)
Form.setTabOrder(self.ybutton, self.group_box)
Form.setTabOrder(self.group_box, self.graph_checkbox)
Form.setTabOrder(self.graph_checkbox, self.graph_combobox)
def retranslateUi(self, Form): def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form")) Form.setWindowTitle(_translate("Form", "Form"))
self.label_2.setText(_translate("Form", "Selected points and regions"))
self.peaktable.setToolTip(_translate("Form", "Edit by entering new value: \n" self.peaktable.setToolTip(_translate("Form", "Edit by entering new value: \n"
"Single number for points (e.g. 1e-6); \n" "Single number for points (e.g. 1e-6); \n"
"two numbers separated by space for regions (e.g. 1e-6 5e-6). \n" "two numbers separated by space for regions (e.g. 1e-6 5e-6). \n"
"Changing between regions and points is NOT possible")) "Changing between regions and points is NOT possible"))
self.groupBox.setTitle(_translate("Form", "Average (drop-down used for pts and regions)")) self.special_checkbox.setText(_translate("Form", "Use special value"))
self.left_pt.setSuffix(_translate("Form", " pts"))
self.left_pt.setPrefix(_translate("Form", "- "))
self.right_pt.setSuffix(_translate("Form", " pts"))
self.right_pt.setPrefix(_translate("Form", "+ "))
self.average_combobox.setItemText(0, _translate("Form", "Mean"))
self.average_combobox.setItemText(1, _translate("Form", "Sum"))
self.average_combobox.setItemText(2, _translate("Form", "Integral"))
self.average_combobox.setItemText(3, _translate("Form", "Std. deviation"))
self.groupBox_2.setTitle(_translate("Form", "Special value"))
self.special_comboBox.setToolTip(_translate("Form", "Automatic selection of respective points")) self.special_comboBox.setToolTip(_translate("Form", "Automatic selection of respective points"))
self.special_comboBox.setItemText(0, _translate("Form", "max(y)")) self.special_comboBox.setItemText(0, _translate("Form", "max(y)"))
self.special_comboBox.setItemText(1, _translate("Form", "max(abs(y))")) self.special_comboBox.setItemText(1, _translate("Form", "max(abs(y))"))
self.special_comboBox.setItemText(2, _translate("Form", "min(y)")) self.special_comboBox.setItemText(2, _translate("Form", "min(y)"))
self.special_comboBox.setItemText(3, _translate("Form", "min(abs(y))")) self.special_comboBox.setItemText(3, _translate("Form", "min(abs(y))"))
self.groupBox_3.setTitle(_translate("Form", "Result")) self.label_3.setText(_translate("Form", "Region around points"))
self.limit_combobox.setItemText(0, _translate("Form", "points"))
self.limit_combobox.setItemText(1, _translate("Form", "range"))
self.label_5.setText(_translate("Form", "Aggregation"))
self.average_combobox.setItemText(0, _translate("Form", "Mean"))
self.average_combobox.setItemText(1, _translate("Form", "Sum"))
self.average_combobox.setItemText(2, _translate("Form", "Integral"))
self.average_combobox.setItemText(3, _translate("Form", "Std. deviation"))
self.label_4.setText(_translate("Form", "New set based on"))
self.xbutton.setText(_translate("Form", "x")) self.xbutton.setText(_translate("Form", "x"))
self.ybutton.setText(_translate("Form", "y")) self.ybutton.setText(_translate("Form", "y"))
self.label.setText(_translate("Form", "Group by"))
self.group_box.setItemText(0, _translate("Form", "\"Group\" value"))
self.group_box.setItemText(1, _translate("Form", "x value"))
self.graph_checkbox.setText(_translate("Form", "New graph?")) self.graph_checkbox.setText(_translate("Form", "New graph?"))
self.okButton.setText(_translate("Form", "Apply")) self.okButton.setText(_translate("Form", "Apply"))
self.deleteButton.setText(_translate("Form", "Delete selected")) self.deleteButton.setText(_translate("Form", "Delete selection"))

View File

@ -1,6 +1,6 @@
import re import re
from ..Qt import QtCore, QtWidgets from ..Qt import QtCore, QtWidgets, QtGui
from .._py.ptstab import Ui_Form from .._py.ptstab import Ui_Form
from ..lib.pg_objects import LogInfiniteLine, RegionItem from ..lib.pg_objects import LogInfiniteLine, RegionItem
@ -27,15 +27,23 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
self._last_item = None self._last_item = None
self.connected_figure = '' self.connected_figure = ''
self._avg_modes = ['mean', 'sum', 'integral', 'std']
self._special_values = ['max', 'absmax', 'min', 'absmin']
self._group_modes = ['group', 'x']
self.okButton.clicked.connect(self.apply) self.okButton.clicked.connect(self.apply)
self.deleteButton.clicked.connect(self.remove_points) self.deleteButton.clicked.connect(self.remove_points)
self.peaktable.itemChanged.connect(self.editing_finished) self.peaktable.itemChanged.connect(self.editing_finished)
self.peaktable.itemDoubleClicked.connect(self.editing_started) self.peaktable.itemDoubleClicked.connect(self.editing_started)
self.left_limit.setValidator(QtGui.QDoubleValidator())
self.right_limit.setValidator(QtGui.QDoubleValidator())
def keyPressEvent(self, e): def keyPressEvent(self, e):
if e.key() == QtCore.Qt.Key_Delete: if e.key() == QtCore.Qt.Key.Key_Delete:
self.remove_points() self.remove_points()
elif e.key() == QtCore.Qt.Key_F2: elif e.key() == QtCore.Qt.Key.Key_F2:
self.editing_started() self.editing_started()
else: else:
super().keyPressEvent(e) super().keyPressEvent(e)
@ -102,21 +110,22 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def apply(self) -> dict: def apply(self) -> dict:
ret_dic = {'avg_range': [self.left_pt.value(), self.right_pt.value()], ret_dic = {
'avg_mode': {0: 'mean', 1: 'sum', 2: 'integral', 3: 'std'}[self.average_combobox.currentIndex()], 'avg_range': self.get_limits(),
'special': None, 'idx': None, 'avg_mode': self._avg_modes[self.average_combobox.currentIndex()],
'xy': (self.xbutton.isChecked(), self.ybutton.isChecked())} 'special': None,
'idx': None,
'xy': (self.xbutton.isChecked(), self.ybutton.isChecked()),
'groupby': self._group_modes[self.group_box.currentIndex()],
}
if self.groupBox_2.isChecked(): if self.special_checkbox.isChecked():
ret_dic['special'] = {0: 'max', 1: 'absmax', 2: 'min', 3: 'absmin'}[self.special_comboBox.currentIndex()] ret_dic['special'] = self._special_values[self.special_comboBox.currentIndex()]
if len(self.pts) != 0: if len(self.pts) != 0:
ret_dic['idx'] = self.pts ret_dic['idx'] = self.pts
if self.graph_checkbox.isChecked(): gid = self.graph_combobox.currentData() if not self.graph_checkbox.isChecked() else ''
gid = ''
else:
gid = self.graph_combobox.currentData()
self.points_selected.emit(ret_dic, gid) self.points_selected.emit(ret_dic, gid)
@ -200,3 +209,21 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
@QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged') @QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged')
def changed_state(self, checked): def changed_state(self, checked):
self.graph_combobox.setEnabled(checked != QtCore.Qt.CheckState.Checked) self.graph_combobox.setEnabled(checked != QtCore.Qt.CheckState.Checked)
@QtCore.pyqtSlot(int, name='on_special_checkbox_stateChanged')
def changed_special(self, checked: int):
self.graph_combobox.setEnabled(checked != QtCore.Qt.CheckState.Checked)
def get_limits(self) -> tuple[float, float, str]:
try:
left = float(self.left_limit.text())
except ValueError:
left = 0.
try:
right = float(self.right_limit.text())
except ValueError:
right = 0.
return left, right, self.limit_combobox.currentText()

View File

@ -539,6 +539,10 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
if self.graphic.plotItem.sceneBoundingRect().contains(evt.scenePos()) and evt.button() == 1: if self.graphic.plotItem.sceneBoundingRect().contains(evt.scenePos()) and evt.button() == 1:
pos = vb.mapSceneToView(evt.scenePos()) pos = vb.mapSceneToView(evt.scenePos())
if not _inside_range(pos.x(), pos.y(), vb.viewRange()):
return
_x, _y = pos.x(), pos.y() _x, _y = pos.x(), pos.y()
if self.log[0]: if self.log[0]:
@ -854,3 +858,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1]) self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1])
self._prev_colors = temp self._prev_colors = temp
def _inside_range(x: float, y: float, ranges: list[list[float]]) -> bool:
x_range, y_range = ranges
return (x_range[0] <= x <= x_range[1]) and (y_range[0] <= y <= y_range[1])

View File

@ -133,7 +133,7 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled(): if self.column_checkBox.isChecked() and self.line_spinBox.isEnabled():
header_line = self.reader.header[self.line_spinBox.value()-1] header_line = self.reader.header[self.line_spinBox.value()-1]
header_line = header_line.strip('\n\t\r, ') header_line = header_line.strip('\n\t\r, ')
header_line = re.sub(r'[\t ;,]+', ';', header_line) header_line = re.sub(r'[\t, ;]+(?!\w*})', ';', header_line)
self.ascii_table.setHorizontalHeaderLabels(header_line.split(';')) self.ascii_table.setHorizontalHeaderLabels(header_line.split(';'))

View File

@ -542,7 +542,9 @@ class UpperManagement(QtCore.QObject):
elif fit_limits[0] == 'in': elif fit_limits[0] == 'in':
inside = np.where((_x >= fit_limits[1][0]) & (_x <= fit_limits[1][1])) inside = np.where((_x >= fit_limits[1][0]) & (_x <= fit_limits[1][1]))
else: else:
inside = np.where((_x < fit_limits[1][0]) | (_x > fit_limits[1][1])) x_lim, _ = self.graphs[self.current_graph].ranges
inside_graph = (_x >= x_lim[0]) & (_x <= x_lim[1])
inside = np.where(((_x < fit_limits[1][0]) | (_x > fit_limits[1][1])) & inside_graph)
try: try:
if isinstance(we, str): if isinstance(we, str):
@ -791,16 +793,27 @@ class UpperManagement(QtCore.QObject):
_active = self.graphs[self.current_graph].active _active = self.graphs[self.current_graph].active
new_datasets = {} new_datasets = {}
groupby = params.pop('groupby')
for sid in _active: for sid in _active:
data_i = self.data[sid] data_i = self.data[sid]
if data_i.group not in new_datasets:
new_datasets[data_i.group] = [], []
new_x_axis, _temp = new_datasets[data_i.group]
pts = data_i.points(params) pts = data_i.points(params)
if pts:
new_x_axis.append(data_i.value) if groupby == 'group':
_temp.append(pts) if data_i.group not in new_datasets:
new_datasets[data_i.group] = [], []
new_x_axis, _temp = new_datasets[data_i.group]
if pts:
new_x_axis.append(data_i.value)
_temp.append(pts)
else:
for (_x, _y, _yerr) in pts:
if _x not in new_datasets:
new_datasets[_x] = [], []
new_x_axis, _temp = new_datasets[_x]
new_x_axis.append(data_i.value)
_temp.append([[_x, _y, _yerr]])
key_list = [] key_list = []
for label, (new_x_axis, _temp) in new_datasets.items(): for label, (new_x_axis, _temp) in new_datasets.items():

View File

@ -273,9 +273,14 @@ class Points:
def length(self): def length(self):
return len(self._x) return len(self._x)
def points(self, idx: list = None, special: str = None, def points(
avg_range: tuple[int, int] = (0, 0), avg_mode: str = 'mean', self,
pts: list = None) -> list[tuple]: idx: list = None,
special: str = None,
avg_range: tuple[int, int] = (0, 0),
avg_mode: str = 'mean',
pts: list = None,
) -> list[tuple]:
""" """
Return (x, y) values at specified positions. Return (x, y) values at specified positions.

View File

@ -49,7 +49,7 @@ class AsciiReader:
with self.fname.open('r') as f: with self.fname.open('r') as f:
for i, line in enumerate(islice(f, len(self.header)+len(self.lines), num_lines)): for i, line in enumerate(islice(f, len(self.header)+len(self.lines), num_lines)):
line = line.strip('\n\t\r, ') line = line.strip('\n\t\r, ')
line = re.sub(r'[\t ;,]+', ';', line) line = re.sub(r'[\t, ;]+(?!\w*})', ';', line)
line = line.split(';') line = line.split(';')
try: try:
@ -146,10 +146,11 @@ class AsciiReader:
raw_data = raw_data.reshape((1, *raw_data.shape)) raw_data = raw_data.reshape((1, *raw_data.shape))
if len(x) == 0 or raw_data.shape[2] == 1: if len(x) == 0 or raw_data.shape[2] == 1:
_temp = np.zeros((raw_data.shape[0], raw_data.shape[1], raw_data.shape[2]+1)) raw_data = raw_data.reshape(raw_data.shape[0], raw_data.shape[2], raw_data.shape[1])
_temp[:, :, 0] = np.arange(raw_data.shape[1]) # _temp = np.zeros((raw_data.shape[0], raw_data.shape[2], raw_data.shape[1]))
_temp[:, :, 1:] = raw_data # _temp[:, :, 0] = np.arange(raw_data.shape[1])
raw_data = _temp # _temp[:, :, 1:] = raw_data
# raw_data = _temp
if y: if y:
y = [i+1 for i in y] y = [i+1 for i in y]

View File

@ -203,6 +203,31 @@ class Sinc:
return c * np.sinc(((x-x0)/w)/np.pi) return c * np.sinc(((x-x0)/w)/np.pi)
class Sigmoid:
type = 'Basic'
name = 'Sigmoid'
equation = 'C / [1 + exp(-a * (x - x_{0})] + y_{0}'
params = ['C', 'a', 'x_{0}', 'y_{0}']
@staticmethod
def func(x, c, a, x0, y0):
"""
Sigmoid function
.. math::
y = C / [1 + exp(-a * (x - x_0))] + y_0
Args:
x (array_like): Input values
c (float): Prefactor
a (float): Steepness of the sigmoid
x0 (float): x position of the sigmoid's midpoint
y0 (float): y position of the sigmoid's midpoint
"""
return c / (1 + np.exp(-a * (x - x0))) + y0
class Sine: class Sine:
""" """
Wavy sine function Wavy sine function

View File

@ -116,7 +116,7 @@ class Peschier:
name = 'Diffusion + Cross-Relaxation' name = 'Diffusion + Cross-Relaxation'
type = 'Diffusion' type = 'Diffusion'
equation = r'Diffusion with cross-relax f(ast) \rightarrow s(low)' equation = r'Diffusion with cross-relax f(ast) \rightarrow s(low)'
params = ['M_{0}', 'D', 'T_{1,f}', 'T_{1,s}', 'k', 'p_{f}', 't_{ev}', 'g'] params = ['M_{0}', 'D', 'T_{1f}', 'T_{1s}', 'k', 'p_{f}', 't_{ev}', 'g']
bounds = [(0, None), (0, None), (0, None), (0, None), (0, None), (0, None)] bounds = [(0, None), (0, None), (0, None), (0, None), (0, None), (0, None)]
choices = [(r'\gamma', 'nucleus', gamma)] choices = [(r'\gamma', 'nucleus', gamma)]

View File

@ -75,7 +75,7 @@ class TwoSatRecAbsolute:
type = 'Relaxation' type = 'Relaxation'
name = 'Two-step relaxation (abs. int)' name = 'Two-step relaxation (abs. int)'
equation = r'M_{0} + \Sigma \DeltaM_{i}(1-exp(-(x/T_{1,i})^{\beta_{i}}))' equation = r'M_{0} + \Sigma \DeltaM_{i}(1-exp(-(x/T_{1,i})^{\beta_{i}}))'
params = [r'\DeltaM_{1}', 'T_{1,1}', r'\beta_{1}', r'\DeltaM_{2}', 'T_{1,2}', r'\beta_{2}', 'M_{0}'] params = [r'\DeltaM_{1}', 'T_{11}', r'\beta_{1}', r'\DeltaM_{2}', 'T_{12}', r'\beta_{2}', 'M_{0}']
choices = [('Type', 'is_inv', {'Saturation': False, 'Inversion': True})] choices = [('Type', 'is_inv', {'Saturation': False, 'Inversion': True})]
bounds = [(0, None), (0, None), (0, 1), (0, None), (0, None), (0, 1), (None, None)] bounds = [(0, None), (0, None), (0, 1), (0, None), (0, None), (0, 1), (None, None)]
@ -92,7 +92,7 @@ class TwoSatRecRelative:
name = 'Two-step relaxation (rel. int)' name = 'Two-step relaxation (rel. int)'
equation = r'M_{0} + \DeltaM[R(1-exp(-(x/T_{1,1})^{\beta_{1}})) + \n'\ equation = r'M_{0} + \DeltaM[R(1-exp(-(x/T_{1,1})^{\beta_{1}})) + \n'\
r'(1-R)(1-exp(-(x/T_{1,2})^{\beta_{2}}))]' r'(1-R)(1-exp(-(x/T_{1,2})^{\beta_{2}}))]'
params = [r'\DeltaM', 'M_{0}', 'T_{1,1}', r'\beta_{1}', 'T_{1,2}', r'\beta_{2}', 'R'] params = [r'\DeltaM', 'M_{0}', 'T_{11}', r'\beta_{1}', 'T_{12}', r'\beta_{2}', 'R']
choices = [('Type', 'kind', {'Saturation': 'sat', 'Inversion': 'inv'})] choices = [('Type', 'kind', {'Saturation': 'sat', 'Inversion': 'inv'})]
bounds = [(0, None), (None, None), (0, None), (0, 1), (0, None), (0, 1), (0, 1)] bounds = [(0, None), (None, None), (0, None), (0, 1), (0, None), (0, 1), (0, 1)]

View File

@ -1,19 +1,31 @@
from __future__ import annotations
import numpy as np import numpy as np
from scipy import special as special from scipy import special as special
from ..utils import kB from ..utils import kB
class Weight2Phase: class Weight:
type = 'Line shape' type = 'Line shape'
name = 'Weighting factor' name = 'Weighting factor'
equation = r'A*[0.5 + 0.5 erf[(x-T_{0})/\DeltaT]] + A_{0}' equation = r'A * [0.5 \pm 0.5 erf[(x-T_{0})/\DeltaT]] + A_{0}'
params = ['T_{0}', r'\DeltaT', 'A', 'A_{0}'] params = ['T_{0}', r'\DeltaT', 'A', 'A_{0}']
choices = [('Direction', 'sign', {'increase': '+', 'decrease': '-'})]
bounds = [(0, None), (0, None), (None, None), (None, None)] bounds = [(0, None), (0, None), (None, None), (None, None)]
@staticmethod @staticmethod
def func(x, t0, dt, amp, off): def func(x: np.ndarray | float, t0: float, dt: float, amp: float, off: float, sign: str = '+') -> np.ndarray | float:
return amp*(0.5 + 0.5*special.erf((x-t0)/dt)) + off if sign not in '+-':
raise ValueError(f"`value` is `+` or `-`, not {sign}")
error_func = 1
if sign == '+':
error_func += special.erf((x-t0)/dt)
else:
error_func -= special.erf((x - t0) / dt)
return amp * error_func / 2. + off
class HendricksonBray: class HendricksonBray:
@ -24,5 +36,5 @@ class HendricksonBray:
bounds = [(0, None)] * 4 bounds = [(0, None)] * 4
@staticmethod @staticmethod
def func(x, a, b, e, w0): def func(x: np.ndarray | float, a: float, b: float, e: float, w0: float) -> np.ndarray | float:
return a*b / (b + (a-b)*np.exp(-e/kB/x)) + w0 return a*b / (b + (a-b)*np.exp(-e/kB/x)) + w0

View File

@ -3,11 +3,42 @@ try:
from scipy.integrate import simpson from scipy.integrate import simpson
except ImportError: except ImportError:
from scipy.integrate import simps as simpson from scipy.integrate import simps as simpson
from numpy import pi
from ..math.orientations import zcw_spherical as crystallites from ..math.orientations import zcw_spherical as crystallites
__all__ = ['CSA', 'Pake', 'SecCentralLine']
def _make_broadening(x: np.ndarray, sigma: float, mode: str):
dx = x[1] - x[0]
_x = np.arange(len(x)) * dx
_x -= 0.5 * _x[-1]
if mode == 'l':
apd = 2 * sigma / (4*_x**2 + sigma**2) / np.pi
else:
ln2 = np.log(2)
apd = np.exp(-4*ln2 * (_x/sigma)**2) * 2 * np.sqrt(ln2/np.pi) / sigma
return apd
def _make_bins(x: np.ndarray) -> np.ndarray:
bins = 0.5 * (x[1:] + x[:-1])
return np.r_[0.5 * (-x[1] + 3 * x[0]), bins, 0.5 * (3 * x[-1] - x[-2])]
def _make_x(x: np.ndarray) -> tuple[np.ndarray, np.ndarray]:
_x = x
dx = x[1:] - x[:-1]
dx = np.min(dx)
width = x[-1] - x[0]
_x = np.arange(width/dx - 1) * dx + x[0]
bins = (_x[1:] + _x[:-1]) / 2
bins = np.r_[_x[0]-dx/2, bins, _x[-1] + dx/2]
return _x, bins
class Pake: class Pake:
type = 'Spectrum' type = 'Spectrum'
name = 'Pake' name = 'Pake'
@ -17,38 +48,39 @@ class Pake:
choices = [('Broadening', 'broad', {'Gaussian': 'g', 'Lorentzian': 'l'})] choices = [('Broadening', 'broad', {'Gaussian': 'g', 'Lorentzian': 'l'})]
@staticmethod @staticmethod
def func(x, c, delta, eta, sigma, t_pulse, broad='g'): def func(
x: np.ndarray,
c: float,
delta: float,
eta: float,
sigma: float,
t_pulse: float,
broad: str = 'g',
) -> np.ndarray:
a, b, _ = crystallites(100000) a, b, _ = crystallites(100000)
bins = 0.5 * (x[1:] + x[:-1])
bins = np.r_[0.5*(3*x[0]-x[1]), bins, 0.5*(3*x[-1]-x[-2])]
omega = delta * 0.5 * (3*np.cos(b)**2 - 1 - eta * np.sin(b)**2 * np.cos(2*a)) omega = delta * 0.5 * (3*np.cos(b)**2 - 1 - eta * np.sin(b)**2 * np.cos(2*a))
x_used, bins = _make_x(x)
s_left = np.histogram(omega, bins=bins)[0] s_left = np.histogram(omega, bins=bins)[0]
s_right = np.histogram(-omega, bins=bins)[0] s_right = np.histogram(-omega, bins=bins)[0]
s = s_left + s_right s = s_left + s_right
if sigma != 0: if sigma != 0:
_x = np.arange(len(x))*(x[1]-x[0]) apd = _make_broadening(x_used, sigma, broad)
_x -= 0.5*_x[-1]
if broad == 'l':
apd = 2 * sigma / (4 * _x**2 + sigma**2) / pi
else:
apd = np.exp(-4 * np.log(2) * (_x/sigma)**2) * 2 * np.sqrt(np.log(2) / pi) / sigma
ret_val = np.convolve(s, apd, mode='same') ret_val = np.convolve(s, apd, mode='same')
else: else:
ret_val = s ret_val = s
omega_1 = pi/2/t_pulse omega_1 = np.pi/2/t_pulse
attn = omega_1 * np.sin(t_pulse*np.sqrt(omega_1**2+0.5*(2*pi*x)**2)) / \ attn = omega_1 * np.sin(t_pulse*np.sqrt(omega_1**2 + 0.5*(2*np.pi*x_used)**2)) / np.sqrt(omega_1**2 + (np.pi*x_used)**2)
np.sqrt(omega_1**2+(np.pi*x)**2)
ret_val *= attn ret_val *= attn
ret_val /= simpson(y=ret_val, x=x_used)
return c * ret_val / simpson(ret_val, x) if x_used.size == x.size:
return c * ret_val
else:
return c * np.interp(x=x, xp=x_used, fp=ret_val)
class CSA: class CSA:
@ -60,28 +92,29 @@ class CSA:
choices = [('Broadening', 'broad', {'Gaussian': 'g', 'Lorentzian': 'l'})] choices = [('Broadening', 'broad', {'Gaussian': 'g', 'Lorentzian': 'l'})]
@staticmethod @staticmethod
def func(x, c, delta, eta, w_iso, sigma, broad='g'): def func(
x: np.ndarray,
c: float,
delta: float,
eta: float,
w_iso: float,
sigma: float,
broad: str = 'g',
) -> np.ndarray:
a, b, _ = crystallites(100000) a, b, _ = crystallites(100000)
bins = 0.5 * (x[1:] + x[:-1])
bins = np.r_[0.5*(-x[1] + 3*x[0]), bins, 0.5*(3*x[-1] - x[-2])]
omega = w_iso + delta * 0.5 * (3*np.cos(b)**2 - 1 - eta * np.sin(b)**2 * np.cos(2*a)) omega = w_iso + delta * 0.5 * (3*np.cos(b)**2 - 1 - eta * np.sin(b)**2 * np.cos(2*a))
s_left = np.histogram(omega, bins=bins)[0] s = np.histogram(omega, bins=_make_bins(x))[0]
s = s_left
if sigma != 0: if sigma != 0:
_x = np.arange(len(x)) * (x[1] - x[0]) print(len(s))
_x -= 0.5 * _x[-1] apd = _make_broadening(x, sigma, broad)
if broad == 'l':
apd = 2 * sigma / (4*_x**2 + sigma**2) / pi
else:
apd = np.exp(-4 * np.log(2) * (_x / sigma) ** 2) * 2 * np.sqrt(np.log(2) / pi) / sigma
ret_val = np.convolve(s, apd, mode='same') ret_val = np.convolve(s, apd, mode='same')
else: else:
ret_val = s ret_val = s
return c * ret_val / simpson(ret_val, x) return c * ret_val / simpson(y=ret_val, x=x)
class SecCentralLine: class SecCentralLine:
@ -94,10 +127,18 @@ class SecCentralLine:
('Broadening', 'broad', {'Gaussian': 'g', 'Lorentzian': 'l'})] ('Broadening', 'broad', {'Gaussian': 'g', 'Lorentzian': 'l'})]
@staticmethod @staticmethod
def func(x, c, cq, eta, f_iso, gb, f_l, spin=2.5, broad='g'): def func(
x: np.ndarray,
c: float,
cq: float,
eta: float,
f_iso: float,
gb: float,
f_l: float,
spin: float = 2.5,
broad: str = 'g',
) -> np.ndarray:
a, b, _ = crystallites(200000) a, b, _ = crystallites(200000)
bins = 0.5 * (x[1:] + x[:-1])
bins = np.r_[0.5*(-x[1] + 3*x[0]), bins, 0.5*(3*x[-1] - x[-2])]
# coupling constant # coupling constant
omega_q = 2 * np.pi * cq / (2*spin*(2*spin-1)) omega_q = 2 * np.pi * cq / (2*spin*(2*spin-1))
@ -116,17 +157,12 @@ class SecCentralLine:
orient += prefactor_c orient += prefactor_c
omega = 2*np.pi*f_iso + coupling * orient omega = 2*np.pi*f_iso + coupling * orient
s = np.histogram(omega / (2*np.pi), bins=bins)[0] s = np.histogram(omega / (2*np.pi), bins=_make_bins(x))[0]
if gb != 0: if gb != 0:
_x = np.arange(len(x)) * (x[1]-x[0]) apd = _make_broadening(x, gb, broad)
_x -= 0.5*_x[-1]
if broad == 'l':
apd = 2*gb / (4*_x**2 + gb**2) / np.pi
else:
apd = np.exp(-4*np.log(2) * (_x/gb)**2) * 2 * np.sqrt(np.log(2)/np.pi) / gb
ret_val = np.convolve(s, apd, mode='same') ret_val = np.convolve(s, apd, mode='same')
else: else:
ret_val = s ret_val = s
return c * ret_val / simpson(ret_val, x) return c * ret_val / simpson(y=ret_val, x=x)

View File

@ -336,7 +336,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Token:&lt;br/&gt;[abc]: Matches any of a, b, or c&lt;br/&gt;[a-z]: Matches any digit in the range a-z&lt;br/&gt;\d: Matches any digit in the range 0-9 (equal to [0-9}&lt;/p&gt;&lt;p&gt;Quantifiers:&lt;br/&gt;a*: 0 or more of a&lt;br/&gt;a*: 1 or more of a&lt;br/&gt;a?: 0 or 1 of a&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Token:&lt;br/&gt;[abc]: Matches any of a, b, or c&lt;br/&gt;[a-z]: Matches any digit in the range a-z&lt;br/&gt;\d: Matches any digit in the range 0-9 (equal to [0-9}&lt;/p&gt;&lt;p&gt;Quantifiers:&lt;br/&gt;a+: 0 or more of a&lt;br/&gt;a*: 1 or more of a&lt;br/&gt;a?: 0 or 1 of a&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -6,27 +6,25 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>316</width> <width>417</width>
<height>747</height> <height>746</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <item row="0" column="0" colspan="2">
<number>3</number> <widget class="QLabel" name="label_2">
</property> <property name="text">
<property name="topMargin"> <string>Selected points and regions</string>
<number>3</number> </property>
</property> <property name="buddy">
<property name="rightMargin"> <cstring>peaktable</cstring>
<number>3</number> </property>
</property> </widget>
<property name="bottomMargin"> </item>
<number>3</number> <item row="1" column="0" colspan="2">
</property>
<item>
<widget class="QListWidget" name="peaktable"> <widget class="QListWidget" name="peaktable">
<property name="toolTip"> <property name="toolTip">
<string>Edit by entering new value: <string>Edit by entering new value:
@ -39,235 +37,268 @@ Changing between regions and points is NOT possible</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="3" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QCheckBox" name="special_checkbox">
<property name="title"> <property name="text">
<string>Average (drop-down used for pts and regions)</string> <string>Use special value</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QSpinBox" name="left_pt">
<property name="suffix">
<string> pts</string>
</property>
<property name="prefix">
<string>- </string>
</property>
<property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="right_pt">
<property name="suffix">
<string> pts</string>
</property>
<property name="prefix">
<string>+ </string>
</property>
<property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="average_combobox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Mean</string>
</property>
</item>
<item>
<property name="text">
<string>Sum</string>
</property>
</item>
<item>
<property name="text">
<string>Integral</string>
</property>
</item>
<item>
<property name="text">
<string>Std. deviation</string>
</property>
</item>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item row="3" column="1">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QComboBox" name="special_comboBox">
<property name="title"> <property name="enabled">
<string>Special value</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <property name="toolTip">
<property name="spacing"> <string>Automatic selection of respective points</string>
<number>2</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QComboBox" name="special_comboBox">
<property name="toolTip">
<string>Automatic selection of respective points</string>
</property>
<item>
<property name="text">
<string>max(y)</string>
</property>
</item>
<item>
<property name="text">
<string>max(abs(y))</string>
</property>
</item>
<item>
<property name="text">
<string>min(y)</string>
</property>
</item>
<item>
<property name="text">
<string>min(abs(y))</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Result</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="xbutton">
<property name="text">
<string>x</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="ybutton">
<property name="text">
<string>y</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="graph_checkbox">
<property name="text">
<string>New graph?</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="graph_combobox">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<property name="topMargin">
<number>0</number>
</property> </property>
<item> <item>
<widget class="QPushButton" name="okButton"> <property name="text">
<string>max(y)</string>
</property>
</item>
<item>
<property name="text">
<string>max(abs(y))</string>
</property>
</item>
<item>
<property name="text">
<string>min(y)</string>
</property>
</item>
<item>
<property name="text">
<string>min(abs(y))</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Region around points</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="left_limit"/>
</item>
<item>
<widget class="QLineEdit" name="right_limit"/>
</item>
<item>
<widget class="QComboBox" name="limit_combobox">
<item>
<property name="text">
<string>points</string>
</property>
</item>
<item>
<property name="text">
<string>range</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Aggregation</string>
</property>
<property name="buddy">
<cstring>average_combobox</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="average_combobox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Mean</string>
</property>
</item>
<item>
<property name="text">
<string>Sum</string>
</property>
</item>
<item>
<property name="text">
<string>Integral</string>
</property>
</item>
<item>
<property name="text">
<string>Std. deviation</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>New set based on</string>
</property>
<property name="buddy">
<cstring>xbutton</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="xbutton">
<property name="text"> <property name="text">
<string>Apply</string> <string>x</string>
</property>
<property name="icon">
<iconset theme="dialog-ok">
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="deleteButton"> <widget class="QCheckBox" name="ybutton">
<property name="text"> <property name="text">
<string>Delete selected</string> <string>y</string>
</property> </property>
<property name="icon"> <property name="checked">
<iconset theme="dialog-cancel"> <bool>true</bool>
<normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="8" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Group by</string>
</property>
<property name="buddy">
<cstring>group_box</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="group_box">
<item>
<property name="text">
<string>&quot;Group&quot; value</string>
</property>
</item>
<item>
<property name="text">
<string>x value</string>
</property>
</item>
</widget>
</item>
<item row="9" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="graph_checkbox">
<property name="text">
<string>New graph?</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QComboBox" name="graph_combobox">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="12" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="11" column="0" colspan="2">
<widget class="QPushButton" name="okButton">
<property name="text">
<string>Apply</string>
</property>
<property name="icon">
<iconset theme="dialog-ok">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QPushButton" name="deleteButton">
<property name="text">
<string>Delete selection</string>
</property>
<property name="icon">
<iconset theme="dialog-cancel">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<tabstops>
<tabstop>peaktable</tabstop>
<tabstop>limit_combobox</tabstop>
<tabstop>average_combobox</tabstop>
<tabstop>xbutton</tabstop>
<tabstop>ybutton</tabstop>
<tabstop>group_box</tabstop>
<tabstop>graph_checkbox</tabstop>
<tabstop>graph_combobox</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>