bugfixes-022024 #211

Merged
dominik merged 3 commits from bugfixes-022024 into master 2024-01-11 12:39:04 +00:00
Showing only changes of commit 70fb075ad7 - Show all commits

View File

@ -229,20 +229,16 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog):
self.fit_plot.enableAutoRange()
def _plot_residuals(self, idx: str = None):
print(idx)
if idx is None or isinstance(idx, QtWidgets.QAbstractButton):
idx = self.sets_comboBox.currentData(QtCore.Qt.ItemDataRole.UserRole)
res = self._results[idx]
if res.iscomplex:
if self.rel_dev_button.isChecked():
print('rel')
self.resid_graph.setData(x=res.x_data, y=res.residual.real/np_abs(res.y_data.real))
print(res.y_data.imag)
if all(np_isfinite(res.y_data.imag)):
self.resid_graph_imag.setData(x=res.x_data, y=res.residual.imag/np_abs(res.y_data.imag))
else:
print('abs')
self.resid_graph.setData(x=res.x_data, y=res.residual.real)
self.resid_graph_imag.setData(x=res.x_data, y=res.residual.imag)