Add vertical spans for integration borders
This commit is contained in:
parent
cf8f19f6d9
commit
db4aabe892
@ -23,6 +23,7 @@ from bokeh.models import (
|
||||
RadioButtonGroup,
|
||||
Select,
|
||||
Spacer,
|
||||
Span,
|
||||
Spinner,
|
||||
TableColumn,
|
||||
TextAreaInput,
|
||||
@ -153,10 +154,14 @@ def create():
|
||||
(params["g_amp"].value - fit["int_area"].n) / params["g_amp"].value,
|
||||
)
|
||||
)
|
||||
numfit_min_span.location = x[fit["numfit"][0]]
|
||||
numfit_max_span.location = x[fit["numfit"][1]]
|
||||
else:
|
||||
plot_gauss_source.data.update(x=[], y=[])
|
||||
plot_bkg_source.data.update(x=[], y=[])
|
||||
fit_output_textinput.value = ""
|
||||
numfit_min_span.location = None
|
||||
numfit_max_span.location = None
|
||||
|
||||
# Main plot
|
||||
plot = Plot(
|
||||
@ -190,6 +195,12 @@ def create():
|
||||
plot_circle_source = ColumnDataSource(dict(x=[], y=[]))
|
||||
plot.add_glyph(plot_circle_source, Circle(x="x", y="y"))
|
||||
|
||||
numfit_min_span = Span(location=None, dimension='height', line_dash='dashed')
|
||||
plot.add_layout(numfit_min_span)
|
||||
|
||||
numfit_max_span = Span(location=None, dimension='height', line_dash='dashed')
|
||||
plot.add_layout(numfit_max_span)
|
||||
|
||||
# Measurement select
|
||||
def meas_table_callback(_attr, _old, new):
|
||||
if new:
|
||||
|
@ -223,6 +223,7 @@ def fitccl(
|
||||
d["full_report"] = result.fit_report()
|
||||
d["result"] = result
|
||||
d["comps"] = comps
|
||||
d["numfit"] = [numfit_min, numfit_max]
|
||||
meas["fit"] = d
|
||||
|
||||
return data
|
||||
|
Loading…
x
Reference in New Issue
Block a user