def plot_Trun(self):
star = self.star
inst_date = self.inst_date
data = self.selected_df
idx = data.groupby(['T']).apply(lambda x: x['ccf_max'].idxmax())
highest = data.ix[idx].copy()
source = ColumnDataSource(data=highest)
self.current_source = source
p = figure(
title="{} - {}".format(star, inst_date),
plot_width=800, plot_height=400,
tools="pan,wheel_zoom,tap,hover,reset",
title_text_font_size="20pt",
)
p.circle("T", "ccf_max",
size=10,
nonselection_alpha=0.6,
source=source
)
p.xaxis[0].axis_label = 'Temperature (K)'
p.yaxis[0].axis_label = 'CCF Peak Value'
hover = p.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
("Temperature", "@T"),
("vsini", "@vsini"),
("[Fe/H]", "@feh"),
("log(g)", "@logg"),
("Radial Velocity (km/s)", "@vel_max"),
("ccf peak height", "@ccf_max"),
])
return p, highest
评论列表
文章目录