From 5b146433f3bef34c42e8d2fa0d9324510caeefe0 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Fri, 16 Jun 2023 20:25:24 +0200 Subject: [PATCH] binning --- src/gui_qt/data/container.py | 1 - src/gui_qt/dsc/glass_dialog.py | 16 ++++++++++------ src/gui_qt/main/management.py | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/gui_qt/data/container.py b/src/gui_qt/data/container.py index 667f577..ec4563f 100644 --- a/src/gui_qt/data/container.py +++ b/src/gui_qt/data/container.py @@ -483,7 +483,6 @@ class ExperimentContainer(QtCore.QObject): def binning(self, digits: int): new_data = self.copy(full=True) new_data.data = self._data.binning(decimals=digits) - print(new_data.x) return new_data diff --git a/src/gui_qt/dsc/glass_dialog.py b/src/gui_qt/dsc/glass_dialog.py index 8f79cb1..1ce2242 100644 --- a/src/gui_qt/dsc/glass_dialog.py +++ b/src/gui_qt/dsc/glass_dialog.py @@ -1,3 +1,4 @@ +import pprint from itertools import cycle from numpy import array, nan, isnan @@ -259,9 +260,12 @@ class TgCalculator(QtWidgets.QDialog, Ui_Dialog): graph_id = self.new_graph_tau_combo.currentData() print(graph_id) - print(self._tg_value) - print(self._hodge) - for v in self._plots.values(): - # (data_plot, tg_plot, glass, liquid, tangent, fictive_cp, tnmh_fit) - print(v.getData()) - print(self._plots) + + ret_dic = {} + + for key, tg in self._tg_value.items(): + plts = self._plots[key] + ret_dic[key] = (tg, plts[1].getData(), plts[2].getData(), plts[3].getData(), plts[4].getData()) + + pprint.pprint(ret_dic) + pprint.pprint(self._hodge) diff --git a/src/gui_qt/main/management.py b/src/gui_qt/main/management.py index f4b13c6..44b0693 100644 --- a/src/gui_qt/main/management.py +++ b/src/gui_qt/main/management.py @@ -773,7 +773,7 @@ class UpperManagement(QtCore.QObject): key = self.add(self.data[sid].binning(digits=digits)) new_data.append(key) - self.newData.emit(new_data, '') + self.newData.emit(new_data, self.current_graph) @QtCore.pyqtSlot(int, dict) def smooth_data(self, npoints, param_kwargs):