add binning
This commit is contained in:
@ -25,6 +25,7 @@ from ..io.filedialog import *
|
||||
from ..lib import get_icon, make_action_icons
|
||||
from ..lib.pg_objects import RegionItem
|
||||
from ..lib.starter import make_starter
|
||||
from ..math.binning import BinningWindow
|
||||
from ..math.evaluation import QEvalDialog
|
||||
from ..math.interpol import InterpolDialog
|
||||
from ..math.mean_dialog import QMeanTimes
|
||||
@ -696,6 +697,14 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
|
||||
|
||||
self.eval.exec()
|
||||
|
||||
@QtCore.pyqtSlot(name='on_actionBinning_triggered')
|
||||
def open_binning(self):
|
||||
dialog = BinningWindow(self)
|
||||
res = dialog.exec()
|
||||
if res:
|
||||
digits = dialog.spinbox.value()
|
||||
self.management.binning(digits)
|
||||
|
||||
@QtCore.pyqtSlot(name='on_actionDerivation_triggered')
|
||||
# @QtCore.pyqtSlot(name='on_actionIntegration_triggered')
|
||||
@QtCore.pyqtSlot(name='on_actionFilon_triggered')
|
||||
|
@ -766,6 +766,15 @@ class UpperManagement(QtCore.QObject):
|
||||
|
||||
self.newData.emit(new_key, dest_graph)
|
||||
|
||||
def binning(self, digits: int):
|
||||
_active = self.graphs[self.current_graph].active
|
||||
new_data = []
|
||||
for sid in _active:
|
||||
key = self.add(self.data[sid].binning(digits=digits))
|
||||
new_data.append(key)
|
||||
|
||||
self.newData.emit(new_data, '')
|
||||
|
||||
@QtCore.pyqtSlot(int, dict)
|
||||
def smooth_data(self, npoints, param_kwargs):
|
||||
_active = self.graphs[self.current_graph].active
|
||||
|
Reference in New Issue
Block a user