forked from IPKM/nmreval
Parameter in preview
This commit is contained in:
parent
bd1a227e4c
commit
1d22f22901
@ -237,7 +237,7 @@ class QFitParameterWidget(QtWidgets.QWidget, Ui_FormFit):
|
||||
|
||||
for i, (p_i, g) in enumerate(zip(parameter, self.global_parameter)):
|
||||
if isinstance(g, FitModelWidget):
|
||||
if p_i is None:
|
||||
if (p_i is None) and (not is_global[i]):
|
||||
# set has no oen value
|
||||
p.append(param_general[i].copy())
|
||||
else:
|
||||
|
@ -9,6 +9,7 @@ import numpy as np
|
||||
from pyqtgraph import mkPen
|
||||
|
||||
from nmreval.fit._meta import MultiModel, ModelFactory
|
||||
from nmreval.fit.data import Data
|
||||
from nmreval.fit.model import Model
|
||||
from nmreval.fit.result import FitResult
|
||||
|
||||
@ -419,20 +420,14 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
|
||||
self.preview_lines = []
|
||||
|
||||
for k, model in models_parameters.items():
|
||||
f = model['func']
|
||||
f = Model(model['func'])
|
||||
is_complex = self._complex[k]
|
||||
|
||||
parameters = model['parameter']
|
||||
parameters = model['data_parameter']
|
||||
color = model['color']
|
||||
|
||||
seen_parameter = []
|
||||
|
||||
for p, kwargs in parameters.values():
|
||||
if (p, kwargs) in seen_parameter:
|
||||
# plot only previews with different parameter
|
||||
continue
|
||||
|
||||
seen_parameter.append((p, kwargs))
|
||||
print(pp.value for pp in p)
|
||||
|
||||
if is_complex is not None:
|
||||
y = f.func(x, *p, complex_mode=is_complex, **kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user