Make found peaks more visible
This commit is contained in:
parent
0c38f9b2d7
commit
44e461f180
@ -6,9 +6,9 @@ import tempfile
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from bokeh.layouts import column, row
|
from bokeh.layouts import column, row
|
||||||
from bokeh.models import (
|
from bokeh.models import (
|
||||||
|
Asterisk,
|
||||||
BasicTicker,
|
BasicTicker,
|
||||||
Button,
|
Button,
|
||||||
Circle,
|
|
||||||
ColumnDataSource,
|
ColumnDataSource,
|
||||||
CustomJS,
|
CustomJS,
|
||||||
DataRange1d,
|
DataRange1d,
|
||||||
@ -126,11 +126,11 @@ def create():
|
|||||||
else:
|
else:
|
||||||
peak_pos_textinput.value = str([meas["om"][ind] for ind in peak_indexes])
|
peak_pos_textinput.value = str([meas["om"][ind] for ind in peak_indexes])
|
||||||
|
|
||||||
plot_circle_source.data.update(x=meas["om"][peak_indexes], y=meas["peak_heights"])
|
plot_peak_source.data.update(x=meas["om"][peak_indexes], y=meas["peak_heights"])
|
||||||
plot_line_smooth_source.data.update(x=x, y=meas["smooth_peaks"])
|
plot_line_smooth_source.data.update(x=x, y=meas["smooth_peaks"])
|
||||||
else:
|
else:
|
||||||
peak_pos_textinput.value = None
|
peak_pos_textinput.value = None
|
||||||
plot_circle_source.data.update(x=[], y=[])
|
plot_peak_source.data.update(x=[], y=[])
|
||||||
plot_line_smooth_source.data.update(x=[], y=[])
|
plot_line_smooth_source.data.update(x=[], y=[])
|
||||||
|
|
||||||
peak_pos_textinput_lock = False
|
peak_pos_textinput_lock = False
|
||||||
@ -209,8 +209,8 @@ def create():
|
|||||||
plot_bkg_source = ColumnDataSource(dict(x=[0], y=[0]))
|
plot_bkg_source = ColumnDataSource(dict(x=[0], y=[0]))
|
||||||
plot.add_glyph(plot_bkg_source, Line(x="x", y="y", line_color="green", line_dash="dashed"))
|
plot.add_glyph(plot_bkg_source, Line(x="x", y="y", line_color="green", line_dash="dashed"))
|
||||||
|
|
||||||
plot_circle_source = ColumnDataSource(dict(x=[], y=[]))
|
plot_peak_source = ColumnDataSource(dict(x=[], y=[]))
|
||||||
plot.add_glyph(plot_circle_source, Circle(x="x", y="y"))
|
plot.add_glyph(plot_peak_source, Asterisk(x="x", y="y", size=10, line_color="red"))
|
||||||
|
|
||||||
numfit_min_span = Span(location=None, dimension="height", line_dash="dashed")
|
numfit_min_span = Span(location=None, dimension="height", line_dash="dashed")
|
||||||
plot.add_layout(numfit_min_span)
|
plot.add_layout(numfit_min_span)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user