Rename fit_result -> fit
This commit is contained in:
@@ -211,14 +211,14 @@ def create():
|
|||||||
|
|
||||||
peak_pos_textinput_lock = False
|
peak_pos_textinput_lock = False
|
||||||
|
|
||||||
fit_result = scan.get("fit_result")
|
fit = scan.get("fit")
|
||||||
if fit_result is not None:
|
if fit is not None:
|
||||||
comps = fit_result.eval_components()
|
comps = fit.eval_components()
|
||||||
plot_gauss_source.data.update(x=x, y=comps["f1_"])
|
plot_gauss_source.data.update(x=x, y=comps["f1_"])
|
||||||
plot_bkg_source.data.update(x=x, y=comps["f0_"])
|
plot_bkg_source.data.update(x=x, y=comps["f0_"])
|
||||||
fit_output_textinput.value = fit_result.fit_report()
|
fit_output_textinput.value = fit.fit_report()
|
||||||
|
|
||||||
# numfit_min, numfit_max = fit_result["numfit"]
|
# numfit_min, numfit_max = fit["numfit"]
|
||||||
# if numfit_min is None:
|
# if numfit_min is None:
|
||||||
# numfit_min_span.location = None
|
# numfit_min_span.location = None
|
||||||
# else:
|
# else:
|
||||||
|
|||||||
@@ -226,14 +226,14 @@ def create():
|
|||||||
|
|
||||||
peak_pos_textinput_lock = False
|
peak_pos_textinput_lock = False
|
||||||
|
|
||||||
fit_result = scan.get("fit_result")
|
fit = scan.get("fit")
|
||||||
if fit_result is not None:
|
if fit is not None:
|
||||||
comps = fit_result.eval_components()
|
comps = fit.eval_components()
|
||||||
plot_gauss_source.data.update(x=x, y=comps["f1_"])
|
plot_gauss_source.data.update(x=x, y=comps["f1_"])
|
||||||
plot_bkg_source.data.update(x=x, y=comps["f0_"])
|
plot_bkg_source.data.update(x=x, y=comps["f0_"])
|
||||||
fit_output_textinput.value = fit_result.fit_report()
|
fit_output_textinput.value = fit.fit_report()
|
||||||
|
|
||||||
# numfit_min, numfit_max = fit_result["numfit"]
|
# numfit_min, numfit_max = fit["numfit"]
|
||||||
# if numfit_min is None:
|
# if numfit_min is None:
|
||||||
# numfit_min_span.location = None
|
# numfit_min_span.location = None
|
||||||
# else:
|
# else:
|
||||||
|
|||||||
@@ -121,4 +121,4 @@ def fit_scan(scan, model_dict):
|
|||||||
else:
|
else:
|
||||||
model += _model
|
model += _model
|
||||||
|
|
||||||
scan["fit_result"] = model.fit(y_fit, x=x_fit)
|
scan["fit"] = model.fit(y_fit, x=x_fit)
|
||||||
|
|||||||
Reference in New Issue
Block a user